What's the best way to handle index properties in JSF...

 

I have a <c:foreach> loop inside of which I display a text input box
that can be edited...When I hit submit, how does JSF know which text
input box to map to which index of the array in the backing bean???

 

The JSF code goes like this:

 

<c:forEach items="#{bean.phones}" var="phone">

     <h:inputText value="#{x.phoneValue}>

</c:forEach>

 

The backing bean has a member variable called phones of type ArrayList.
The ArrayList is an array of an internal object called Phone...

 

The question is when the phone values are edited on the screen and
submit is hit, how does JSF know which value to map to which index in
the backing bean array???

 

Thanks,

Charbel

Reply via email to