[
https://issues.apache.org/jira/browse/TAPESTRY-1764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568625#action_12568625
]
Kristian Marinkovic commented on TAPESTRY-1764:
-----------------------------------------------
my original intend was to create mixins that could use the parameters of the
component to decide further actions. a very concrete example is a EnableDisable
mixin that
would render only the value of a disabled TextField (i know there is a
disabled parameter but if enabled it will still render the whole input element;
applications with many input fields and high traffic will profit from the
reduced page size).
therefore i'd be more than satisfied to have an read-only access to the
parameter binding from within a mixin. i'm aware that the value of the
parameter could be changed by the component but that's ok with me :) because
the rendering phases (after/before and MixinAfter) give you a hint on whether
the value could have been changed by the component.
for me mixins are a great way to add additional (maybe cross-cutting) behavior
to a component regarding visual appearance and functionality on the
client-side. I do not see mixins as a way to add business logic such as
mentioned by kevin.... i think Validators and Translators are more suitable for
this.
> 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]