0 Replies Latest reply on Jan 14, 2008 7:50 AM by frank weber

    Problem: Emty toolbar menus

    frank weber Newbie

      Hi,

      I try to generate dynamic a toolBar. Here ist my xhtml page

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      
      <head>
      <title>EWS2</title>
      
      </head>
      <body>
      <f:view>
      
       <h:form>
      
      
       <div style="position:fixed; left: 130px;top: 33px;width: 620px;height: 10px;">
       <rich:toolBar rendered="#{(sessionBean.user != null)}">
       <a4j:repeat var="panel" value="#{sessionBean.user.panels}">
       <rich:dropDownMenu value="#{panel.panelName}">
       <a4j:repeat var="item" value="#{panel.items}">
      
       <rich:menuItem value="#{item.label}"/>
       </a4j:repeat>
       </rich:dropDownMenu>
       </rich:toolBar>
       <h:outputText value="#{item.label}"></h:outputText>
       </a4j:repeat>
       </div>
      
       </h:form>
      
      
      </f:view>
      </body>
      </html>
      


      On the page the dropDownMenu label is rendered. But the dropDownMenus are empty. The two repeat statements are working. If try it with a h:outputText outside the toolbar the labels are written.

      So my problem is why is the code above is not working and the dropDownMenu is empty. On mouse over a dropDownMenu only a little square appears.

      How to generate dynamic menus?

      There is although another effect. On executing the code above the dropDownMenus are rendered vertical. If you write the code by hand they are rendered horiontal. What's the difference between.

      Thanks,
      frank