I have the following code snippet:
<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>
counterList is a List<String> . If the list contains 1, 2, 3 , in the view you should have 3 input fields with identifiers: message1, message2, message3 .
EL does not affect the id attribute, and all components receive only the message as an identifier. On the other hand, in the label value, EL works fine.
I can imagine that this may be the desired behavior, but is there a workaround?
UPDATE:
I removed the id attribute, and ui:repeat is responsible for naming the identifier. From the source code, I see that the generated identifier is unique, but now this warning is issued:
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'.)]
source share