11 Replies Latest reply on Sep 25, 2007 6:32 AM by Lotfi Mellouk

    selectOneMenu and ajax support

    Lotfi Mellouk Master

      Im struggling with a4j support on a selectOneMenu using a4j:support ..

      I have 3 JSF/rich components,
      1- the first is a suggestion box, on the onselect event an ajax support action compute a list selectItems for the 2d component..

      2- the second component is a selectOneMenu, on the onchange event, I shoud compute a list fot the 3th component.

      The problem, is when I compute the selectItems list on the ajax support action, the a4j support on the selectOneMenu does not work..id I compute the selectitems list on the constructor not on the a4j:support action, it works..

      <a4j:region renderRegionOnly="false">
      <h:inputText value="#{queryBean.compagny}" id="textCompany" />
      <rich:suggestionbox id="suggestionCompanyId" for="textCompany"
      tokens=",[" rules="none"
      var="result" fetchValue="#{result.name}" rows="0" first="0"
      minChars="2" shadowOpacity="5" border="1" width="200"
      height="150" shadowDepth="0" cellpadding="5"
      <a4j:support event="onselect" reRender="client,clients"
      action="#{queryBean.findClientOf}" ajaxSingle="false">
      <h:outputText value="#{result.name}" />
      <h:messages />
      <h:outputText value="#{msg.label_client}" />
      <a4j:region renderRegionOnly="false">
      <h:selectOneMenu value="#{queryBean.client}" id="client">
      <f:selectItems value="#{queryBean.clientItems}" id="clients" />
      <a4j:support event="onchange" reRender="tx" ajaxSingle="false" />
      <a4j:log hotkey="M" level="ALL" />
      <h:outputText value="#{queryBean.client}" id="tx" />