struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "deepank" <>
Subject Re: initilaizing form bean values
Date Thu, 26 Sep 2002 13:28:55 GMT
I dont know how  this will help.
I have a form with several records, i have an edit buuton for each record.
If a user cliks the edit button i go back to the action class.
here i would like to pick up data from the database, this data i want to
display in the fields of the form(JSP) for the user to edit.
i have this code in the action as usual

if (mapping.getAttribute() != null) {
     if ("request".equals(mapping.getScope()))

this removes the previous form bean instance. SHOULD I REMOVE THIS CODE and
use setter methods to prepopulate the form bean fields
in the action class.


----- Original Message -----
From: "Richards, Devin N (Devin)" <>
To: "Struts Users Mailing List" <>
Sent: Thursday, September 26, 2002 6:42 PM
Subject: RE: initilaizing form bean values

> Use the form's reset() method (as described in the docs and examples)
> -Devin
> -----Original Message-----
> From: deepank []
> Sent: Thursday, September 26, 2002 9:16 AM
> To: Struts Users Mailing List
> Subject: initilaizing form bean values
> hi,
> i have form bean for which i would like to initialize some fields with
values before displaying the jsp.
> for example if i have something like this in my jsp, how can i initialize
this input field from my Action class with a value that i get from the
> <html:text property="mail_id" />, this should display some initial data
> any help will be apprecaited
> Deepank
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message