You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Stephane Grenier <in...@landlordmax.com> on 2005/09/08 17:59:03 UTC
error messages in panelgrids
Hello,
I'm having some problems trying to understand how to properly layout the
code. What I'm trying to do is use a panelgrid, one column for the
label, one for the input, and potentially one for the error message if
required. However, I can't seem to get to display correctly. Some sample
code:
<h:panelGrid columns="3">
<h:outputText value="Id:">
<h:inputText id="id" value="#{myForm.id}"/>
<h:outputText value="Another ID:"/>
<h:inputText id="anotherId" value="#{myForm.anotherId}">
<f:validateLength minimum="1" maximum="1" />
</h:inputText>
<h:message style="color: red;" id="idError" for="anotherId"/>
</h:panelGrid>
Here are the issues I have. Firsly, because columns=3 in the panel grid
definition, the first row has the "Another ID" text as the last column.
Then to solve this I put columns=2 but now when there is a validation
error on the second row, the error message appears as a third row.
Your suggestions would be appreciated.
Regards,
Steph