i think the default behavior should be to just output the redirect _javascript_ and ignore everything else in the response. in case someone has an edge case that requires some _javascript_ they can easily implement window.location script themselves. maybe adding requestcycle.urlfor(Page page) will be good also to help with the latter usecase.

-Igor


On 7/25/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
We could do that too. Do you think any script should be executed, or
if such a page (rather request target, let's keep things generic here)
is set, should anything else be disregarded?

Eelco


On 7/25/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> the answer would be to add setresponsepage on the ajaxrequesttarget that
> would keep the settings and at the end of processing /append/ the _javascript_
> call. so you can call setresponsepage multiple times, but only the last call
> matters. and requestcycle can just forward to that method on the target.
>
> -Igor
>
>
>
> On 7/25/06, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> >
>  That's why I asked you that question on ##wicket. PrependJavaScript
> now adds to a list. I think the name implies that it should be added
> in front of everything. That would fix that potential problem. If not,
> I thought about exposing getPrependJavaScripts or something, so that I
> could do the filtering myself.
>
> I didn't add a TODO as I was just waiting for your answer so that I
> could fix it right away. So... the answer...
>
> Eelco
>
>
> On 7/25/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > what happens if you call setresponsepage twice, since both _javascript_s are
> > output i think the first one will be followed instead of the second one
> > which is in contradition to how it works on regular requsts.
> >
> > -Igor
> >
> >
> >
> > On 7/25/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > >
> >  I just checked in a fix (will thus be in Wicket 1.2.2 and Wicket 2.0)
> > so that you can directly set the response page like you would do in
> > normal requests:
> >
> > add(new AjaxLink("set-response-page")
> > {
> >          public void onClick(AjaxRequestTarget target)
> >         {
> >                 setResponsePage(LinksPage.class);
> >         }
> > });
> >
> > Eelco
> >
> >
> >
> > On 7/25/06, Paolo Di Tommaso < [EMAIL PROTECTED]> wrote:
> > > With getSession().touch(page); it works!
> > >
> > > Thank you!
> > >
> > >
> > > - Paolo
> > >
> > > On 7/25/06, Johan Compagner < [EMAIL PROTECTED] > wrote:
> > > >
> > > > ahh
> > > > after the url for do this:
> > > >
> > > > session.touch(page);
> > > >
> > > > We should hide this for you somehow..
> >  > >
> > > > I do hope that the page is not stateless anymore at that time
> > > > Can you debug that a bit.. So after the urlFor() output the
> > > page.isStateless()
> > > >
> > > >
> > > > johan
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 7/25/06, Paolo Di Tommaso < [EMAIL PROTECTED]> wrote:
> > > >
> > > > >
> > > >
> > > >
> > > > I'm using an AjaxFormSubmitBehavior to submit form data.
> > > >
> > > > I would like to use ajax behaviour because if there are validation
> error
> > I
> > > can notify user for errors without reloading page again.
> > > >
> > > > If validation is OK I need to move to the next page in the application
> > > flow so in the onSubmit method for AjaxFormSubmitBehavior I write
> > > >
> > > >
> > > > protected void onSubmit(AjaxRequestTarget target) {
> > > >     if( getFeedbackMessages().isEmpty() ) {
> > > >
> > > >         MyPage page = new MyPage(...);
> > > >         String url = "" RequestCycle.get().urlFor(page,
> > > IRedirectListener.INTERFACE );
> > > >
>  > > >         target.addJavascript ( "window.location = '" +url+ "'" );
> > > >
> > > >
> > > >     } else {
> > > >         target.addJavascript("alert('"+ getJavascriptFeedbackMessage()
> > > +"')");
> > > >     }
> > > > }
> > > >
> > > >
> > > > Thanks, Paolo
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> >  > > On 7/25/06, Johan Compagner < [EMAIL PROTECTED] > wrote:
> > > > >
> > > > > need to see some more code or a test case.
> > > > >
> > > > >
> > > > >
> > > > > On 7/25/06, Paolo Di Tommaso < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > >
> > > > >
> > > > >
> > > > > I'm trying to redirect after an ajax request doing something like
> > that:
> > > > >
> > > > > String url = "" RequestCycle.get().urlFor(myPageInstance,
> > > IRedirectListener.INTERFACE );
> > > > > target.addJavascript ( "window.location = '" +url+ "'" );
> > > > >
> > > > > But always get an "Page Expired" error page.
> > > > >
> > > > > Is it possible to redirect to a page instance?
> > > > >
> > > > > Thanks, Paolo
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> -------------------------------------------------------------------------
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > > your
> > > > opinions on IT & business topics through brief surveys -- and earn
> cash
> > > >
> > >
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>  > > >
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> -------------------------------------------------------------------------
> >  > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > > your
> > > > opinions on IT & business topics through brief surveys -- and earn
> cash
> > > >
> > >
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > >
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > > opinions on IT & business topics through brief surveys -- and earn cash
> > >
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > >
>  >
> >
> -------------------------------------------------------------------------
> >
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys -- and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
>  > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys -- and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
> -------------------------------------------------------------------------
>
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to