[
https://issues.apache.org/jira/browse/WICKET-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771984#action_12771984
]
Igor Vaynberg commented on WICKET-2547:
---------------------------------------
the listview is designed to work with a model. if you want to have an empty
listview then give it a model that will provide an empty list, and on the 4th
render change the empty list to a list that contains items.
if a component is designed to work with a model then it is your responsibility
to provide it one.
your proposal does not really make sense, and i still do not have a good feel
for when you would actually want something like this. models and model
resolution is already complex enough to warrant only adding new features that
add complexity when they completely make sense. so far you have not explained
clearly what concrete usecase would require this.
while you think this request makes sense to you, you have to consider how it
will impact thousands of other users. if a component that uses this feature is
released into the wild then everyone has to know about it otherwise they will
be scratching their heads trying to figure out why a component inside this one
is not getting an inherited model, etc.
> 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.