Rendered attribute on p:tab in accordion does not work

UI Components for JSF
Post Reply
tdevos
Posts: 60
Joined: 29 Mar 2011, 09:12

02 May 2012, 15:16

Hi everyone,

When I use the following code:

Code: Select all

<p:accordionPanel value="#{tabBean.players}" var="player">  
    <p:tab title="#{player.name}" rendered="my_condition">  
...
whatever my_condition is (true or false), the tab will always be rendered. The problem only seems to arise when using a collection like in the Data Model Showcase example.

Am I doing something wrong?

Regards,

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

02 May 2012, 17:32

Yes, you're doing something wrong, per this 'my_condition' that you have documented in your code sample below.

Code: Select all

<p:tab title="#{player.name}" rendered="my_condition"> 
Search forum, google.com or stackoverflow.com and look for people's code samples of how to code rendered="...". Also, provide actual rendered="..." code.

viewtopic.php?f=3&t=1194
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 35 guests