On Thu, Jan 19, 2012 at 6:54 PM, Chris Colman
wrote:
>>You can pass PageReference to the page with the form and use it in
>>Form#onSubmit().
>>
>>Page1.java:
>>
>>setResponsePage(new FormPage(getPageReference()));
>>
>>FormPage.java:
>>
>>public FormPage(final PageReference pr) {
>>
>> add(new Fo
>You can pass PageReference to the page with the form and use it in
>Form#onSubmit().
>
>Page1.java:
>
>setResponsePage(new FormPage(getPageReference()));
>
>FormPage.java:
>
>public FormPage(final PageReference pr) {
>
> add(new Form() {
>onSubmit() {
> setResponsePage(pr.getPage());
>
You can pass PageReference to the page with the form and use it in
Form#onSubmit().
Page1.java:
setResponsePage(new FormPage(getPageReference()));
FormPage.java:
public FormPage(final PageReference pr) {
add(new Form() {
onSubmit() {
setResponsePage(pr.getPage());
}
});
}
You could make the address form have an abstract method to determine where to
redirect to. In the form submit call the abstract method The the page
constructor could take a param to tell which page to redirect to. Define the
abstract method on the page to do the redirect based on the parameter