Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Wicket serialization concerns

$
0
0
I could use some input from some of the more experienced Wicket users out there. I'm having a hard time fully understanding when to worry about Wicket attempting to serialize domain model objects, resulting in serialization warnings/errors in the logs. I had been under the impression that if I had an object as a field in a Wicket component, I needed to be on alert for serialization issues. So, if I have an object as a field, I make it a LoadableDetachableModel. In cases where I need to load in a wired object, I make use of the handy @SpringBean annotation. Otherwise, I assumed I was in the clear but I'm seeing now that's not the case.

In a method within a webpage component, I'm creating a List collection of domain objects for use in a form's DropDownChoice component. Unless I put that list in a LoadableDetachableModel, I will get a serialization error. I'm led to believe that creating a reference to any of my domain classes within a Wicket component (as a field or in a method implementation) will expose me to a serialization error unless I put it in a Wicket model. Am I correct about this?

Thanks!

Mike Chandler

Viewing all articles
Browse latest Browse all 5648

Trending Articles