You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Karthik Manimaran <mk...@gmail.com> on 2006/02/01 18:21:45 UTC

Struts Layout query

Hi,

I want to display the labels of the form fields with error in red. I want to
avoid the conditional statement to insert the attribute-value pair of
'class="Error"' in the td tag.

<td *class="Error"* align="right" valign="top" width="50%" >
    <label for="strFirstName">First Name</label>:
</td>
<td valign="bottom" width="50%">
    <html:text property="strFirstName" size="30" maxlength="30"
styleId="strFirstName"/>
</td>

Can this scenario be simplified using Struts Layout? Is yes, any
pointers/examples?

Extending the above scenario, is there a way to automatically display *
(asterisk) in front of fields with errors.

Thanks and regards,
Karthik.