struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Hightower" <>
Subject RE: Issues when reusing a DynaValidatorForm
Date Fri, 16 Jan 2004 22:35:41 GMT
about your earlier message.... ok i did misunderstand....


did you know bean:message not only takes a key but the trinity of

i define the trininty of attributes as name, property, scope....


<bean:message name="simpleForm" property="widgetDescription"

the above would call simpleForm.getWidgetDescription(), which would return a
key into the resouce bundle. just prep the form before you got to the page
by going to an action that loads the form page.

As far as validation goes.....


Did you know that validation is not keyed off of the form name
(name="fooForm"), but off of the attribute (attribute="fooForm")? (I found
out the hard way).

You could use two action mappings, one for one type of message, one for the
other type of message by messages I mean form labels. Then you would need to
entries for the form in the validation.xml file as well.

-----Original Message-----
From: Janice []
Sent: Friday, January 16, 2004 11:40 AM
Subject: Issues when reusing a DynaValidatorForm

Thanks Richard, but I think mayhaps I didn't explain myself very well the
first time, because I'm not sure that a mapped backed property will do it
for me.  That or I just don't understand what a mapped backed property is :)

I want a "name" property on all of the forms that are using my
DynaValidatorForm, but I want the text next to the field to read something
different.  So its the <bean:message key="widget.desc"/> that I want to
change from page to page.  So far simply having distinct .jsps is working,
but I'd like to reduce the duplicated code.

The validator is the other part of the problem... so far its looking like
    <form name="simpleForm">
      <field property="code" depends="required">
        <arg0 key="common.validate.code"/>
But I want the key to be page specific.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message