These are two different things in struts. Kinda silly really...
Here's the I write jsp code for a form (yes, I'm still not fully converted to CSS, hopefully in the next web app):
<tr>
<td class="reqlabel">*Name</td>
<td class="input"><html:text property="name"/></td>
</tr>
The problem is, in my validation.xml I also have this:
<form name="NameForm">
<field property="name" depends="required">
<msg name="mask" key="Name" resource="false"/>
</field>
</form>
This violates DRY (Don't Repeat Yourself) since both the fact that its required and the label/resource key are duplicated. Ideally the label could be built dynamically from the information in the validation.xml. For example:
-required - Make it bold with a star in front of the label.
-date/phone/etc - Append a format template to the label, e.g. Birthdate (MM/dd/yy):
Suggestions?
<< Home