You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jo...@shell.ca on 2003/11/26 22:53:22 UTC
No Keys Loaded For Validation
Good afternoon,
In my application, I use several different resource bundles, however,
the Validator only seems to retrieve the error keys if they are in the
default bundle. For example, in my validaton.xml file I have rules like:
<field property="currentCustomer"
depends="required">
<arg0 key="registration.validation.missingCurrentCustomer"
/>
</field>
And I have a properly loaded resource bundle called
registration.properties that contains:
registration.validation.missingCurrentCustomer=Please indicate if
you are a current customer.
errors.required={0}
errors.header=<ul>
errors.footer=</ul>
errors.prefix=<li>
errors.suffix=</li
In my JSP I have:
<logic:messagesPresent>
<html:errors bundle="registration" />
</logic:messagesPresent>
However when running the JSP with blank field data (so all validation
failed), I just get a series of blank bullets. This indicates that the
Validator is finding the correct resource bundle and writing the
<ul><li></li></ul> tags properly, however it is not writing the
"registration.validation.missingCurrentCustomer" key.
A really strange thing also is that if I copy the:
registration.validation.missingCurrentCustomer=Please indicate if
you are a current customer.
into my default resource bundle, all messages display properly.
Anyone have any idea what is going on?
TIA,
John Pitchko
Programmer/Analyst
Downstream Marketing Systems - e-Business Group
Shell Canada Limited
(403)-691-2572
john.pitchko@shell.ca