Hi, org.apache.wicket.model.ChainingModel.target [class=com.customer.Customer] This line says that there is a hard reference to Customer in ChainingModel
On Thu, Feb 28, 2013 at 10:53 PM, yka <i...@jcoder.de> wrote: > Hi all, > > my code looks like: > " > *private final transient Customer customer = new Customer(); > > public CreateCustomer() { > this("main"); > } > > public CreateCustomer(String string) { > init(); > } > > private void init() { > Form<Customer> form = new Form<Customer>("form", > new > CompoundPropertyModel<Customer>(customer)) { > > @Override > protected void onSubmit() { > customer.setCustomerNumber(3); > } > }; > form.add(new TextField<String>("name")); > add(form); > }* > " > > But when I render the page I get: > "*2013-02-28 21:49:33,641 ERROR > [org.apache.wicket.serialize.java.JavaSerializer] - <Error serializing > object class com.customer.CreateCustomer [object=[Page class = > com.customer.CreateCustomer, id = 0, render count = 1]]> > > org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream$ObjectCheckException: > The object type is not Serializable! > A problem occurred while checking object with type: com.customer.Customer > Field hierarchy is: > 0 [class=com.customer.CreateCustomer, path=0] > private java.lang.Object org.apache.wicket.MarkupContainer.children > [class=[Ljava.lang.Object;] > private java.util.List > > org.apache.wicket.request.mapper.parameter.PageParameters.namedParameters[2] > [class=org.apache.wicket.markup.html.form.Form, path=0:form] > java.lang.Object org.apache.wicket.Component.data > [class=org.apache.wicket.model.CompoundPropertyModel] > private java.lang.Object > org.apache.wicket.model.ChainingModel.target [class=com.customer.Customer] > <----- field that is causing the problem* > " > > > This is very confusing for me. The error message says that the Customer > instance is not serializable, although I marked the field as transient !! > > > Any suggestions? > > Cheers, > Y > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Serialzation-Problem-tp4656886.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>