[ https://issues.apache.org/jira/browse/WICKET-6436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115682#comment-16115682 ]
Sven Meier commented on WICKET-6436: ------------------------------------ The factory method for IModel<Z> is correct, it's the model's duty to handle serialization of its model object (e.g. by nullifying its reference on detach). > Please add CompoundPropertyModel.of(T object) method > ---------------------------------------------------- > > Key: WICKET-6436 > URL: https://issues.apache.org/jira/browse/WICKET-6436 > Project: Wicket > Issue Type: Improvement > Components: wicket > Affects Versions: 8.0.0-M6 > Reporter: Kamil > Priority: Minor > > org.apache.wicket.model.Model has very convenient method: > {code} > public static <T extends Serializable> Model<T> of(T object) > {code} > Could you please add simmilar method : > {code} > public static <T extends Serializable> CompoundPropertyModel<T> of(final T > object) { > return new CompoundPropertyModel<>(object); > } > {code} > to org.apache.wicket.model.CompoundPropertyModel ? > By the way CompoundPropertyModel has already > {code} > public static <Z> CompoundPropertyModel<Z> of(IModel<Z> model) > { > return new CompoundPropertyModel<>(model); > } > {code} > method, where Z is not Serializable. Is this ok? -- This message was sent by Atlassian JIRA (v6.4.14#64029)