[
https://issues.apache.org/jira/browse/WICKET-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669279#action_12669279
]
Igor Vaynberg commented on WICKET-2064:
---------------------------------------
the usecase that drove this was:
suppose you have a formcomponentpanel that contains a bunch of form components:
panel->fc1 parent->fc2 parent->fc3
if you disable panel then fc1,fc2,fc3 should also be disabled, the way this
works now once the enabled of panel has been determine to be false when
fc1.isenabledinhierarchy() called, then the checks for fc2 and fc3 are cheap
because they are a single lookup to the parent because panel itself has cached
that it is disabled/enabled (in this case disabled). this is why the current
implementation works the way it does. makes ense?
> Make Component.ENABLED_IN_HIERARCHY_CACHE_KEY a instance variable rather than
> a MetaDataKey
> -------------------------------------------------------------------------------------------
>
> Key: WICKET-2064
> URL: https://issues.apache.org/jira/browse/WICKET-2064
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4-RC1
> Reporter: Juergen Donnerstag
> Priority: Minor
>
> Component.ENABLED_IN_HIERARCHY_CACHE_KEY currently is a MetaDataKey which get
> added to each Component if isEnableInHierarchy is invoked. That basically
> happens all the time. In contrast the concept of MetaData has been introduced
> to allow rarely used data to be attached to Components (with java 1.5 in a
> typesafe manner). Since MetaData introduce some overhead, and for simplicity
> reasons, I'd suggest to convert Component.ENABLED_IN_HIERARCHY_CACHE_KEY into
> a Boolean instance variable.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.