I am upgrading a project from JSF1.2/Facelets1.1 to JSF2.1 with built in facelets. The following no longer works and I don't know why. Both ui:fragments apparently evaluate to true, and both the link version and the plain text version are rendered:
<ui:fragment rendered="#{rootcauseid ne rc.id}">
<a href="#{request.contextPath}/viewrootcause.jsf?rootcausenum=#{rc.id}">Root Cause #{rcRowCounter + 1}</a>
</ui:fragment>
<ui:fragment rendered="#{rootcauseid eq rc.id}">
<h:outputText value="Root Cause #{rcRowCounter + 1}"/>
</ui:fragment>
The following does work, so I have a valid workaround.
<h:panelGroup rendered="#{rootcauseid ne rc.id}">
<a href="#{request.contextPath}/viewrootcause.jsf?rootcausenum=#{rc.id}">Root Cause #{rcRowCounter + 1}</a>
</h:panelGroup>
<h:outputText value="Root Cause #{rcRowCounter + 1}"
rendered="#{rootcauseid eq rc.id}"/>
But why doesn't the ui:fragment version work? What has changed about Facelets and JSF that would make a difference? Is "ui:fragment rendered='...'" no longer a valid idiom?