Display a JSF value depending on a condition
<p>I have an <code>accordionPanel</code> as following :</p>

<pre><code>&lt;p:accordionPanel value="#{bean.list}" var="entry" 
    dynamic="true" cache="true"&gt;
    &lt;p:tab title="#{entry.alias}"&gt;
        &lt;h:panelGrid columns="2" cellpadding="10"&gt;
            &lt;h:outputText value="#{entry.text}" /&gt;
        &lt;/h:panelGrid&gt;
    &lt;/p:tab&gt;
&lt;/p:accordionPanel&gt;
</code></pre>

<p>And in my Managed Bean I initialise two lists :</p>

<pre><code>public void init(){
    acceuil = 1;
    salles = salleService.listSalles();
    appareils = appareilService.list();
}
</code></pre>

<p>I'm using the <code>acceuil</code> variable so when I have it set to <code>1</code> I'll use the <code>salles</code> list in my <code>accordionPanel</code> in the other hand, if I have it set to <code>2</code> I'll use the <code>appareils</code> list in my <code>accordionPanel</code> (notice that appareil and salle objects have the same attributes <code>alias</code> and <code>text</code> but they dont have a commun class where they extend from).</p>

<p>So in my jsf page I want to do something like this :</p>

<pre><code>value="#{bean.acceuil == 1 ? bean.salles : bean.appareils}"
</code></pre>

<p>How can I do this ?</p>