Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I finally managed to get it work with jsp iteration tags and changing the actionListener attributes of menuitem tags for action attributes. Here is my code:</p> <pre class="lang-xhtml prettyprint-override"><code> &lt;h:panelGroup id="Texto_Header"&gt; &lt;h:form&gt; &lt;p:toolbar&gt; &lt;p:toolbarGroup&gt; &lt;!-- Operaciones de aplicación --&gt; &lt;c:forEach items="#{logedBean._apps}" var="opBean"&gt; &lt;!-- MAIN OPERATION --&gt; &lt;h:panelGroup rendered="#{opBean._Clickable}"&gt; &lt;p:commandButton value="#{opBean._Nombre}" action="#{opBean.actionOperationClick}" update=":linkPanel" /&gt; &lt;/h:panelGroup&gt; &lt;!-- OPERATION WITH SUBOPERATIONS --&gt; &lt;h:panelGroup rendered="#{!opBean._Clickable}"&gt; &lt;p:menuButton value="#{opBean._Nombre}"&gt; &lt;c:forEach items="#{opBean._subOperaciones}" var="opBean2"&gt; &lt;p:menuitem value="#{opBean2._Nombre}" action="#{opBean2.actionOperationClick}" update=":linkPanel" /&gt; &lt;/c:forEach&gt; &lt;/p:menuButton&gt; &lt;/h:panelGroup&gt; &lt;/c:forEach&gt; &lt;/p:toolbarGroup&gt; &lt;/p:toolbar&gt; &lt;/h:form&gt; &lt;/h:panelGroup&gt; </code></pre> <p><strong>EDITED</strong></p> <p>It has to be with jsp tags because <a href="http://www.primefaces.org/showcase/ui/toolbar.jsf" rel="nofollow noreferrer">Primefaces Toolbar</a> doesn't have specific model to be integrated in a backing bean in order to be built during page rendering. So it has to be in page build. Similar was happening with <a href="http://www.primefaces.org/showcase/ui/tabviewHome.jsf" rel="nofollow noreferrer">Primefaces TabView</a> but they managed to solve it and now tabView has a built-in iterator. Take a look to a related cuestion.</p> <p><a href="https://stackoverflow.com/a/4057370/1199132">https://stackoverflow.com/a/4057370/1199132</a></p> <p><strong>EDITED 2</strong></p> <p>New PF MenuModel seems to solve this kind of issue at all. It will be able to build the menu programatically at the bean. Available from 4.0.</p> <p><a href="http://blog.primefaces.org/?p=2594" rel="nofollow noreferrer">http://blog.primefaces.org/?p=2594</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload