3 Replies Latest reply: Dec 28, 2012 12:55 AM by LillyD RSS

    <af:message does not get displayed when written within an iterator

      We have a requirement of repeating a set of form elements based on a dynamic count. For this reason we have used the af:iterator component. Additionally the requirement is also to perform validations in all the fields.

      The issue is, the required validations are happening, but then the message is not getting displayed beneath the component. However when we change the globalOnly attribute to true, then the validations appear correctly at the top, but against component
      We have a feeling that the message component is not able to associate itself with the input text component, considering the ids assigned by the iterator are dynamic in nature. However we may be wrong here.

      Request some one to suggest a solution, as this is a very important requirement for us.

      Code snippet is as follows:

      <af:iterator value="#{bindings.TempVO1.collectionModel}"
      var="itr" id="i1" varStatus="vs"

      <af:panelFormLayout id="pfl2">

      <af:inputText value="#{itr.firstName}" id="it2"
      simple="true" required="true" autoSubmit="true"
      label="First Name"/>

      <af:message id="m5" for="it2"/>