[
https://issues.apache.org/jira/browse/TAP5-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636690#action_12636690
]
Robert Zeigler commented on TAP5-103:
-------------------------------------
I think Howard's idea of linking mixin parameters to component parameters
sounds cool. Could this be done as a set of chained bindings? So, the page has
a property "foo" bound to the component a's "value" parameter. Mixin B does
something like:
@InheritParameter
private Object value;
Now, the binding is altered so that:
foo => mixinb.value => componenta.value
So a change to componenta.value would propagate to mixinb.value and from there
be pushed to to the page's foo property?
This might break down with multiple mixins, unless you chained them all
together, in the order that they're defined for the component, perhaps:
foo => mixina.value => mixinb.value => mixinc.value => componentd.value
Not sure how feasible this is.
But this is definitely a crippling issue for mixins. Mixins have the potential
to be really cool, but as they stand now, they're only sorta cool, because many
of the more interesting things you would want to do with them require access to
the underlying component's parameters.
> 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: Bug
> Affects Versions: 5.0.15
> 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]