8 Replies Latest reply on Oct 24, 2013 9:34 PM by bleathem

    a4j:ajax in richfaces 4

    senthilnz

      Hi,

       

      I was using a4j:support command in richfaces-3.3.3, as for richfaces 4 I changed that to a4j:ajax, it seems like its not rendering correctly. The a4j:ajax command is placed inside a rich:menuItem command and I had given value for the menuItem as 'Add user', here the 'Add user' value itself is not shown in the menu, instead its only showing a blank menu. If I click on the blank menu nothing is happening in the background.

       

      Here, I have pasted both versions for 3.3.3 and 4 code, In 3.3.3 it was working as normal.

       

      version 3.3.3 code,

       

      <rich:dropDownMenu xmlns="http://www.w3.org/1999/xhtml"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:a4j="http://richfaces.org/a4j"
          hideDelay="0" submitMode="none">

       

          <f:facet name="label">#{mr.ui.get('MR_USER')}</f:facet>
          <rich:menuItem value="Add #{mr.ui.get('MR_USER')}">
              <a4j:support action="#{mr.reset()}" event="onclick" oncomplete="#{rich:component('AddUser') )}.show()" reRender="User" />
          </rich:menuItem>
         
      </rich:dropDownMenu>

       

       

      version 4 code,

       

      <rich:dropDownMenu xmlns="http://www.w3.org/1999/xhtml"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:a4j="http://richfaces.org/a4j"
          hideDelay="0" submitMode="client">
          <f:facet name="label">#{mr.ui.get('MR_USER')}</f:facet>
              <rich:menuItem value="Add #{mr.ui.get('MR_USER')}">
                              <a4j:ajax event="click" oncomplete="#{rich:component('AddUser') )}.show()" reRender="User" >
                      </a4j:ajax>
          </rich:menuItem>
         
      </rich:dropDownMenu>