incubator-isis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Meyer - KMZ" <>
Subject Wicket and Isis and passing domain objects...
Date Mon, 18 Apr 2011 18:36:58 GMT
Hi Dan, I guess this one is for you...

I'm playing around with creating a custom view using Wicket, to take 
advantage of the Wicket Palette form component.

I have a simple class (Tag) which basically just extends 
AbstractDomainObject and has a single String member (called 

In the palette contructor, I have to pass in a IModel choicesModel.

If I use the java.util.List that is returned by allInstances, I get a "Unable 
to serialize class" exception, complaining:

[class=dom.todo.Tag$$EnhancerByCGLIB$$b459b0e9] <----- field that 
is not serializable

The palette is still rendered, though. I have not yet put in any handlers 
to try and receive the choices list and adjust the eventual target 

I wanted to ask: What do you recommend I use to hold, store, and 
retrieve the collection of domain objects that are to be manipulated 
using the wicket Palette component?

Should I use a collection of a simple wrapper class (that is not 
persisted, etc), that represents the domain object as just an integer ID 
(sequence?) and a title?  I can see advantages to not passing the 
"live" domain object for serialisation by Wicket. For a first pass, I will 
assume that the ID is just the index of the objects in the returned 
 ...So far this seems to work (i.e. it does not throw a "not serializable" 


View raw message