[
https://issues.apache.org/jira/browse/WICKET-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Vaynberg resolved WICKET-2547.
-----------------------------------
Resolution: Won't Fix
first of all, this really smells to me like premature optimization.
second, then like you said, override initmodel and do whatever kind of
optimization you want there. it is either override initmodel or implement an
interface, in either case you need to make a change to the component.
and because this is a pretty rare requirement, eg in 4? years wicket has been
around no one asked for this and we had inheritable models since release 1, i
think the burden should be on the user to implement initmodel and not on
everyone else to know what the extra interface is all about.
if you disagree you are welcome to take this to the mailing list and discuss
further there.
> 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.