it works..
thanks ben
regards,
sudhakar
-----Original Message-----
From: Ben Anderson [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 6:16 PM
To: [EMAIL PROTECTED]
Subject: RE: Form populate
granted your struts-config is setup properly to use your bean and it extends
actionForm, then why don't you just use the reference that is passed in to
the execute method?
if( form instanceof myForm ){
myForm mf = (myForm)form;
mf.setXXX( "Steelers rule" );
}
You don't need to worry about setting it to a scope - Struts takes care of
that for you.
-Ben
>From: "Namasivayam, Sudhakar (Cognizant)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Form populate
>Date: Thu, 5 Feb 2004 18:03:32 +0530
>
>Hi all,
> This may have been discussed earlier.. but i couldnt find any useful way
>to solve the problem...
>
>here it goes..
> I have a form with text fields which i am populating in the
>constructor and in the jsp it works fine.. just printing the default
>values.
>But in the action class of the form i try to change these values using the
>"setter" methodsd but the new values are not updated in the jsp..
>
>All i want to do is to change the values of form of the JSP from the
>action class
>
>i was trying
>//-> change the values of the form
> if ("request".equals(mapping.getScope()))
> {
> request.setAttribute(mapping.getAttribute(), regform); //
>-> how to send this form to the jsp.... It is taking the default values.
> }
>Hope i am clear here!!
>
>
>Thanks & regards,
>N Sudhakar
>
><< InterScan_Disclaimer.txt >>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Find high-speed 'net deals - comparison-shop your local providers here.
https://broadband.msn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail and any files transmitted with it are for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or
copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]