7 Replies Latest reply on Oct 3, 2008 8:30 AM by j-pro

    rich:contextMenu ajax and server mode problems

    j-pro

      Good afternoon, dear RF gurus!

      Have faced two problems regarding rich:contextMenu used in rich:scrollableDataTable:

      1. Having submitMode="ajax", and using IE7(it works well in FF), I can't go to another page using navigation-rule. The view freezes on the same page after request sent. But JBoss logs last string as: "[org.ajax4jsf.webapp.BaseFilter] Finished request processing...." - just if it all went perfect. Can't understand.
      And again - it works well in FF 2.0.0.16.

      <a4j:outputPanel id="personnelDataTableForm_OutputPanel">
      <h:form id="personnelDataTable_Form">
      
      <rich:contextMenu attached="false" id="personnelDataTable_Menu" disableDefaultMenu="false" submitMode="ajax">
       <rich:menuItem value="#{muiBundle.commonEdit}" action="#{menuMan.editPersonnel}" reRender="personnelDataTableForm_OutputPanel" />
       <rich:menuItem value="#{muiBundle.menuDelete}" action="#{menuMan.deleteFakePersonnel}" reRender="personnelDataTableForm_OutputPanel"
       onclick="Event.stop(event||window.event); if (!confirm('Are you sure?') ) {return false;}" />
      </rich:contextMenu>
      
      <rich:scrollableDataTable id="personnelDataTable" rowKeyVar="rkv" binding="#{personnelSDTableMan.sdTable}" rows="0"
       selection="#{personnelSDTableMan.scrollableDataTableSelection}" onRowMouseOver="this.style.backgroundColor='#B5CEFD'"
       onRowMouseOut="this.style.backgroundColor='#{org.richfaces.SKIN.tableBackgroundColor}'" rowClasses="sdt_row1,sdt_row2"
       selectedClass="sdt_row_selected" activeClass="sdt_row_active" width="100%" height="400px" columnClasses="sdt_col" frozenColCount="1"
       value="#{amBean.employeeListMan.personnelEmployees}" var="employee" sortMode="single" style="margin:0px;padding-top:10px;">
      
       ...
      
       <rich:componentControl event="onRowClick" for="personnelDataTable_Menu" operation="show">
      
      </rich:scrollableDataTable>
      
      ...

      In editPersonnel() I just make needed actions to the bean and return String which is registered in faces-context.xml as navigation-rule to redirect to a edit page.


      2. Having submitMode="server", and using BOTH of IE and FF, I have the first problem solved, but the second one appears: message box with "Are you sure?" doesn't appear when I select "Delete" from context menu. The source is same as above except submitMode="server". This problem disappears if I use submitMode="ajax".


      Actually, I need submitMode="ajax" in this menu, because I don't need all page to reload when I delete an entry from the table. But the first problem can't let me use it properly. So the first case is much more important for me to solve than the second one. I hope you'll help me.

      Thank you in advance!

      P.S.: RF version is v.3.2.2.GA SVN $Revision: 8947 $ $Date: 2008-06-07 15:39:49 +0300 $ (btw, date should be a mistake on the server where it was bult ;))
      JBoss 4.2.3 GA
      JSF 1.2_07-b03-FCS
      Facelets 1.1.14