1

I would like to have a group of components that are rendered only when a certain condition is met. Something like this:

<p:ajax event="select" update=":containerEditorForm:eventTabs:actionProperties"/>

...

<p:column>
    <p:outputPanel id="actionProperties">
        <p:outputPanel rendered="#{commandBean.eventList.activationActionTree.selectedNode ne null}">
            <p:message>message1</p:message>
            <p:message>message2</p:message>
        </p:outputPanel>
    </p:outputPanel>
</p:column>

The above solution works fine, but is it really necessary to have two outputPanel components, or some other container components, to make this possible? (The outer panel having the id attribute, and the inner panel having the rendered attribute.) Ideally, I would use id and rendered in the same element, but this doesn't seem to work.

Ariod
  • 5,757
  • 22
  • 73
  • 103
  • 3
    look here for a detailed explanation http://stackoverflow.com/questions/4573190/jsf-primefaces-update-attribute-does-not-update-component – Daniel Feb 23 '12 at 15:43

1 Answers1

1

You use JSF tag for rendering component like as i mention this is work with id.

<h:panelGroup rendered="#{bean.id > 0}" id="hello">
Ghanshyam
  • 83
  • 1
  • 2
  • 8
  • This is not what the OP is asking. Check the duplicate question link which Daniel has posted. – BalusC Feb 24 '12 at 12:04