3 Replies Latest reply on Jul 17, 2009 4:57 AM by Ronald van Kuijk

    extendedDataTable contextMenu

    Hans Dampf Newbie

      how to add a rich:contextMenu to this thing?
      the contextMenu item actions should refresh the data, that means, the extendedDataTable - and not the whole page - should be reRendered.
      this should work dependent on the selected rows of the Table (multiple lines are selected).

      I tried a lot of things , always problems.
      1. attached the menu directly to the table. table_group is an a4j:outputPanel that contains the extendedDataTable.

      <rich:menuItem reRender="table_group" submitMode="Ajax" value="Delete User" actionListener="#{users.delete}"
       id="menuItem_deleteUser">

      effect: reRendering the table stalls forever (server side methods in the backing bean are finished, the circle that indicates a refresh is drawn inside the table)
      2. attached it via rich:componentControl (attached to the table)
      effect: oncontextmenu action is ignored, how to intercept a right mouse button click to make this work? Other events aren't ignored
      3. attached it outside the panel, via attachTo="table_user" (the id of the table)
      effect: the menu item action is executed, but the table selection is not updated automatically, so the server can't determine, which data row is currently selected in the Browser and which rows to change. Is there a way for the Server to get the actual selection?
      4. like 3. but update of the table selection in the backing bean on server side via a
      <a4j:support event="onselectionchange" actionListener=".."/>
      attached to the extendedDataTable
      effect: server is notified via the actionListener about selection change, but if the menu item of the context menu is clicked reRendering the table stalls forever