You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Al Maw <wi...@almaw.com> on 2008/04/01 01:54:29 UTC

Re: continueToOriginalDestination resolves to wrong URL

I've just spent two hours trying to reproduce this and failing to (see the
bug). If anyone can give me a reproduceable test-case for this wrapped up in
a nice Maven 2-backed project that I can just unzip and work with, then I
will very keenly fix this. As it is, I just can't reproduce it.

I guess it would be useful if you could see if the zip I've attached to the
issue can reproduce the problem on your local machine. If it does, please be
as specific as possible about your set-up as possible (OS, JDK version,
browser version, Tomcat minor revision, etc.) and I'll try to get a mirror
environment set up so we can work out what the heck the problem could be.

Are people running this behind a mod_proxy or something? Or are you seeing
this issue when pointed at localhost:8080?

Regards,

Alastair

On Mon, Mar 31, 2008 at 10:23 PM, Al Maw <wi...@almaw.com> wrote:

> Yep, this is probably https://issues.apache.org/jira/browse/WICKET-1205
>
> Am off to see if I can fix it right now.
>
> Regards,
>
> Alastair
>
>
> On Mon, Mar 31, 2008 at 5:54 PM, Zheng, Xiahong <Xi...@fmr.com>
> wrote:
>
> > My environment:
> >
> > Wicket version: 1.3.2
> > Servlet Container: tomcat 6.0.14
> >
> > The problem is definitely still there if I map wicketfilter at /*.
> > However, I just found if I add an extra path such as "/abc/*" in the
> > mapping it starts to work. This workaround requires my application to
> > add an extra path to the url which I want to avoid.
> >
> > Interestingly, this workaround also solves the relative stylesheet
> > loading problem that I was facing at the same time.
> >
> >
> >
> >
> > -----Original Message-----
> > From: alastair.maw@gmail.com [mailto:alastair.maw@gmail.com] On Behalf
> > Of Al Maw
> > Sent: Monday, March 31, 2008 10:15 AM
> > To: users@wicket.apache.org
> > Subject: Re: continueToOriginalDestination resolves to wrong URL
> >
> > That bug was closed for rc 1, so you shouldn't be having this issue
> > unless
> > you're on a beta version.
> >
> > Please could you provide some more details?
> > Which Wicket version?
> > Which servlet container?
> >
> > Regards,
> >
> > Alastair
> >
> > On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong <Xi...@fmr.com>
> > wrote:
> >
> > > Just realized this was reported in WICKET-588. Was the fix included in
> > > 1.3.2 release?
> > >
> > > -----Original Message-----
> > > From: Zheng, Xiahong
> > > Sent: Sunday, March 30, 2008 9:28 PM
> > > To: users@wicket.apache.org
> > > Subject: continueToOriginalDestination resolves to wrong URL
> > >
> > > Scenario,
> > >
> > > 1) request http://myapp/pages/watchlist
> > > 2) throws throw new
> > > RestartResponseAtInterceptPageException(Login.class);
> > > 3) Use sign in
> > > 4) user redirected to http://pages/watchlist note: path /myapp is
> > > dropped
> > >
> > > Any idea?
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: Accessing non-Wicket JavaScript variables inside Wicket

Posted by Alastair Maw <al...@gmail.com>.
Your questions are rather too specific to be of much use without the code
itself.

How are you making the call back to Wicket? Are you writing your own
AjaxBehavior?

If so, AbstractDefaultAjaxBehavior, which most of the Wicket AJAX
functionality extends, uses getCallbackScript(boolean) to generate the
wicketAjaxGet(...) bit of javascript. That function internally calls
getCallbackUrl(boolean). You can override this function in your behavior and
add some GET params on the end (return super.getCallbackUrl(...) +
"&foo=bar"). You can then retrieve these from your respond method with
RequestCycle.get().getRequest().getParameter("foo").

For some example code, see the list editor at http://londonwicket.org

Regards,

Alastair

On Tue, Apr 1, 2008 at 6:28 PM, Michael Mehrle <mi...@ask.com>
wrote:

> I wrote a file uploader that works inside a Wicket modal window based on
> jQuery. Here's the original PHP based framework I based my work on:
>
> http://www.phpletter.com/Demo/AjaxFileUpload-Demo/
>
> It's up and running (took some tweaking to say the least), but I am
> still facing one hurdle:
>
> The file processing on the backend is done via a regular Wicket page.
> After verifying and saving the file it responds back with either an
> error or success JSON message that's sent back to my JavaScript function
> which originated the AJAX call. This way I can pop up alerts and advice
> the user if there are problems. So far so good.
>
> The problem I have is that I need to also bounce back the image id,
> since it needs to be further processed inside my Wicket panel. So, let's
> say I stick that id into my JSON message, and that it's available inside
> my JavaScript function that handles the success/failure function. What
> would be an elegant way to access that id from within Wicket? Again,
> remember that this whole image uploader is outside the Wicket framework.
> I would like to grab that id in my setCloseButtonCallback method after
> the modal has been closed.
>
> Any ideas would be greatly appreciated.
>
> Thanks!
>
> Michael
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Accessing non-Wicket JavaScript variables inside Wicket

Posted by Michael Mehrle <mi...@ask.com>.
I wrote a file uploader that works inside a Wicket modal window based on
jQuery. Here's the original PHP based framework I based my work on:

http://www.phpletter.com/Demo/AjaxFileUpload-Demo/

It's up and running (took some tweaking to say the least), but I am
still facing one hurdle:

The file processing on the backend is done via a regular Wicket page.
After verifying and saving the file it responds back with either an
error or success JSON message that's sent back to my JavaScript function
which originated the AJAX call. This way I can pop up alerts and advice
the user if there are problems. So far so good.

The problem I have is that I need to also bounce back the image id,
since it needs to be further processed inside my Wicket panel. So, let's
say I stick that id into my JSON message, and that it's available inside
my JavaScript function that handles the success/failure function. What
would be an elegant way to access that id from within Wicket? Again,
remember that this whole image uploader is outside the Wicket framework.
I would like to grab that id in my setCloseButtonCallback method after
the modal has been closed.

Any ideas would be greatly appreciated.

Thanks!

Michael



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


Accessing non-Wicket JavaScript variables inside Wicket

Posted by Michael Mehrle <mi...@ask.com>.
I wrote a file uploader that works inside a Wicket modal window based on
jQuery. Here's the original PHP based framework I based my work on:

http://www.phpletter.com/Demo/AjaxFileUpload-Demo/

It's up and running (took some tweaking to say the least), but I am
still facing one hurdle:

The file processing on the backend is done via a regular Wicket page.
After verifying and saving the file it responds back with either an
error or success JSON message that's sent back to my JavaScript function
which originated the AJAX call. This way I can pop up alerts and advice
the user if there are problems. So far so good.

The problem I have is that I need to also bounce back the image id,
since it needs to be further processed inside my Wicket panel. So, let's
say I stick that id into my JSON message, and that it's available inside
my JavaScript function that handles the success/failure function. What
would be an elegant way to access that id from within Wicket? Again,
remember that this whole image uploader is outside the Wicket framework.
I would like to grab that id in my setCloseButtonCallback method after
the modal has been closed.

Any ideas would be greatly appreciated.

Thanks!

Michael

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


RE: continueToOriginalDestination resolves to wrong URL

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
The workaround fixes everything. Thanks. 

-----Original Message-----
From: alastair.maw@gmail.com [mailto:alastair.maw@gmail.com] On Behalf
Of Al Maw
Sent: Tuesday, April 01, 2008 2:59 PM
To: users@wicket.apache.org
Subject: Re: continueToOriginalDestination resolves to wrong URL

My quickstart is not the quickstart you were looking at. See the one
called
WICKET-1205.zip

Regardless, I have worked out what the underlying cause is.

You can fix this with a workaround: remove the index.html or index.jsp
page
from your web context root directory, as noted on the bug.

Regards,

Al

On Tue, Apr 1, 2008 at 7:55 PM, Zheng, Xiahong <Xi...@fmr.com>
wrote:

>
>
> -----Original Message-----
> From: Zheng, Xiahong
> Sent: Tuesday, April 01, 2008 12:50 PM
> To: 'users@wicket.apache.org'
> Subject: RE: continueToOriginalDestination resolves to wrong URL
>
> Yes, I was able to reproduce the bug with your example in eclipse 3.3
> and Tomcat 6.0.14 environment (WTP2.0). The color is gone on the
second
> page (PageOne.html) after clicking the link on the first page
> (NoAuthHome.html). Changing hostname and port doesn't make a
difference.
>
> -----Original Message-----
> From: alastair.maw@gmail.com [mailto:alastair.maw@gmail.com] On Behalf
> Of Al Maw
> Sent: Monday, March 31, 2008 7:54 PM
> To: users@wicket.apache.org
> Subject: Re: continueToOriginalDestination resolves to wrong URL
>
> I've just spent two hours trying to reproduce this and failing to (see
> the
> bug). If anyone can give me a reproduceable test-case for this wrapped
> up in
> a nice Maven 2-backed project that I can just unzip and work with,
then
> I
> will very keenly fix this. As it is, I just can't reproduce it.
>
> I guess it would be useful if you could see if the zip I've attached
to
> the
> issue can reproduce the problem on your local machine. If it does,
> please be
> as specific as possible about your set-up as possible (OS, JDK
version,
> browser version, Tomcat minor revision, etc.) and I'll try to get a
> mirror
> environment set up so we can work out what the heck the problem could
> be.
>
> Are people running this behind a mod_proxy or something? Or are you
> seeing
> this issue when pointed at localhost:8080?
>
> Regards,
>
> Alastair
>
> On Mon, Mar 31, 2008 at 10:23 PM, Al Maw <wi...@almaw.com> wrote:
>
> > Yep, this is probably
> https://issues.apache.org/jira/browse/WICKET-1205
> >
> > Am off to see if I can fix it right now.
> >
> > Regards,
> >
> > Alastair
> >
> >
> > On Mon, Mar 31, 2008 at 5:54 PM, Zheng, Xiahong
> <Xi...@fmr.com>
> > wrote:
> >
> > > My environment:
> > >
> > > Wicket version: 1.3.2
> > > Servlet Container: tomcat 6.0.14
> > >
> > > The problem is definitely still there if I map wicketfilter at /*.
> > > However, I just found if I add an extra path such as "/abc/*" in
the
> > > mapping it starts to work. This workaround requires my application
> to
> > > add an extra path to the url which I want to avoid.
> > >
> > > Interestingly, this workaround also solves the relative stylesheet
> > > loading problem that I was facing at the same time.
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: alastair.maw@gmail.com [mailto:alastair.maw@gmail.com] On
> Behalf
> > > Of Al Maw
> > > Sent: Monday, March 31, 2008 10:15 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: continueToOriginalDestination resolves to wrong URL
> > >
> > > That bug was closed for rc 1, so you shouldn't be having this
issue
> > > unless
> > > you're on a beta version.
> > >
> > > Please could you provide some more details?
> > > Which Wicket version?
> > > Which servlet container?
> > >
> > > Regards,
> > >
> > > Alastair
> > >
> > > On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong
> <Xi...@fmr.com>
> > > wrote:
> > >
> > > > Just realized this was reported in WICKET-588. Was the fix
> included in
> > > > 1.3.2 release?
> > > >
> > > > -----Original Message-----
> > > > From: Zheng, Xiahong
> > > > Sent: Sunday, March 30, 2008 9:28 PM
> > > > To: users@wicket.apache.org
> > > > Subject: continueToOriginalDestination resolves to wrong URL
> > > >
> > > > Scenario,
> > > >
> > > > 1) request http://myapp/pages/watchlist
> > > > 2) throws throw new
> > > > RestartResponseAtInterceptPageException(Login.class);
> > > > 3) Use sign in
> > > > 4) user redirected to http://pages/watchlist note: path /myapp
is
> > > > dropped
> > > >
> > > > Any idea?
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


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


Re: continueToOriginalDestination resolves to wrong URL

Posted by Al Maw <wi...@almaw.com>.
My quickstart is not the quickstart you were looking at. See the one called
WICKET-1205.zip

Regardless, I have worked out what the underlying cause is.

You can fix this with a workaround: remove the index.html or index.jsp page
from your web context root directory, as noted on the bug.

Regards,

Al

On Tue, Apr 1, 2008 at 7:55 PM, Zheng, Xiahong <Xi...@fmr.com>
wrote:

>
>
> -----Original Message-----
> From: Zheng, Xiahong
> Sent: Tuesday, April 01, 2008 12:50 PM
> To: 'users@wicket.apache.org'
> Subject: RE: continueToOriginalDestination resolves to wrong URL
>
> Yes, I was able to reproduce the bug with your example in eclipse 3.3
> and Tomcat 6.0.14 environment (WTP2.0). The color is gone on the second
> page (PageOne.html) after clicking the link on the first page
> (NoAuthHome.html). Changing hostname and port doesn't make a difference.
>
> -----Original Message-----
> From: alastair.maw@gmail.com [mailto:alastair.maw@gmail.com] On Behalf
> Of Al Maw
> Sent: Monday, March 31, 2008 7:54 PM
> To: users@wicket.apache.org
> Subject: Re: continueToOriginalDestination resolves to wrong URL
>
> I've just spent two hours trying to reproduce this and failing to (see
> the
> bug). If anyone can give me a reproduceable test-case for this wrapped
> up in
> a nice Maven 2-backed project that I can just unzip and work with, then
> I
> will very keenly fix this. As it is, I just can't reproduce it.
>
> I guess it would be useful if you could see if the zip I've attached to
> the
> issue can reproduce the problem on your local machine. If it does,
> please be
> as specific as possible about your set-up as possible (OS, JDK version,
> browser version, Tomcat minor revision, etc.) and I'll try to get a
> mirror
> environment set up so we can work out what the heck the problem could
> be.
>
> Are people running this behind a mod_proxy or something? Or are you
> seeing
> this issue when pointed at localhost:8080?
>
> Regards,
>
> Alastair
>
> On Mon, Mar 31, 2008 at 10:23 PM, Al Maw <wi...@almaw.com> wrote:
>
> > Yep, this is probably
> https://issues.apache.org/jira/browse/WICKET-1205
> >
> > Am off to see if I can fix it right now.
> >
> > Regards,
> >
> > Alastair
> >
> >
> > On Mon, Mar 31, 2008 at 5:54 PM, Zheng, Xiahong
> <Xi...@fmr.com>
> > wrote:
> >
> > > My environment:
> > >
> > > Wicket version: 1.3.2
> > > Servlet Container: tomcat 6.0.14
> > >
> > > The problem is definitely still there if I map wicketfilter at /*.
> > > However, I just found if I add an extra path such as "/abc/*" in the
> > > mapping it starts to work. This workaround requires my application
> to
> > > add an extra path to the url which I want to avoid.
> > >
> > > Interestingly, this workaround also solves the relative stylesheet
> > > loading problem that I was facing at the same time.
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: alastair.maw@gmail.com [mailto:alastair.maw@gmail.com] On
> Behalf
> > > Of Al Maw
> > > Sent: Monday, March 31, 2008 10:15 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: continueToOriginalDestination resolves to wrong URL
> > >
> > > That bug was closed for rc 1, so you shouldn't be having this issue
> > > unless
> > > you're on a beta version.
> > >
> > > Please could you provide some more details?
> > > Which Wicket version?
> > > Which servlet container?
> > >
> > > Regards,
> > >
> > > Alastair
> > >
> > > On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong
> <Xi...@fmr.com>
> > > wrote:
> > >
> > > > Just realized this was reported in WICKET-588. Was the fix
> included in
> > > > 1.3.2 release?
> > > >
> > > > -----Original Message-----
> > > > From: Zheng, Xiahong
> > > > Sent: Sunday, March 30, 2008 9:28 PM
> > > > To: users@wicket.apache.org
> > > > Subject: continueToOriginalDestination resolves to wrong URL
> > > >
> > > > Scenario,
> > > >
> > > > 1) request http://myapp/pages/watchlist
> > > > 2) throws throw new
> > > > RestartResponseAtInterceptPageException(Login.class);
> > > > 3) Use sign in
> > > > 4) user redirected to http://pages/watchlist note: path /myapp is
> > > > dropped
> > > >
> > > > Any idea?
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

RE: continueToOriginalDestination resolves to wrong URL

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
 

-----Original Message-----
From: Zheng, Xiahong 
Sent: Tuesday, April 01, 2008 12:50 PM
To: 'users@wicket.apache.org'
Subject: RE: continueToOriginalDestination resolves to wrong URL

Yes, I was able to reproduce the bug with your example in eclipse 3.3
and Tomcat 6.0.14 environment (WTP2.0). The color is gone on the second
page (PageOne.html) after clicking the link on the first page
(NoAuthHome.html). Changing hostname and port doesn't make a difference.

-----Original Message-----
From: alastair.maw@gmail.com [mailto:alastair.maw@gmail.com] On Behalf
Of Al Maw
Sent: Monday, March 31, 2008 7:54 PM
To: users@wicket.apache.org
Subject: Re: continueToOriginalDestination resolves to wrong URL

I've just spent two hours trying to reproduce this and failing to (see
the
bug). If anyone can give me a reproduceable test-case for this wrapped
up in
a nice Maven 2-backed project that I can just unzip and work with, then
I
will very keenly fix this. As it is, I just can't reproduce it.

I guess it would be useful if you could see if the zip I've attached to
the
issue can reproduce the problem on your local machine. If it does,
please be
as specific as possible about your set-up as possible (OS, JDK version,
browser version, Tomcat minor revision, etc.) and I'll try to get a
mirror
environment set up so we can work out what the heck the problem could
be.

Are people running this behind a mod_proxy or something? Or are you
seeing
this issue when pointed at localhost:8080?

Regards,

Alastair

On Mon, Mar 31, 2008 at 10:23 PM, Al Maw <wi...@almaw.com> wrote:

> Yep, this is probably
https://issues.apache.org/jira/browse/WICKET-1205
>
> Am off to see if I can fix it right now.
>
> Regards,
>
> Alastair
>
>
> On Mon, Mar 31, 2008 at 5:54 PM, Zheng, Xiahong
<Xi...@fmr.com>
> wrote:
>
> > My environment:
> >
> > Wicket version: 1.3.2
> > Servlet Container: tomcat 6.0.14
> >
> > The problem is definitely still there if I map wicketfilter at /*.
> > However, I just found if I add an extra path such as "/abc/*" in the
> > mapping it starts to work. This workaround requires my application
to
> > add an extra path to the url which I want to avoid.
> >
> > Interestingly, this workaround also solves the relative stylesheet
> > loading problem that I was facing at the same time.
> >
> >
> >
> >
> > -----Original Message-----
> > From: alastair.maw@gmail.com [mailto:alastair.maw@gmail.com] On
Behalf
> > Of Al Maw
> > Sent: Monday, March 31, 2008 10:15 AM
> > To: users@wicket.apache.org
> > Subject: Re: continueToOriginalDestination resolves to wrong URL
> >
> > That bug was closed for rc 1, so you shouldn't be having this issue
> > unless
> > you're on a beta version.
> >
> > Please could you provide some more details?
> > Which Wicket version?
> > Which servlet container?
> >
> > Regards,
> >
> > Alastair
> >
> > On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong
<Xi...@fmr.com>
> > wrote:
> >
> > > Just realized this was reported in WICKET-588. Was the fix
included in
> > > 1.3.2 release?
> > >
> > > -----Original Message-----
> > > From: Zheng, Xiahong
> > > Sent: Sunday, March 30, 2008 9:28 PM
> > > To: users@wicket.apache.org
> > > Subject: continueToOriginalDestination resolves to wrong URL
> > >
> > > Scenario,
> > >
> > > 1) request http://myapp/pages/watchlist
> > > 2) throws throw new
> > > RestartResponseAtInterceptPageException(Login.class);
> > > 3) Use sign in
> > > 4) user redirected to http://pages/watchlist note: path /myapp is
> > > dropped
> > >
> > > Any idea?
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>


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