Does anyone know if there is an easy way to make it so that the fields in the first row of a h:dataTable are required, while making the remaining rows not required?

What I'm wondering is if something similar to the following is possible. Note, the "firstRow == true" is just pseudo-code for what I want to do. If I remember correctly, JSTL has something like this.

<h:dataTable id="references" value="#{applicationHandler.references}" var="reference">
<h:column>
<h:inputText id="name" required="#{firstRow == true}" value="#{reference.name}"/>
</h:column>
</h:dataTable>


Failing this, I was thinking I could just have two h:dataTables, one after the other, with the first table only containing the first row. However, if the column widths are variable, then the columns won't line up correctly.

Jon



Reply via email to