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