On Mon, Jul 2, 2012 at 4: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
> 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]
>
>
You'd need to show more code for us to be more helpful. I'm suspecting
that you are clicking a stateful link on that page, which means of course
that your constructor will not be called again.
--
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket? Use Brix! http://brixcms.org*