Re: Migrating to wicket 1.5

2012-03-01 Thread Martin Grigorov
On Thu, Mar 1, 2012 at 8:52 AM, Douglas Ferguson the...@gmail.com wrote:
 See below...

 On Feb 29, 2012, at 11:49 PM, Dan Retzlaff wrote:

 Douglas,

 Regarding javascript references: instead of adding a header contributor,
 have your component override renderHead(IHeaderResponse response) and use
 response.renderJavaScriptReference().

 Thanks!


 Regarding AbortException: instead of grabbing the servlet response, writing
 to it immediately, and throwing AbortException, replace the current request
 handler with one that writes the response. See DownloadLink#onClick for an
 example. (Ref
 http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E
 )

 I was catching it not throwing it. Is there a comparable scenario in 1.5?

 Here are some other things I ran into that I don't see in the migration doc

 1) RestartResponseAtInterceptPageException
org.apache.wicket.RestartResponseAtInterceptPageException

 2) getRequestCycle().setRedirect(false)
This is handled automatically by Wicket, but if you want full control
then you need to use this:

cycle.scheduleRequestHandlerAfterCurrent(new
RenderPageRequestHandler(new PageProvider(..),
RenderPageRequestHandler.RedirectPolicy.NEVER))

 3) IRequestTarget is gone
Replaced by IRequestHandler
http://wicketinaction.com/2011/07/wicket-1-5-request-mapper/
http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/

 4) AbstractRequestTargetUrlCodingStrategy is goine
The links above should explain this.

 5) UploadWebRequest is gone
No need of this anymore. See wicket-examples - upload for a demo
(org.apache.wicket.examples.upload.UploadApplication)

Feel free to update the migration page where you see it misses some info.






 Dan

 On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote:

 Just found another one:

 What did AbortException get replaced with?

 Douglas

 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:

 I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:

              WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
              HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
              String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
              if(httpServletRequest.isSecure()){
                      jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
              }

 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Migrating to wicket 1.5

2012-03-01 Thread Douglas Ferguson
Thanks!

I also noticed that hybridurlcodingstrategy is missing.

I did some reading but haven't found a solution that is 100%

Douglas

On Mar 1, 2012, at 2:01 AM, Martin Grigorov wrote:

 On Thu, Mar 1, 2012 at 8:52 AM, Douglas Ferguson the...@gmail.com wrote:
 See below...
 
 On Feb 29, 2012, at 11:49 PM, Dan Retzlaff wrote:
 
 Douglas,
 
 Regarding javascript references: instead of adding a header contributor,
 have your component override renderHead(IHeaderResponse response) and use
 response.renderJavaScriptReference().
 
 Thanks!
 
 
 Regarding AbortException: instead of grabbing the servlet response, writing
 to it immediately, and throwing AbortException, replace the current request
 handler with one that writes the response. See DownloadLink#onClick for an
 example. (Ref
 http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E
 )
 
 I was catching it not throwing it. Is there a comparable scenario in 1.5?
 
 Here are some other things I ran into that I don't see in the migration doc
 
 1) RestartResponseAtInterceptPageException
 org.apache.wicket.RestartResponseAtInterceptPageException
 
 2) getRequestCycle().setRedirect(false)
 This is handled automatically by Wicket, but if you want full control
 then you need to use this:
 
 cycle.scheduleRequestHandlerAfterCurrent(new
 RenderPageRequestHandler(new PageProvider(..),
 RenderPageRequestHandler.RedirectPolicy.NEVER))
 
 3) IRequestTarget is gone
 Replaced by IRequestHandler
 http://wicketinaction.com/2011/07/wicket-1-5-request-mapper/
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
 
 4) AbstractRequestTargetUrlCodingStrategy is goine
 The links above should explain this.
 
 5) UploadWebRequest is gone
 No need of this anymore. See wicket-examples - upload for a demo
 (org.apache.wicket.examples.upload.UploadApplication)
 
 Feel free to update the migration page where you see it misses some info.
 
 
 
 
 
 
 Dan
 
 On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote:
 
 Just found another one:
 
 What did AbortException get replaced with?
 
 Douglas
 
 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:
 
 I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:
 
  WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
  HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
  String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
  if(httpServletRequest.isSecure()){
  jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
  }
 
 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Migrating to wicket 1.5

2012-03-01 Thread Douglas Ferguson
 
 
 Feel free to update the migration page where you see it misses some info.

What's the process for updating?

 
 
 
 
 
 
 Dan
 
 On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote:
 
 Just found another one:
 
 What did AbortException get replaced with?
 
 Douglas
 
 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:
 
 I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:
 
  WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
  HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
  String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
  if(httpServletRequest.isSecure()){
  jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
  }
 
 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Migrating to wicket 1.5

2012-03-01 Thread Martin Grigorov
On Thu, Mar 1, 2012 at 10:05 AM, Douglas Ferguson the...@gmail.com wrote:
 Thanks!

 I also noticed that hybridurlcodingstrategy is missing.

 I did some reading but haven't found a solution that is 100%

The default mounting works as HybridUCS - WebApplication#mountPage(),
this uses MountedMapper behind the scenes.
What functionality is missing ?


 Douglas

 On Mar 1, 2012, at 2:01 AM, Martin Grigorov wrote:

 On Thu, Mar 1, 2012 at 8:52 AM, Douglas Ferguson the...@gmail.com wrote:
 See below...

 On Feb 29, 2012, at 11:49 PM, Dan Retzlaff wrote:

 Douglas,

 Regarding javascript references: instead of adding a header contributor,
 have your component override renderHead(IHeaderResponse response) and use
 response.renderJavaScriptReference().

 Thanks!


 Regarding AbortException: instead of grabbing the servlet response, writing
 to it immediately, and throwing AbortException, replace the current request
 handler with one that writes the response. See DownloadLink#onClick for an
 example. (Ref
 http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E
 )

 I was catching it not throwing it. Is there a comparable scenario in 1.5?

 Here are some other things I ran into that I don't see in the migration doc

 1) RestartResponseAtInterceptPageException
 org.apache.wicket.RestartResponseAtInterceptPageException

 2) getRequestCycle().setRedirect(false)
 This is handled automatically by Wicket, but if you want full control
 then you need to use this:

 cycle.scheduleRequestHandlerAfterCurrent(new
 RenderPageRequestHandler(new PageProvider(..),
 RenderPageRequestHandler.RedirectPolicy.NEVER))

 3) IRequestTarget is gone
 Replaced by IRequestHandler
 http://wicketinaction.com/2011/07/wicket-1-5-request-mapper/
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/

 4) AbstractRequestTargetUrlCodingStrategy is goine
 The links above should explain this.

 5) UploadWebRequest is gone
 No need of this anymore. See wicket-examples - upload for a demo
 (org.apache.wicket.examples.upload.UploadApplication)

 Feel free to update the migration page where you see it misses some info.






 Dan

 On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote:

 Just found another one:

 What did AbortException get replaced with?

 Douglas

 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:

 I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:

              WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
              HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
              String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
              if(httpServletRequest.isSecure()){
                      jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
              }

 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Migrating to wicket 1.5

2012-03-01 Thread Martin Grigorov
On Thu, Mar 1, 2012 at 10:06 AM, Douglas Ferguson the...@gmail.com wrote:


 Feel free to update the migration page where you see it misses some info.

 What's the process for updating?

Create an account for the Wiki and update the page(s).








 Dan

 On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote:

 Just found another one:

 What did AbortException get replaced with?

 Douglas

 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:

 I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:

              WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
              HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
              String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
              if(httpServletRequest.isSecure()){
                      jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
              }

 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Migrating to wicket 1.5

2012-03-01 Thread Douglas Ferguson
If I mount a page to the url page1

Then hit  page1/foo/bar/abc/xyz

Then in my code i say pageParameters.get(foo) it returns null.
In 1.4 it would return bar

Douglas

On Mar 1, 2012, at 2:09 AM, Martin Grigorov wrote:

 On Thu, Mar 1, 2012 at 10:05 AM, Douglas Ferguson the...@gmail.com wrote:
 Thanks!
 
 I also noticed that hybridurlcodingstrategy is missing.
 
 I did some reading but haven't found a solution that is 100%
 
 The default mounting works as HybridUCS - WebApplication#mountPage(),
 this uses MountedMapper behind the scenes.
 What functionality is missing ?
 
 
 Douglas
 
 On Mar 1, 2012, at 2:01 AM, Martin Grigorov wrote:
 
 On Thu, Mar 1, 2012 at 8:52 AM, Douglas Ferguson the...@gmail.com wrote:
 See below...
 
 On Feb 29, 2012, at 11:49 PM, Dan Retzlaff wrote:
 
 Douglas,
 
 Regarding javascript references: instead of adding a header contributor,
 have your component override renderHead(IHeaderResponse response) and use
 response.renderJavaScriptReference().
 
 Thanks!
 
 
 Regarding AbortException: instead of grabbing the servlet response, 
 writing
 to it immediately, and throwing AbortException, replace the current 
 request
 handler with one that writes the response. See DownloadLink#onClick for an
 example. (Ref
 http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E
 )
 
 I was catching it not throwing it. Is there a comparable scenario in 1.5?
 
 Here are some other things I ran into that I don't see in the migration doc
 
 1) RestartResponseAtInterceptPageException
 org.apache.wicket.RestartResponseAtInterceptPageException
 
 2) getRequestCycle().setRedirect(false)
 This is handled automatically by Wicket, but if you want full control
 then you need to use this:
 
 cycle.scheduleRequestHandlerAfterCurrent(new
 RenderPageRequestHandler(new PageProvider(..),
 RenderPageRequestHandler.RedirectPolicy.NEVER))
 
 3) IRequestTarget is gone
 Replaced by IRequestHandler
 http://wicketinaction.com/2011/07/wicket-1-5-request-mapper/
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
 
 4) AbstractRequestTargetUrlCodingStrategy is goine
 The links above should explain this.
 
 5) UploadWebRequest is gone
 No need of this anymore. See wicket-examples - upload for a demo
 (org.apache.wicket.examples.upload.UploadApplication)
 
 Feel free to update the migration page where you see it misses some info.
 
 
 
 
 
 
 Dan
 
 On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com 
 wrote:
 
 Just found another one:
 
 What did AbortException get replaced with?
 
 Douglas
 
 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:
 
 I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:
 
  WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
  HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
  String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
  if(httpServletRequest.isSecure()){
  jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
  }
 
 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Migrating to wicket 1.5

2012-03-01 Thread Martin Grigorov
See org.apache.wicket.request.mapper.parameter.UrlPathPageParametersEncoder

With the default encoder these are available as indexed parameters:
pp.get(1) will return 'bar'

On Thu, Mar 1, 2012 at 10:22 AM, Douglas Ferguson the...@gmail.com wrote:
 If I mount a page to the url page1

 Then hit  page1/foo/bar/abc/xyz

 Then in my code i say pageParameters.get(foo) it returns null.
 In 1.4 it would return bar

 Douglas

 On Mar 1, 2012, at 2:09 AM, Martin Grigorov wrote:

 On Thu, Mar 1, 2012 at 10:05 AM, Douglas Ferguson the...@gmail.com wrote:
 Thanks!

 I also noticed that hybridurlcodingstrategy is missing.

 I did some reading but haven't found a solution that is 100%

 The default mounting works as HybridUCS - WebApplication#mountPage(),
 this uses MountedMapper behind the scenes.
 What functionality is missing ?


 Douglas

 On Mar 1, 2012, at 2:01 AM, Martin Grigorov wrote:

 On Thu, Mar 1, 2012 at 8:52 AM, Douglas Ferguson the...@gmail.com wrote:
 See below...

 On Feb 29, 2012, at 11:49 PM, Dan Retzlaff wrote:

 Douglas,

 Regarding javascript references: instead of adding a header contributor,
 have your component override renderHead(IHeaderResponse response) and use
 response.renderJavaScriptReference().

 Thanks!


 Regarding AbortException: instead of grabbing the servlet response, 
 writing
 to it immediately, and throwing AbortException, replace the current 
 request
 handler with one that writes the response. See DownloadLink#onClick for 
 an
 example. (Ref
 http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E
 )

 I was catching it not throwing it. Is there a comparable scenario in 1.5?

 Here are some other things I ran into that I don't see in the migration 
 doc

 1) RestartResponseAtInterceptPageException
 org.apache.wicket.RestartResponseAtInterceptPageException

 2) getRequestCycle().setRedirect(false)
 This is handled automatically by Wicket, but if you want full control
 then you need to use this:

 cycle.scheduleRequestHandlerAfterCurrent(new
 RenderPageRequestHandler(new PageProvider(..),
 RenderPageRequestHandler.RedirectPolicy.NEVER))

 3) IRequestTarget is gone
 Replaced by IRequestHandler
 http://wicketinaction.com/2011/07/wicket-1-5-request-mapper/
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/

 4) AbstractRequestTargetUrlCodingStrategy is goine
 The links above should explain this.

 5) UploadWebRequest is gone
 No need of this anymore. See wicket-examples - upload for a demo
 (org.apache.wicket.examples.upload.UploadApplication)

 Feel free to update the migration page where you see it misses some info.






 Dan

 On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com 
 wrote:

 Just found another one:

 What did AbortException get replaced with?

 Douglas

 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:

 I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:

              WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
              HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
              String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
              if(httpServletRequest.isSecure()){
                      jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
              }

 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development

Re: Migrating to wicket 1.5

2012-03-01 Thread exaptis
Just a quick hint about the code-snipet above.

You don't really need to replace the protocol. Change it to this and the
browser will automatically use the protocol, that is used by the site
embedding the javascript.

String jqueryURl =
//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;
component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));

:-)


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-jQuery-Validator-integration-tp4390885p4434452.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Migrating to wicket 1.5

2012-02-29 Thread Douglas Ferguson
I was reading the migration doc and I'm not sure how I would migrate this to 
1.5:

WebRequest webRequest = (WebRequest) 
RequestCycle.get().getRequest();
HttpServletRequest httpServletRequest = 
(HttpServletRequest)webRequest.getContainerRequest();
String jqueryURl = 
http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
if(httpServletRequest.isSecure()){
jqueryURl = jqueryURl.replaceFirst(http://;, 
https://;);
}

component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Migrating to wicket 1.5

2012-02-29 Thread Douglas Ferguson
Just found another one:

What did AbortException get replaced with?

Douglas

On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:

 I was reading the migration doc and I'm not sure how I would migrate this to 
 1.5:
 
   WebRequest webRequest = (WebRequest) 
 RequestCycle.get().getRequest();
   HttpServletRequest httpServletRequest = 
 (HttpServletRequest)webRequest.getContainerRequest();
   String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
   if(httpServletRequest.isSecure()){
   jqueryURl = jqueryURl.replaceFirst(http://;, 
 https://;);
   }
   
 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Migrating to wicket 1.5

2012-02-29 Thread Dan Retzlaff
Douglas,

Regarding javascript references: instead of adding a header contributor,
have your component override renderHead(IHeaderResponse response) and use
response.renderJavaScriptReference().

Regarding AbortException: instead of grabbing the servlet response, writing
to it immediately, and throwing AbortException, replace the current request
handler with one that writes the response. See DownloadLink#onClick for an
example. (Ref
http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E
 )

Dan

On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote:

 Just found another one:

 What did AbortException get replaced with?

 Douglas

 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:

  I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:
 
WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
if(httpServletRequest.isSecure()){
jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
}
 
 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Migrating to wicket 1.5

2012-02-29 Thread Douglas Ferguson
See below...

On Feb 29, 2012, at 11:49 PM, Dan Retzlaff wrote:

 Douglas,
 
 Regarding javascript references: instead of adding a header contributor,
 have your component override renderHead(IHeaderResponse response) and use
 response.renderJavaScriptReference().

Thanks!

 
 Regarding AbortException: instead of grabbing the servlet response, writing
 to it immediately, and throwing AbortException, replace the current request
 handler with one that writes the response. See DownloadLink#onClick for an
 example. (Ref
 http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E
 )

I was catching it not throwing it. Is there a comparable scenario in 1.5?

Here are some other things I ran into that I don't see in the migration doc

1) RestartResponseAtInterceptPageException
2) getRequestCycle().setRedirect(false)
3) IRequestTarget is gone
4) AbstractRequestTargetUrlCodingStrategy is goine
5) UploadWebRequest is gone




 
 Dan
 
 On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote:
 
 Just found another one:
 
 What did AbortException get replaced with?
 
 Douglas
 
 On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote:
 
 I was reading the migration doc and I'm not sure how I would migrate
 this to 1.5:
 
  WebRequest webRequest = (WebRequest)
 RequestCycle.get().getRequest();
  HttpServletRequest httpServletRequest =
 (HttpServletRequest)webRequest.getContainerRequest();
  String jqueryURl = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;;
  if(httpServletRequest.isSecure()){
  jqueryURl = jqueryURl.replaceFirst(http://;,
 https://;);
  }
 
 component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl));
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org