0 Replies Latest reply on Jul 5, 2011 6:25 PM by Pablo S

    problem with c:forEach and panelMenu

    Pablo S Newbie



      I want to generate dynamically panelMenuGroups http://livedemo.exadel.com/richfaces-demo/richfaces/panelMenu.jsf?c=panelMenu&tab=usage (to start then I will try to put items within)  using "<c:forEach" but I can't do it.

      (I'm using richfaces 3.2.1)


      I paste the code below:



           <h:panelGrid columns="1" width="400">

                <rich:panelMenu style="width:200px"

                       iconExpandedGroup="disc" iconCollapsedGroup="disc"

                       iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"


                       <c:forEach items="#{Log.logsarray}" var="logarr">

                            <rich:panelMenuGroup name="#{logarr.getSn}" >

                                 <f:facet name="label">

                                      <h:panelGrid columns="1">

                                           <h:outputText value="#{logarr.getSn}" />                                                   










      private LogsLocal [] logsarray;


      public LogsLocal[] getLogsarray() {

              try {

                  Collection<LogsLocal> logs = Ejb.lookupLogsBean().findAll();

                  logsarray = logs.toArray(new LogsLocal [logs.size()]);



              } catch (FinderException ex) {

                  Logger.getLogger(LogBean.class.getName()).log(Level.SEVERE, null, ex);


              return logsarray;



      In the output doesn't appear any error, and on the page it shows only a panelMenuGroup without name.

      I'm new in this but I think that is strange when I write logarr.ge and then I press ctrl+space the IDE doesn't show like a suggestion getSn so maybe the problem could be related with that.


      Thanks in advance