On Mon, Jul 2, 2012 at 11:45 PM, Andre Schütz <[email protected]> wrote:
> Hello,
>
> I have a problem with the creation of a model in one of my pages.
> It works as follows:
>
> I have a link that uses setResponsePage(new MyPage(parameters)) on the click

I'd recommend to use setResponsePage(MyPage.class, parameters) instead
in this case. This way you will have a nice looking url and the page
may stay stateless if there are no stateful components/behaviors in
it.
If you know the parameters earlier then you can even use
BookmarkablePageLink("id", MyPage.class, parameters) - this will save
you a http redirect.

> with parameters as PageParameters.
> At the MyPage site, the constructor creates a:
> IModel<MyModel> model = new IModel<MyModel>() {
>   public void setObject ..
>   public MyModel getObject..
> }
>
> This variable is used to create a CompoundPropertyModel for a Form.
>
> The first time when I click on my link to the MyPage site, everything
> is fine. At the second time, the MyModel variable is not empty. The
> variable is filled with the selected values from the first time when
> I clicked on the link to the MyPage site.
>
> I do not understand this behavior. Normally, the MyModel variable
> should be empty and not filled with the last selection.
>
> Has someone an idea?
>
> Thanks,
> Andre
>
> --
> Andre Schütz <[email protected]>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to