[
https://issues.apache.org/jira/browse/WICKET-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771978#action_12771978
]
Pedro Santos commented on WICKET-2547:
--------------------------------------
I didn't note before.
1 - There is no good reason to force listview to always have an model. If I
want set an model with an list on it at the fourth time it get rendered, what
is wrong? This is just my component complexity.
2 - The getViewSize implementation can lost lines like:
if (modelObject == null)
{
return size == Integer.MAX_VALUE ? 0 : size;
}
then the listview design will be cleaner
Actually the component is prepared to get rendered without an model. The
original request is: framework, please don't put an model on my component, even
if I call getDefaultModel.
> IComponentInheritedModel rule exception
> ---------------------------------------
>
> Key: WICKET-2547
> URL: https://issues.apache.org/jira/browse/WICKET-2547
> Project: Wicket
> Issue Type: Wish
> Reporter: Pedro Santos
> Assignee: Igor Vaynberg
>
> Environment: I'm developing an component that don't has(don't need too) an
> IModel, and I can't make sure that it wont be add in an component with an
> IComponentInheritedModel.
> Problem: I want make sure that the component I developed will not receive an
> wrapped model.
> Why: to prevent unnecessary objects, and the exception
> org.apache.wicket.WicketRuntimeException: No get method defined for class(...)
> when some parent is using CompoundPropertyModel for example
> Current solution: override component initModel method to don't search from
> parents IComponentInheritedModel
> Wish solution: implement an marker interface like IPleaseDontGiveMeAnyModel
> to my component. Based on that mark, the framework don't give my component an
> generated model etc...
> Why: I think the my component code will be cleaner
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.