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

Reply via email to