I realize your field names have to comply with the struts naming (ie so that BeanUtils.setProperty() will work. But if your form has a collection that you are adding a record to, struts will not create a new record, add it to your form's collection then set the properties on it.
Once you do the create and add, struts will then do the populate. That's why I suggested the ajax call to add the record to the server side struts form so that the subsequent post will populate the fields. -----Original Message----- From: Ed Griebel [mailto:[EMAIL PROTECTED] Sent: 14 November 2006 14:24 To: Struts Users Mailing List Subject: Re: Dynamically adding row! You can have a form auto-populate from the javascript-generated fields, you just need to be careful what you call the generated field names. It will be hard-coded and none too attractive, but it will work. Look at the rendered HTML to see what format the field names are as an example. HTH, -ed On 11/14/06, Lance Semmens <[EMAIL PROTECTED]> wrote: > The least messy way is to post to an addRecord action which adds a blank > record to your form. Form must be in session scope. This requires a page > redraw so is less responsive but this is the approach I often use. > > If you add a row to your table using javascript, struts will not > automatically populate your form with the new record(s) upon save so you will > need to handle this in your action. Unless of course you use ajax (which you > have said you don't want to do) to add the record to your struts form on the > server. > > Display tags will work for both suggestions. The javascript option usually > involves cloning an existing row and blanking out the fields. > > Lance. > > -----Original Message----- > From: Balwinder [mailto:[EMAIL PROTECTED] > Sent: 14 November 2006 10:05 > To: Struts Users Mailing List > Subject: Dynamically adding row! > > Hi All! > > I am trying to add a row in a table dynamically to add new record in > Struts web application. > > Iam using struts 1.1 and need to implement non-Ajax solution. > > Will display tags has solution to this situation? > > Any help will be appreciated. > > Thanks and Regards, > Balwinder Kumar > > --------------------------------------------------------------------- > 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]