[ 
https://issues.apache.org/jira/browse/WICKET-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772009#action_12772009
 ] 

Pedro Santos commented on WICKET-2547:
--------------------------------------

Your last consideration don't make sense. I'm not talking about change the 
default behavior of listview component, or any component at all.
My wish is for have an clear possibility of to have an component that doesn't 
inherit models. I understand your concern about don't increase the model logic 
complexit and real case usages.

About complexity:
If an framework has an interface like IComponentInheritedModel, is no 
difficulty to understand why it has an interface like 
IProtectMeFromInheritedModel

Use case:
An panel to be operated from an journalist reporting an soccer game. This panel 
has 22 players components. Each component has an fouls component, that has foul 
descriptions components. During the game, only a few players will commit an 
foul (men, I'm creating this use case right now). So, why to create 22 models 
for all fouls panels? If an player start make fouls, then the journalist click 
at "add foul link", then I add an model to this component, then an list (...)
With current models logic, I can't create an players panel with an optimal 
memory usage, due I can't have fouls components without an model. Because I 
can't have sure that the players panel will not to be added at an component 
that has an IComponentInheritedModel


> 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.

Reply via email to