I have an ActionForm with its own validate method that adds errors
keyed upon entries in a resource bundle, so that the errors can be
linked back to the field they are pertinent to, not just as a global
error.

            String label = resources.getMessage("label.password");
            ActionMessage message = new
ActionMessage("validation.error.requiredfield", label);
            errors.add(label, message);


I have the error displaying next to the input field in the jsp page via :

          <td><b><bean:message key="label.password" /></b></td>
          <td><html:password property="password" size="20"
maxlength="20" /></td>
          <td>
            <html:messages id="message" message="false" property="password">
              <bean:write name="message" /><br>
            </html:messages>
          </td>

Unfortunately the value of "property" is hardcoded in the
html:messages tag. What I have there is the value stored in the
resource bundle under "label.password", as is used to display next to
the input field in the bean:message tag.

How can I extract the value from the resource bundle when using it as
a value for the property field, instead of hard coding it in, which
defeats the purpose of the resource bundle.

Thanks

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to