This discussion is archived
3 Replies Latest reply: Dec 27, 2012 10:55 PM by LillyD RSS

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

LillyD Newbie
Currently Being Moderated
Hi,
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"
binding="#{backingBeanScope.tempBacking.tempIterator}">

<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"/>

</af:panelFormLayout>

</af:iterator>

Regards

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points