[
https://issues.apache.org/jira/browse/WICKET-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572570#action_12572570
]
Scott Swank commented on WICKET-1327:
-------------------------------------
Because the ExpressionBuilder has a cglib proxy it is not Serializable. This
means that we want to evaluate the expression and serialize the resulting
String. Because we don't know when the recording is complete, we need to hook
into the jvm's serialization process via writeObject() to ensure that we have a
String instead of an ExpressionBuilder.
String getPropertyExpression()
{
// If not yet evaluated, then do so now and then
// discard the expression builder since it is no longer useful
// and is not Serializable
if (propertyExpression == null)
{
propertyExpression = expressionBuilder.eval();
expressionBuilder = null;
}
return propertyExpression;
}
private void writeObject(ObjectOutputStream out) throws IOException
{
// PropertyExpressionBuilder is not serializable, but the
String it
// generates is. Hence we must call getPropertyExpression()
before
// serialization.
getPropertyExpression();
out.defaultWriteObject();
}
> CompoundModel backed by cglib proxies
> -------------------------------------
>
> Key: WICKET-1327
> URL: https://issues.apache.org/jira/browse/WICKET-1327
> Project: Wicket
> Issue Type: New Feature
> Components: wicket
> Reporter: Scott Swank
> Priority: Minor
> Fix For: 1.4-M1
>
> Attachments: matej_and_johan_great_work_in_thailand.jar, Model.zip
>
>
> This is a simple model that lets cglib handle building the propertyExpression.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.