[ 
https://issues.apache.org/jira/browse/TAPESTRY-1764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568216#action_12568216
 ] 

Howard M. Lewis Ship commented on TAPESTRY-1764:
------------------------------------------------

My concern here is that if the binding is used in multiple components 
(considering a mixin as a component), and yet cached in different variables of 
those components, it could easily end up with different values.

Thus, the Form component evaluates its binding and stores a value in a local 
instance variable.  The Magic mixin updates an instance variable and pushes the 
change through the binding. Now the Magic mixin has one value in an instance 
variable, the Form has another.  Which one is right?

Do we scrap the idea of local instance variables to store binding values?  Well 
there's a lot of value in keeping that, such as limiting how many times a value 
has to be type coerced, and allowing for unbound parameters to still act like 
fields.

So I think we need a solution where the instance variables of the Mixin are 
linked to the instance variables of the containing component through some 
additional mechanism I'm not sure of yet.

> provide access to component parameters from within mixins
> ---------------------------------------------------------
>
>                 Key: TAPESTRY-1764
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1764
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0.6
>            Reporter: Kristian Marinkovic
>
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to