In JSF 2.2, I have a custom composite component which wraps a vanilla component (let's say a h:commandLink).
Is it possible to add passthrough attributes on my composite component and pass them back to the wrapped component?
Something like this (it's an example, don't bother about its uselessness):
Declaration of my:commandLink:
<cc:interface>
<cc:attribute name="text" type="java.lang.String" />
</cc:interface>
<cc:implementation>
<h:commandLink a:magicInsertionOfAllThePassThroughAttributes>
#{cc.attrs.text}
</h:commandLink>
</cc:implementation>
Use of my:commandLink:
<my:commandLink text="oh no" a:data-something="…" a:data-otherthing="…" />
myCommandLinkthat all automatically mapped to the existing attributes of theh:commandLink? - Kukeltjemy:commandLinkto the wrappedh:commandLink- Xavier Porteboisdata-for jQuery behaviors, for example). I didn't find anything useful on google even with a component java class. I'm curious to know what you find :) - Xavier Porteboisf:passThroughAttributetag and add thedata-prefix to them. (there is af:passTroughAttributestoo (plural) but I did not find acc.passThroughAttrsanywhere - Kukeltje