M
matt hegarty
Hi
I am trying to get to grips with the struts validator (1.1), and my
question is whether anyone knows if I can specify the resource file
the validator uses for its messages, or whether it will always use
application.properties by default?
eg, I have the following in struts-config.xml
<message-resources parameter="application"/>
<message-resources key="JSP_MESSAGES" parameter="jsp-messages"
null="false"/>
I have the following in validation.xml
<formset>
<form name="PersonForm">
<field property="surname"
depends="required">
<msg
name="required"
key="errors.required"/>
<arg0
key="surname.title"
resource="true"
/>
</field>
</form>
</formset>
If 'surname.title' is defined in application.properties the label for
the field displays fine on the JSP, but if it is defined in
jsp-messages.properties then it does not display.
How can I tell the Struts validator to look in jsp-messages.properties
for 'surname.title'?
ta
Matt
I am trying to get to grips with the struts validator (1.1), and my
question is whether anyone knows if I can specify the resource file
the validator uses for its messages, or whether it will always use
application.properties by default?
eg, I have the following in struts-config.xml
<message-resources parameter="application"/>
<message-resources key="JSP_MESSAGES" parameter="jsp-messages"
null="false"/>
I have the following in validation.xml
<formset>
<form name="PersonForm">
<field property="surname"
depends="required">
<msg
name="required"
key="errors.required"/>
<arg0
key="surname.title"
resource="true"
/>
</field>
</form>
</formset>
If 'surname.title' is defined in application.properties the label for
the field displays fine on the JSP, but if it is defined in
jsp-messages.properties then it does not display.
How can I tell the Struts validator to look in jsp-messages.properties
for 'surname.title'?
ta
Matt