This is wonderful!! Now it's working great!

Thank you so much Ted!


P.S

In case someone also wants to use this approach, after populate the profile
info and put the bean into request, you have to do:

request.setAttribute("profileForm", formObj) instead of
request.setAttribute("baseForm", formObj)

-----Original Message-----
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 4:44 AM
To: Struts Users Mailing List
Subject: Re: How to instantiate a DynaActionForm?


The validator actually goes by the ActionMapping attribute name, which
by default is the formbean name. So you can have a base formbean,
defined as an DynaActionForm, and then give it different attributes in
each mapping.

<action name="baseForm" attribute="loginForm"

<action name="baseForm" attribute="profileForm"

Then in the validator, you have have a form for loginForm and another
for profileForm (if you need it).

-T.


Joseph Yang wrote:
> Thanks for all the answers!
>
> I used Carl's example, and it works
>
> But I do like Ted's idea, so I tried it out, combined the two forms
> together, then the validator is not working, because when I define the
> validation, there are no "firstName" or "lastName" on the login page...
>
> Any suggestions on this?





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



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

Reply via email to