1 Reply Latest reply on Jun 25, 2009 8:26 PM by coldgin

    Adding Richfaces Dropdown Menu to seamgen menu.xhtml

    traviskds

      Hi,


      Does richface menuitems work with seam's slink? If not, how can I use richface's drop menu's with seam?


      Basically I have an application that was generated using seamgen. I changed the menu.xhtml which is under view/layout folder so that the generated slink is put under richface's menuitem. Whenever I use the link and create a new record, I get duplicate Id for a component edit error. When I remove the richfaces menuitems, it works fine.


      Any assistance is much appreciated.


      Example of what I changed in menu.xhtml:



       <h:form>
         <rich:dropDownMenu>
            <f:facet name="label">
               <h:panelGroup>
               <h:graphicImage id="edit" value="/img/admin.gif" styleClass="pic"/>
               <h:outputText value="Admin Options" styleClass="menuHeaderItems"/>
               </h:panelGroup>
            </f:facet>
                      
            <rich:menuItem submitMode="none">
              <s:link view="/SimpleEntityList.xhtml"
                         value="Simple Entity List"
                   propagation="none" styleClass="menuHeaderItems">
                   <f:param name="from"/>
              </s:link>
            </rich:menuItem>
      
          </rich:dropDownMenu>
        </h:form>


        • 1. Re: Adding Richfaces Dropdown Menu to seamgen menu.xhtml
          coldgin

          Yes, it works for me. In my case, I have the same thing that you have, but I took out the view and propagation attributes, and placed an action attribute on the tag. Then, in pages.xml, I intercept the action, end the conversation (you may not want to), and then redirect to another URL ( I don't know if this is what you want. My menu options take me out of the application):


          <rule if-outcome="redirectToApplication">
            <end-conversation before-redirect="true"/>
            <redirect view-id="/applicationSelectionRedirector.xhtml">
                      <param name="targetUri" value="#{param.targetUri}"/>
            </redirect>
          </rule> 



          I don't know if my suggestion does exactly what you need it to, but s:link does appear to work with RichFaces menus.