You might also want to use indexed properties. Look into the indexed=true flag on the html taglibs. -David
----- Original Message ----- From: "sean jones" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 01, 2004 8:29 AM Subject: Re: Problem with Dynamic text boxes > <biswajit.basak <at> tcs.com> writes: > > > > > > > hi i have to display a screen in > > which the no of rows are dynamic. in each row there are 2 text boxes where > > user can enter values. after entering the values in the > > text boxes user press 'SAVE' button . in the Action form i > > have to validate the values in the validate() method . also in the Action > class there will > > be some data processing. but how can i use get(),set() methods > > of the Action form,as the no of rows are not fixed.i am trying to avoid the > request.getParameter('Field > > name'); in the Action form or in Action Class.Any Suggestion! Thanks > > Biswajit Basak > > > > in your action form you can do this. > > String text1[]; > string text2[]; > > public void setText1(String text[]) text1 = text; } > public void setText2(String text[]) text2 = text; } > public String getText1() {return text1; } > public String getText2() {return text2; } > > > validate() { > > if (text1.length != text2.length) { > //save this error here. > } > else { > //loop through arrays validating each pair. > //and saving appropriate errors. > } > > > > --------------------------------------------------------------------- > 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]