I want to use the rendered
attribute in a ui:fragment
to conditionally render a span
element in my JSF 2.2 facelet. The JSF 2.2 documentation of ui:fragment lists rendered
as an allowed attribute. I am using MyFaces 2.2.12 as JSF implementation, however, and the MyFaces 2.2 documentation of ui:fragment does not list rendered
as a valid attribute.
I tried using rendered
anyway, and it worked. However, my IDE - IntelliJ - rightly highlights the rendered
attribute as an error and tells me it is not allowed in the ui:fragment
element.
I saw a response in ui:fragment rendered attribute not working after upgrading Facelets to JSF 2 that there was a documentation bug where rendered
falsly wasn't listed in the JSF 2.0 documentation, but the response says nothing about JSF 2.2 or MyFaces 2.2 (presumably because it dates before the release of JSF 2.2).
Is the missing rendered
attribute in the MyFaces documentation also just a bug?
With multiple such occurances of the ui:fragment
element in a single Facelets file, these "false" errors make finding real errors quite cumbersome. What is the recommended solution for this problem, if it really is just a bug in the documentation?
rendered
attribute. It just concerns me a little that the this documentation bug got fixed in the Mojarra documentation (since version 2.1?), but not in the MyFaces 2.2 documentation. – scholtAdd "rendered" attribute to VDL docs for ui:component and ui:fragment.
. So MyFaces seems not to have properly updated this part too. – Xtreme Biker