1 Reply Latest reply on Jun 22, 2011 3:56 PM by Nick Stuart

    a4j update issue

    Nick Stuart Newbie

      Hi all, am having an odd (at least to me) problem with getting a4j:support to act how I would expect. I have a simple a4j:support on a select box:

      <h:selectOneMenu id="serviceRegion" value="#{group.serviceRegion}">
          <s:selectItems value="#{availableRegions}" var="country" label="#{country.countryCode}" noSelectionLabel="Service Region"/>
          <a4j:support event="onchange" action="#{practiceActionBean.updateList}" ajaxSingle="true"/>

      I have two panels that update (or should) using the a4j:outputPanel. The practiceActionBean.updateList method updates an @Out value which is used in a selectOneMenu in one of the panels, this works great. However, I have another panel that is even simpler that is not updating:

      <a4j:outputPanel ajaxRendered="true">

      I know that in the backing bean (a stateful ejb, conversation scopped) the value is being set correctly as the updateList method relies on it, and I have debugged into it and verified the value is the selected value. However, that above panel never get's it value updated. The ajax call ALWAYS returns the same, initial, value for #{group.serviceRegion.countryCode}. I'm really not sure why the value is not updated or changed. Group is @Out injected just like my list value (that does get rendered correctly) but it never shows up in the AJAX results.

      Any one have any ideas? This is on 2.1.0 GA on JBossAS 4.3.

        • 1. Re: a4j update issue
          Nick Stuart Newbie

          Figured it out...

          I was calling my create method (from an action settings in pages.xml) because I wasn't checking that I already had a conversation running, so it was essentially creating a new group, but it was doing so AFTER by action method was being executed. It looked like it was doing the right thing, but I was not debugging in the right spots to figure out what was going on.