2 Replies Latest reply on Apr 1, 2010 6:33 AM by mcremolini

    Problems with rich:contextMenu on rich:treeNode in IExplorer

      Hi,

       

      my application uses  an object rich:recursiveTreeNodesAdaptor.

      On each node is presented an object rich:contextMenu.

      For each item  included in the context menu is an associated a different action.

      On Firefox browser the actions requested  are executed correctly but on  IExplorer are not fired.

      It seems that an event  such OnSelected is fired on the node itself; that are not required in my tree and does  not do anything....

       

      This the code.

      Thanks for support me!

       

      Matteo

       

      <rich:tree id="mittDestTree" switchType="ajax"
                              ajaxSubmitSelection="true" ajaxSingle="false"
                              iconLeaf="/images/users_grp.gif" icon="/images/users_grp.gif"
                              iconCollapsed="/images/tree/collapsed.gif"
                              iconExpanded="/images/tree/expanded.gif"                       
                              reRender="treePanel" status="ajaxStatus" >

           <rich:recursiveTreeNodesAdaptor
                roots="#{alfrescoInsertProtocolBean.mittViewBean.sourceRoots}" var="currItem"
                nodes="#{currItem.nodes}" >


                 <rich:treeNode id="nodo">
                        <h:outputText value="#{currItem.mittDest.descr_unita}" />

       

                          <rich:contextMenu event="oncontextmenu" attached="true" id="testmenu"

                             submitMode="ajax">

       

       

                             <rich:menuItem value="Seleziona unita'"

                                 rendered="#{sdp:enableSelection(caso,idUnitaRoot,currItem.mittDest.currRegAssoc)}"

                                 reRender="tabellaUtentiSelected"

                                 action="#{mittDestViewBean.addUnita}">

                                 <f:facet name="icon">

                                     <h:graphicImage value="/images/View_details.gif"

                                         style="border: none;" />

                                 </f:facet>

       

       

                             </rich:menuItem>

       

              <rich:menuItem value="Unita' non selezionabile"

                  rendered="#{!sdp:enableSelection(caso,idUnitaRoot,currItem.mittDest.currRegAssoc)}">

                 ...............

              </rich:menuItem>

       

       

              <rich:menuItem value="Visualizza mitt-dest"

                .............

              </rich:menuItem>

          </rich:contextMenu>

       


                                  </rich:treeNode>
                              </rich:recursiveTreeNodesAdaptor>
                    

        • 1. Re: Problems with rich:contextMenu on rich:treeNode in IExplorer
          ilya_shaikovsky

          does you mean that the problem is that tree node gets selected after you clicking the menu item? And it causes ajax request to be sent?

           

          then maybe you could ajaxSubmitSelection="false"  if you talking that OnSelected is fired on the node itself; that are not required in my tree and does  not do anything....

           

          Or I'm missing somthing?

           

          B.t.w. in order to synchronize calling the menu and selection setting you could use rightClickSelection attribute of the tree component.

          • 2. Re: Problems with rich:contextMenu on rich:treeNode in IExplorer

            hi,

             

            i set ajaxSubmitSelection="false" and now work correctly.

             

            is amazing, soo sure I tried  this attribute in the past without success.

            The problem is that browser cache must always be emptied  of any changes. You  know how to suggest without having to do it manually?
            Thanks

             

            Matteo