Did you get an error or just the value did not pass?
If it works but you did not get the value check the name property of the html forms 
and make sure they match with your action mapping attribute.

-----Original Message-----
From: Bogdan Cirstea [mailto:[EMAIL PROTECTED]
Sent: Fri 7/30/2004 1:16 PM
To: Struts Users Mailing List
Subject: Re: bean property copy
 
i tried but didn't work that way

Erdem Ergin wrote:

>Hi,
>
>Possibly between pageA and pageB, you have an action. In that action's execute 
>function you get formA as parameter. Then generate  a new form with type formB as a 
>local variable and assign your values. Lastly send it to the new page which is pageB. 
>Using:
>
> public ActionForward execute(ActionMapping mapping,
>                                ActionForm form,
>                                HttpServletRequest request,
>                                HttpServletResponse response)
>       throws Exception {
>              FormA formA = (FormA) form;
>              FromB fromB = new FormB;
>              formB.att1 = formA.att1;
>              request.setAttribute(mapping.getAttribute(), formB);
>
>Erdem
>
>-----Original Message-----
>From: Bogdan Cirstea [mailto:[EMAIL PROTECTED]
>Sent: Fri 7/30/2004 12:17 PM
>To: Struts Users Mailing List
>Subject: bean property copy
> 
>hello
>i'm using struts1.1 and i have a problem:
>i am in pageA with formA with property prop1 and prop2 and i want to go 
>in pageB in witch i have formB with properties named prop1 and prop2 
>also. and i want that in pageB, in property from formB to have value of 
>properties from formA. for this i put in action-mapping in struts-config.xml
><action
>            attribute="formB"
>            name="formB"
>            path="/jsp/addressPage"
>            type="me.AddressPageAction"
>            validate="false">
>            <forward name="success" path="/jsp/FindAddress.jsp" />
></action>
>
>but it doesn't work.
>does anybody have an idea how to solve this problem?
>tks
>
>
>---------------------------------------------------------------------
>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]
>



---------------------------------------------------------------------
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