0 Replies Latest reply on Dec 2, 2010 4:37 PM by Eduardo Crestani

    a4j:commandButton with two or more h:selectOneMenu

    Eduardo Crestani Newbie

      How can I retrieve the value of the fields that form? Actually it only retrieves the first value that I set the selectOneMenu. It's like that he dont update the tree of ajax4j after the first time.

       


      <h:form id="formwl">

      <a4j:keepAlive beanName="worklistHandler" />


      <h:outputText value="Processos" id="ol1"
      styleClass="fonteColuna" />

      <h:selectOneMenu value="#{worklistHandler.camposVo.processo}"
      styleClass="select" id="selectProcessos"
      binding="#{worklistHandler.selectProcessos}">
      <a4j:support event="onchange"
      actionListener="#{worklistHandler.processosChangeListener}"
      reRender="selectAtividades,selectAtributos"
      ajaxSingle="true"/>

      <f:selectItems value="#{worklistHandler.processosItens}" />
      </h:selectOneMenu>

      <h:outputText value="Atividades" id="atividades"
      styleClass="fonteColuna" />

      <h:selectOneMenu value="#{worklistHandler.camposVo.atividade}"
      styleClass="select" id="selectAtividades"
      binding="#{worklistHandler.selectAtividades}">

      <a4j:support event="onchange" ajaxSingle="true"/>

      <f:selectItems var="atividadeItem" value="#{worklistHandler.atividadesItens}"/>
      </h:selectOneMenu>

      <h:outputText value="Atributo" id="atributos"
      styleClass="fonteColuna" />

      <h:selectOneMenu value="#{worklistHandler.camposVo.atributo}"
      styleClass="select" id="selectAtributos"
      binding="#{worklistHandler.selectAtributos}">

      <a4j:support event="onchange" ajaxSingle="true" reRender="selectAtributos"/>

      <f:selectItems var="atributoItem" value="#{worklistHandler.atributosItens}" />

      </h:selectOneMenu>

      <h:outputText value="Valor" id="ol4" styleClass="fonteColuna"/>

      <h:inputText value="#{worklistHandler.camposVo.valor}" id="valor" style="width:60px">

      <a4j:support event="onkeyup" ajaxSingle="true"/>

      </h:inputText>

      <a4j:commandButton value="Filtrar" immediate="true" id="botaoFiltrar"
      actionListener="#{worklistHandler.escolheFiltro}" reRender="listaGlobal,noTask">
      </a4j:commandButton>