You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by yka <in...@jcoder.de> on 2013/03/01 07:40:25 UTC

Re: Serialzation Problem

Ok,
but what exactly does that mean?
And how can I avoid the chaining problem?
I think the code is pretty forward and I dont know what I did wrong.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Serializable-Problem-tp4656886p4656891.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Serialzation Problem

Posted by Sven Meier <sv...@meiers.net>.
A non-serializable object must not be referenced by a component 
hierarchy and its models:

In your case:

CreateCustomer
-> Form
....-> CompoundPropertyModel
........-> Customer

One possibility is to use a LDM:

private final IModel<Customer> customer = new 
LoadableDetachableModel<Customer>() {
   public Customer load() {
     return new Customer();
   }
};

Note however that this creates a new Customer for each incoming request. 
For simple forms this might be sufficient though.

Hope this helps
Sven


On 03/01/2013 07:40 AM, yka wrote:
> Ok,
> but what exactly does that mean?
> And how can I avoid the chaining problem?
> I think the code is pretty forward and I dont know what I did wrong.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Serializable-Problem-tp4656886p4656891.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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