Struts 2 allows us to automatically populate our forms if we name our
fields correctly, which is wonderful.

My actions usually go something like this

execute () {

    MyObject o = myDAO.getRecord(id);

   member1 = o.getMember1();
   member2 = o.getMember2();

}

MyObject is a JO for hold a row in the database.  I like the fact that
I can name my form field 'member1' and it the interceptor will set and
get from my Action.  I dont like having to set up each member variable
in the action with the members my class.  Is it possible to somehow
have Struts automatically populate an Java Object rather then the
Action?  I thought I remember reading about this before but I'm not
sure.  It's not a big deal, and I know I can use OGNL to access the
value, but I wanted the convience of mapping a fieldName to my custom
object.  Is this possible?

Thank you,

Rich

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

Reply via email to