Note that there are some explanatory texts on larger screens.

plurals
  1. POJSF2 EL not displayed in components IDs
    primarykey
    data
    text
    <p>I have the following piece of code:</p> <pre><code>&lt;ui:repeat var = "ctr" value = "#{bean.counterList}"&gt; &lt;h:outputLabel for = "message#{ctr}" value = "#{appMessage['No #{ctr} :" /&gt; &lt;h:inputText id="message#{ctr}" value="#{bean.messageList}" /&gt; &lt;/ui:repeat&gt; </code></pre> <p>The <code>counterList</code> is an <code>List&lt;String&gt;</code>. If the list contains <code>1, 2, 3</code> on the view thee should be 3 input fields with the ids : <code>message1, message2, message3</code>.</p> <p>The EL has no effect in the <strong>id</strong> attribute and all the components receive just <strong>message</strong> as an ID. On the other hand, in the label's value, the EL works great.</p> <p>I can imagine that this may be the desired behaviour but is there a workaround?</p> <p><strong>UPDATE:</strong></p> <p>I removed the <code>id</code> attribute and the <code>ui:repeat</code> 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:</p> <pre><code>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'.)] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload