You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stanczak Group <ju...@stanczakgroup.com> on 2007/10/04 18:26:34 UTC

Going back after save or cancel method?

I have a classic list and edit page setup. You select an object that you 
then pass to the edit page. My hang up is how to I return the user to 
the list page, if the list page took a constructor parameter so it knows 
what to list? In other words the list page has a constructor parameter, 
so how can I just send the user back to the list page in it last state?

-- 
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke


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


Re: Going back after save or cancel method?

Posted by Stanczak Group <ju...@stanczakgroup.com>.
Great, thanks.

Martijn Dashorst wrote:
> pubic class ListPage {
>     ...
>         @override void onClick() {
>             setResponsePage(new EditPage(getModelObject(), ListPage.this));
>         }
> }
>
> public class EditPage {
>     private Page previousPage;
>     public EditPage(Foo edit, Page back) {
>         previousPage = back;
>
>         ...
>             @override protected void onSubmit() {
>                 setResponsePage(previousPage);
>             }
>      }
> }
>
> On 10/4/07, Stanczak Group <ju...@stanczakgroup.com> wrote:
>   
>> I have a classic list and edit page setup. You select an object that you
>> then pass to the edit page. My hang up is how to I return the user to
>> the list page, if the list page took a constructor parameter so it knows
>> what to list? In other words the list page has a constructor parameter,
>> so how can I just send the user back to the list page in it last state?
>>
>> --
>> Justin Stanczak
>> Stanczak Group
>> 812-735-3600
>>
>> "All that is necessary for the triumph of evil is that good men do nothing."
>> Edmund Burke
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
>
>   

-- 
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke


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


Re: Going back after save or cancel method?

Posted by Martijn Dashorst <ma...@gmail.com>.
pubic class ListPage {
    ...
        @override void onClick() {
            setResponsePage(new EditPage(getModelObject(), ListPage.this));
        }
}

public class EditPage {
    private Page previousPage;
    public EditPage(Foo edit, Page back) {
        previousPage = back;

        ...
            @override protected void onSubmit() {
                setResponsePage(previousPage);
            }
     }
}

On 10/4/07, Stanczak Group <ju...@stanczakgroup.com> wrote:
> I have a classic list and edit page setup. You select an object that you
> then pass to the edit page. My hang up is how to I return the user to
> the list page, if the list page took a constructor parameter so it knows
> what to list? In other words the list page has a constructor parameter,
> so how can I just send the user back to the list page in it last state?
>
> --
> Justin Stanczak
> Stanczak Group
> 812-735-3600
>
> "All that is necessary for the triumph of evil is that good men do nothing."
> Edmund Burke
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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