tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Zeigler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TAP5-103) provide access to component parameters from within mixins
Date Fri, 17 Jul 2009 22:22:14 GMT

    [ https://issues.apache.org/jira/browse/TAP5-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732759#action_12732759

Robert Zeigler commented on TAP5-103:

Howard's comment above about cached values was definitely the biggest challenge in implementing
this.  What I wound up doing was making the component and mixins "listen" for changes to the
parameter value, and share the same binding.  So if a mixin writes a value, that value is
pushed back via write, and other mixins and the core component are notified via an internal
event, coordinated by the ParameterAccess object for the component's parameter.   As for "which
value is right": they all wind up with the same value, and it's a matter of "last one to set
the value is the winner".  This is one of the pieces that really drove me to implement TAP5-777
(mixin ordering), as well, so that you can have deterministic behavior when you have multiple
mixins (potentially) setting the same value.

> provide access to component parameters from within mixins
> ---------------------------------------------------------
>                 Key: TAP5-103
>                 URL: https://issues.apache.org/jira/browse/TAP5-103
>             Project: Tapestry 5
>          Issue Type: New Feature
>    Affects Versions: 5.0.15
>            Reporter: Kristian Marinkovic
>            Assignee: Robert Zeigler
> A mixin can't access the parameters of a component because the Bindings property of the
InternalComponentResourcesImpl class is private and the respective interface does not provide
a access method. 
> I was trying to create a mixin that would render only the value of a form element  (without
the tags) when it was in a certain state. There also might be use cases where mixins are used
to collect data from the components they are attached and therefore also needs access to the
components parameters.
> see threads:
> http://www.nabble.com/Antwort%3A--T5--how-to-read-the-value-of-a-component-parameter-within-a-mixin-tf4487995.html
> http://www.nabble.com/-T5--how-to-read-the-value-of-a-component-parameter-within-a-mixin-tf4487597.html

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message