I have the following piece of code:
<ui:repeat var = "ctr" value = "#{bean.counterList}">
<h:outputLabel for = "message#{ctr}" value = "#{appMessage['No #{ctr} :" />
<h:inputText id="message#{ctr}" value="#{bean.messageList}" />
</ui:repeat>
The counterList
is an List<String>
. If the list contains 1, 2, 3
on the view thee should be 3 input fields with the ids : message1, message2, message3
.
The EL has no effect in the id attribute and all the components receive just message as an ID. On the other hand, in the label's value, the EL works great.
I can imagine that this may be the desired behaviour but is there a workaround?
UPDATE:
I removed the id
attribute and the ui:repeat
is in charge of naming the id's now. From the source code I can see that the ID's generated are unique but now this warning is thrown:
INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=fm-story:j_idt103:0:j_idt54[severity=(ERROR 2), summary=(Conversion Error setting value '' for 'null Converter'.), detail=(Conversion Error setting value '' for 'null Converter'.)]
sourceId=fm-story:j_idt103:1:j_idt54[severity=(ERROR 2), summary=(Conversion Error setting value '' for 'null Converter'.), detail=(Conversion Error setting value '' for 'null Converter'.)]