You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian Long <Br...@vt.edu> on 2006/10/13 21:30:29 UTC

copy from one DynaActionForm to another?

Hi folks.

I've got a DynaActionForm that I use for query, and another that I use
for update - and they share some data elements.  I'd like to copy data
from my query form to my update form, but I don't see a way to
explicitly get a form by name.  The Query Form is Session scoped, so it
should be there if I knew how to get it.

Is there an API for doing this?  Can I get it out of the HttpSession?

Thanks in advance.
-b


-- 

Brian M. Long
Virginia Tech Middleware
1700 Pratt Drive
Blacksburg, VA  24060
Office Phone:  (540) 231-0409
Campus Mail Code (0479)
...
"Ancora Imparo (I am still learning)" - Michaelangelo, age 87


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: copy from one DynaActionForm to another?

Posted by Nuwan Chandrasoma <my...@gmail.com>.
you can get it from session just use the below code.

DynaActionForm myForm = 
(DynaActionForm )session.getAttribute("<name_of_the_form_in_struts_config>");

i think u can copy this bean using BeanUtils class in commons util 
package.., see the API..

Hope this would help U.

Thanks,

Nuwan
----- Original Message ----- 
From: "Brian Long" <Br...@vt.edu>
To: <us...@struts.apache.org>
Sent: Friday, October 13, 2006 7:30 PM
Subject: copy from one DynaActionForm to another?


>
> Hi folks.
>
> I've got a DynaActionForm that I use for query, and another that I use
> for update - and they share some data elements.  I'd like to copy data
> from my query form to my update form, but I don't see a way to
> explicitly get a form by name.  The Query Form is Session scoped, so it
> should be there if I knew how to get it.
>
> Is there an API for doing this?  Can I get it out of the HttpSession?
>
> Thanks in advance.
> -b
>
>
> -- 
>
> Brian M. Long
> Virginia Tech Middleware
> 1700 Pratt Drive
> Blacksburg, VA  24060
> Office Phone:  (540) 231-0409
> Campus Mail Code (0479)
> ...
> "Ancora Imparo (I am still learning)" - Michaelangelo, age 87
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org