1 Reply Latest reply on Feb 24, 2008 7:04 AM by Dave Finch

    problem with datalist and menuitem

    Dave Finch Newbie

      Hi,
      I am trying to generate a toolbar dynamically. the dropdownmenus are being generated correctly but the menuitems are not.

      my code is as follows:

      <rich:toolBar width="650px" id="menu" style="margin-bottom:2px">
      <rich:dataList var="menuitem" value="#{menu.menuItems}" id="menudata">
      <rich:dropDownMenu value="#{menuitem.name}">
      <rich:dataList var="menusubitem" value="#{menuitem.children}" id="menusubdata">
      <rich:menuItem value="#{menusubitem.name}" />
      </rich:dataList>
      </rich:dropDownMenu>
      </rich:dataList>
      </rich:toolBar>

      (i know i have no actions but i want to get it rendering first)

      i know the data model is fine because the following code works fine:

      <rich:dataList var="menuitem" value="#{menu.menuItems}" id="menudata">
      <h:outputText value="#{menuitem.name}"></h:outputText>
      <rich:dataList var="menusubitem" value="#{menuitem.children}" id="menusubdata">
      <h:outputText value="#{menusubitem.name}"></h:outputText>
      </rich:dataList>
      </rich:dataList>

      hard coding the menuitems also works fine.

      I am quite new to JSF & Richfaces - i am missing something?

      Thanks in advance,
      Dave

      richfaces 3.1.4
      myfaces 1.1.5
      tomcat 5.5

        • 1. Re: problem with datalist and menuitem
          Dave Finch Newbie

          Hi,

          I have established that the symptoms are the same if i use Tomahawk's datalist in place of the datalist provided by richfaces, additionally the same thing still happens if i use the tomahawk jscookMenu with either datalist and t:navigationMenuItem but my menu works correctly if i use t:navigationMenuItems (which does not require the use of a datalist).

          this solution is not ideal because the whole point of using richfaces is to take advantage of the ajax features which are not provided by tomahawk.

          i am not sure if there is any shared code between richfaces and tomahawk or whether this is a bug (maybe in myfaces rather than richfaces).

          anybody got any ideas????

          Regards,
          Dave