1 Reply Latest reply on Aug 9, 2007 4:19 AM by Ilya Shaikovsky

    Error - Forms

    Augusto Dias Newbie

      Hi, I have this code:

      <h:form prependId="true" id="form">
       <label for="finstituicao">Nome da Instituição:</label>
       <h:inputText id="finstituicao"
       onkeypress="return entsub(event)" />
       <a4j:commandButton value="Procurar" id="search"
       action="#{instituicaoController.findInstituicoes }"
       reRender="tinstituicoes" />
       <h:dataTable id="tinstituicoes"
       value="#{instituicaoController.instituicoes}" var="instituicaov" summary="Instituições">
       <f:facet name="header">
       <h:outputText value="#{instituicaoController.nome}" />
       <h:outputText value="#{instituicaov.nome}" />
       <f:facet name="header">
       <h:outputText value="#{instituicaoController.sigla}" />
       <h:outputText value="#{instituicaov.sigla}" />
       <a4j:commandLink reRender="instituicao" value="Selecionar"
       value="#{instituicaov}" />
       <h:outputLink value="javascript:Richfaces.showModalPanel('ninstituicao')">Cadastrar Nova</h:outputLink>

      The commandLinks in the dataTable don't work. They don't call any method that I put in the action attribute.
      If I remove the commandButton and inputText and populate the list for the dataTable, the commandLinks works perfectly, but I need this to perform searchs.
      I think this error occurs because the form is submited more times, then I need a way to reRender the dataTable when the user input a text to search without submit. I tried to separate the commandLink and commandButton in differente forms, but don't work.