0 Replies Latest reply on May 28, 2008 7:10 AM by Ivan Cherkasov

    Problem with contexMenu on a modalPanel

    Ivan Cherkasov Newbie

      Context menu doesn't work.

      I'm using richfaces-3.2.0.SR1. I have a contextMenu like this:

      <rich:contextMenu id="myMenu" attached="false" submitMode="ajax" event="oncontextmenu">
       <rich:menuItem value="op1" action="#{myBean.op1}" reRender="grid"/>
      </rich:contextMenu>
      


      and a modalPanel like this:

      <rich:modalPanel id="myModal" autosized="true">
       <a4j:form reRender="myModal">
       <h:panelGroup id="gridPanel">
       <rich:scrollableDataTable id="grid"/>
       </h:panelGroup>
      
       <rich:componentControl attachTo="gridPanel" for="myMenu"
       event="oncontextmenu" operation="show"/>
       </a4j:form>
      </rich:modalPanel>
      


      I tried to place contextMenu into modalPanel form:

      <rich:modalPanel>
       <a4j:form>
       <rich:contextMenu/>
       </a4j:form>
      </rich:modalPanel>
      


      then I got "New node for ID ... is not present in response" error in a4j:log and modalPanel closes itself when I click on menu items.

      I also tried to place contextMenu in a separate form on a page:

      <h:form>
       <rich:contextMenu/>
      </h:form>
      <rich:modalPanel>
       <a4j:form>
       </a4j:form>
      </rich:modalPanel>
      


      but in this case contextMenu appears below the modalPanel.

      So, what is the proper way of using a contextMenu on a modalPanel?