How to Set JSF Tag Attributes Dynamically

<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:a4j=" http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets">
  <a4j:outputPanel rendered="#{...}">
    <h:outputText value="First Value" />
  </a4j:outputPanel>
  <a4j:outputPanel rendered="#{!...}">
    <h:outputText value="Second Value" />
  </a4j:outputPanel>
</ui:composition>

Thanks to Sérgio for the correction to the original post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s