Sure.....
Originally I had it set up like....
(note that userModel is a LDM which wraps a SystemUser. SystemUser contains
a collection of Contact objects).
final WebMarkupContainer listContainer = new
WebMarkupContainer("listContainer");
ListView displayList = new ListView("contactsList",
userModel.getObject().getContacts()){
@Override
protected void populateItem(final ListItem item) {
Contact contact = (Contact)item.getModelObject();
item.add(new Label("contactName", contact.getName()));
etc etc
This was producing the original error....
AbstractPersistentCollection.owner [class=com.myapp.domain.SystemUser]
<----- field that is not serializable
I then tried.....
final WebMarkupContainer listContainer = new
WebMarkupContainer("listContainer");
ListView displayList = new ListView(
"contactsList", new PropertyModel(userModel.getObject(),
"contacts")){
@Override
protected void populateItem(final ListItem item) {
item.add(new Label("contactName",
((Contact)item.getModelObject()).getName()));
etc etc
And was getting
private java.lang.Object
org.apache.wicket.model.AbstractPropertyModel.target
[class=com.pyso.domain.SystemUser] <----- field that is not serializable
I'm assuming, from the PropertyModel.
jwcarman wrote:
>
> How about sharing some code with us as to how you're setting up your
> models?
>
>
--
View this message in context:
http://www.nabble.com/Loadable-detachable-collections--tp19685949p19693132.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]