2 Replies Latest reply on Nov 25, 2009 12:57 PM by cstefkivoila

    rich:contextMenu action in liferay portal

      Richfaes 3.3.0-GA
      Jboss portlet bridge beta6
      liferay 5.2.1


      When I right click for the context menu, menu appears but the action (when I hit on details menuitem) to the next page, instead of going to the detail jsf , it comes back to the same page:

      The above scenario is working if I change the following context parameters as defined below in web.xml. However if I change as below, the issue its is breaking ajax calls and also hits NotSerializableException. It is also not good to use client side state saving.

      Can anyone please adive.

      I am attaching the code in zip file too, incase you want to look at it.

      <context-param>
       <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
       <param-value>false</param-value>
       </context-param>
      
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>client</param-value>
       </context-param>
      
      


      
      <rich:tabPanel switchType="server">
      
       <rich:tab label="offer">
       <h:form>
      
       <rich:tree style="width:300px" value="#{sampleDetails.data}" var="item" nodeFace="#{item.type}"
       stateAdvisor="#{csoTreeStateAdvisor}">
      
      
       <rich:treeNode type="customer" iconLeaf="/images/customer.gif" icon="/images/customer.gif">
       <h:outputText value="#{item.name}" id="customerNode"/>
       </rich:treeNode>
      
       <rich:treeNode type="offer" iconLeaf="/images/product_e.gif" icon="/images/product_e.gif" id="offerNode">
       <h:outputText value="#{item.name}" />
      
       <rich:contextMenu event="oncontextmenu" attached="true" attachTo="offerNode" >
       <rich:menuItem value="$ #{item.recurringCharges} / month" ></rich:menuItem>
       <rich:menuItem value="$ #{item.oneTimeCharges}" />
      
       <rich:menuSeparator height="5"/>
       <rich:menuItem submitMode="server" value="Details" action="#{sampleDetails.details}"></rich:menuItem>
      
      
       </rich:contextMenu>
      
       </rich:treeNode>
      
       </rich:tree>
      
       </h:form>
       </rich:tab>
      
      
       </rich:tabPanel>
      
      





      Thanks
      Prasad

        • 1. Re: rich:contextMenu action in liferay portal

          the rich tree and context menu is working outside the portal, in the web app mode.

          Any clues/thoughts? Please advice as we are entering critical phase of the project. I want to get this scenario working desperately.

          It works if I change BUILD_BEFORE_RESTORE to false and STATE_SAVING_METHOD to client. but I cannot use it bcos its breaking the ajax calls and lot of other pages.

          Setting BUILD_BEFORE_RESTORE to true and STATE_SAVING_METHOD to server, I have all the pages of the application working perfectly except for the context menu action in rich:tree.

          PLease help.

          • 2. Re: rich:contextMenu action in liferay portal
            cstefkivoila

            What happens if you try to set BUILD_BEFORE_RESTORE to false and STATE_SAVING_METHOD to server?
            I just would like to know if the problem is BUILD_BEFORE_RESTORE or STATE_SAVING_METHOD.
            Cheers.