9 Replies Latest reply on Dec 3, 2007 3:37 AM by au lai seong

    ajaxSingle vs <a4j:ajaxRegion>

    Mike Quilleash Newbie

      Hi all,

      Could someone explain what the different bettwen ajaxSingle and <a4j:region> is please.

      I have a simple form with two <h:selectOneMenu> items. I want one to change its contents based on the selection of the other.

      I did the following:

      <h:selectOneMenu ...>
       <a4j:support event="onchange" reRender="menu2" ajaxSingle="true"/>
      </h:selectOneMenu>
      
      <h:selectOneMenu id="menu2" .../>
      


      And it was still validating and updating the model for menu2.

      When I changed it to the following it worked as expected.

      <a4j:region renderRegionOnly="false">
       <h:selectOneMenu ...>
       <a4j:support event="onchange" reRender="menu2" ajaxSingle="true"/>
       </h:selectOneMenu>
      </a4j:region>
      
      <h:selectOneMenu id="menu2" .../>
      


      With only the first menu getting its model updated. I'm not sure what ajaxSingle does then? Am I missing something?

      Cheers.

      Mike.