hi, i have sample code as follow, it should have more methods like this with the different of form.isPpo_chkbox_?() and form.getPpo_txtfieldscno_?(), ? - is number like 2,3,4,5...
as the methods are doing the same function, someone suggest that i do like this case
but i think we have problem of calling form.getPpo_txtfieldscno(i) with parameter i , can someone suggest how to solve it ? thank you
(Marilyn added line breaks) [ June 15, 2005: Message edited by: Marilyn de Queiroz ]
Marilyn de Queiroz
Joined: Jul 22, 2000
Notice how much easier it is to read formatted code than code on one line that is over 400 characters long?
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Jan 29, 2003
but i think we have problem of calling form.getPpo_txtfieldscno(i) with parameter i , can someone suggest how to solve it ?
If you wrote getPpo_txtfieldsscno(i) you can solve the problem there. How do you get one text field from a bunch of text fields by knowing a number? You need some kind of indexed bunch. If you know the number of text fields ahead of time an array is fine. If you don't, one of the Collections would do the job.
See if you can build some code around that idea. If you get stuck, post what you have and we'll take a look.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi