Re: How to get form submit to return to previous page?

2010-09-02 Thread bht
What about

redirectToInterceptPage(new FormPage());

and in FormPage onSubmit:

if (!continueToOriginalDestination()) {
setResponsePage(Application.get().getHomePage());
}

Regards,

Bernard


On Wed, 1 Sep 2010 20:30:20 -0700, you wrote:

do not pass the page, pass the page reference, see page#getpagereference()

-igor

On Wed, Sep 1, 2010 at 6:21 PM, Chris Merrill ch...@webperformance.com wrote:
 On 9/1/2010 7:26 PM, Chris Colman wrote:
 I have a form/page that can be invoked from different pages so I can't
 easily specify which page should be returned to after submit.

 When I needed to do this, I passed the original page into the page 
 constructor
 where it was passed to the onSubmit() handler. Then the onSubmit() method
 set it as the return page:
  getRequestCycle().setResponsePage(_return_to_page);


 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

 -
 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


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



Re: How to get form submit to return to previous page?

2010-09-01 Thread Igor Vaynberg
you would create one that would write out some html like
htmlheadscripthistory.go(-2);/script/headbody//html

-igor

On Wed, Sep 1, 2010 at 4:26 PM, Chris Colman
chr...@stepaheadsoftware.com wrote:
 I have a form/page that can be invoked from different pages so I can't
 easily specify which page should be returned to after submit.

 Given that the simple javascript code:

 history.go(-1)

 takes the user 'back' to the previous page I was wondering if I could
 somehow set up an IRequestTarget that would execute that javascript
 after the form is successfully submitted.

 Eg.,

 public void onSubmit()
 {
        IRequestTarget rt = new some appropriate IRequestTarget class
        rt.add the javascript code
        getRequestCycle().setRequestTarget(rt);
 }

 Which IRequestTarget implementation class would I use for that, if any?

 -
 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: How to get form submit to return to previous page?

2010-09-01 Thread Chris Merrill
On 9/1/2010 7:26 PM, Chris Colman wrote:
 I have a form/page that can be invoked from different pages so I can't
 easily specify which page should be returned to after submit.

When I needed to do this, I passed the original page into the page constructor
where it was passed to the onSubmit() handler. Then the onSubmit() method
set it as the return page:
  getRequestCycle().setResponsePage(_return_to_page);


-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: How to get form submit to return to previous page?

2010-09-01 Thread Igor Vaynberg
do not pass the page, pass the page reference, see page#getpagereference()

-igor

On Wed, Sep 1, 2010 at 6:21 PM, Chris Merrill ch...@webperformance.com wrote:
 On 9/1/2010 7:26 PM, Chris Colman wrote:
 I have a form/page that can be invoked from different pages so I can't
 easily specify which page should be returned to after submit.

 When I needed to do this, I passed the original page into the page constructor
 where it was passed to the onSubmit() handler. Then the onSubmit() method
 set it as the return page:
  getRequestCycle().setResponsePage(_return_to_page);


 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

 -
 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