At 05:38 am 13-06-2002 -0400, you wrote:

>For populating a form, you can use whatever JavaBean you like. So if you
>give your model bean the expected form-bean name, the tags will use it
>without complaint. You can even populate the form using several
>different beans. Just specify the bean's attribute name in the tag.
>The form's mapping's attribute name (whew!) is only a default.

You're right.
It didn't happen to me I could do it this way... Too much soccer watching 
(with beer)....

But, it is desirable that the object used for populating the form and the 
object used for submitting from a form is the same one. Right?

>The place where an ActionForm is truly expected is on the submit. But if
>you use a Map-backed bean there, then you can accept whatever the form
>sends up. (Alternatively, for 1.0, ease the maintenance burden using a
>single coarse-grained bean with all the properites your application
>expects.)
>
>To close the loop, add an adaptor to the business tier that can take a
>plain-vanilla map of Strings and populate your model bean.

When you say adaptor, do you mean a generic one which works for all of my 
model classes or I need to write one per model class?


>So, including the adaptor, we are talking about creating maybe two
>new classes. In 1.1, a BaseMapForm drops to one (the adaptor). And if
>your business tier can already cope with String maps, we've hit
>bottom at zero -:o)

Is there a BaseMapForm in 1.1b????? I couldn't find it. I know in 1.1b I 
use DynaBeans to back ActionForms. But I don't I can use Maps.

Could you enlighten me?



>-- Ted Husted, Husted dot Com, Fairport NY US
>-- Developing Java Web Applications with Struts
>-- Tel: +1 585 737-3463
>-- Web: http://husted.com/about/services

-- 
John Yu                       Scioworks Technologies
e: [EMAIL PROTECTED]         w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - "Rapid WebApp Assembly for Struts"


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

Reply via email to