riyaz wrote:
> just to give an example; reading the docs, i could not see a difference
> between DynaValidatorForm and DynaValidatorActionForm in the validator
> package.

I just looked at the source code.  (A highly recommended activity!)
DynaValidatorActionForm extends from DynaValidatorForm, and it overrides
'validate' but the only difference is on one line of code.

DynaValidatorForm has:
Validator validator =
            Resources.initValidator(mapping.getAttribute(), this,
application, request, errors, page);

DynaValidatorActionForm has:
        Validator validator =
            Resources.initValidator(mapping.getPath(), this, application,
request, errors, page);

The difference appears to be that one uses the 'attribute' (which is the
<action> tag's 'name' parameter) and the other uses the <action> tag's
'path' parameter when the validator is initialized.

So what is DynaValidatorActionForm for?  When would you use one or the
other?

> docs aside, a good sample application that uses the new features 
> would be fine too.

The struts-example webapp uses a DynaValidatorForm, but it only has two
simple String properties.  That should get you started.  I'm still looking
for an example of a DynaValidatorForm with indexed properties... I can only
find examples with plain old Action Forms.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

Reply via email to