3 Replies Latest reply on Apr 21, 2008 4:38 AM by Ilya Shaikovsky

    Richfaces 3.2.0 SR1: oncomplete of a4j:commandLink not invok

    Michael Knapp Newbie

      A strange problem occurred:

      oncomplete of a4j:commandLink is not invoked if item to rerender contains a rich:contextmenu element

      This little code sample shows this behavior
      problem also exists with a4j:commandButton

      <f:view>
       <h:form>
       <a4j:commandLink value="Rerender without rich:contextmenu" oncomplete="alert('Rerendered without rich:contextmenu');" reRender="test1" />
       <br />
       <a4j:commandLink value="Rerender with rich:contextmenu" oncomplete="alert('Rerendered with rich:contextmenu')" reRender="test2" />
      
       <a4j:outputPanel layout="block" id="test1" >
       <div id="out1" />
       <script type="javascript/text">
       document.getElementById('out1').innerHTML = new Date().getTime();
       </script>
       </a4j:outputPanel>
      
       <a4j:outputPanel layout="block" id="test2" >
       <div id="out2" />
       <script type="javascript/text">
       document.getElementById('out2').innerHTML = new Date().getTime();
       </script>
       <rich:contextMenu attached="false" id="viewerPanelContextMenu" submitMode="ajax">
       <rich:menuItem value="Test" submitMode="none" />
       </rich:contextMenu>
       </a4j:outputPanel>
       </h:form>
      </f:view>