Conversation
Notices
-
Roland Häder (roland)'s status on Wednesday, 24-Aug-2016 11:48:16 CEST Roland Häder Improving my !java #javaee application by replacing ...
<h:outputText styleClass="errors" value="#{msg.ADMIN_LIST_LAND_LINE_EMPTY}" rendered="#{phoneController.allLandLineNumbers().isEmpty()}" />
... with ...
<ui:fragment rendered="#{phoneController.allLandLineNumbers().isEmpty()}">
<ui:include src="/WEB-INF/templates/generic/message_box.tpl">
<ui:param name="message" value="#{msg.ADMIN_LIST_LAND_LINE_EMPTY}" />
<ui:param name="styleClass" value="errors" />
</ui:include>
</ui:fragment>
Yes, the ugly ui:fragment is being (ab-)used here. But as I wrote before, I'm in big need of a #JSF tag that only renders the body, if "rendered" equals true.