1 Reply Latest reply on Jan 18, 2013 6:27 AM by elsarfhem

    Dynamic Inputs and validation

    nt2005

      Hello Community,

       

      I am working on an very dynamic form with many different inputs.

       

       

      <a4j:repeat var="processinput"
       value="#{processBean.allProcessInputs}" first="#{inputrow}"
       rows="#{processout.data}">
       <h:outputText value="#{processinput.name}:" />
       <ui:fragment rendered="#{processinput.input == 0}">
         <h:inputText id="input" value="#{processinput.result}">
           <f:validateLongRange minimum="#{processinput.property.min}" maximum="#{processinput.property.max}"/>
           <rich:ajaxValidator event="onkeyup" ignoreDupResponses="true"/>
         </h:inputText>
         <rich:message for="input"/>
       </ui:fragment>
       <ui:fragment rendered="#{processinput.input == 1}">
       ....
      </a4j:repeat>
      

       

      The problem is: The value processinput does not exist when f:validateLongRange is rendered, so minumum and maximum is always 0. Anyone have an idea?

      An other thing: I want to change f:validateLongRange to maybe f:validateLength, but I cannot use something like: ui:fragment rendered="....", because f:validateLength is earlear rendered...

      c:forEach was an option, but there were other problems with rerender and so. I do not want to use this taglib.

       

       

      Help me please. I use richfaces 3.3.3 and seam 2.2.2.