I want to use custom attributes in standard JSF-components. Using or rather introducing a ResponseWriterWrapper as described here: Adding custom attribute (HTML5) support to JSF 2.0 UIInput component, doesn't work when the custom attribute's value is an EL expression.
I introduced a custom renderer class for the component t:div and use my ResponseWriterWrapper to render custom attributes. So when writing
<t:div data-role="collapsible" data-collapsed="false">
...
</t:div>
everything works fine!
But the following code doesn't work:
<t:div data-role="collapsible" data-collapsed="#{false}">
...
</t:div>
To be more detailed the attribute "data-collapsed" is not rendered because it is not part of the component's attribute list. I can see this when the component is passed to encodeBegin method.
Does somebody has an idea what's the reason for this and how I can solve this with a workaround or something?
Thanks in advance!