You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Pandurang <pa...@manas-solutions.com> on 2004/04/28 09:28:26 UTC

Need Help: Validating array of textboxes using Struts Validator Framework

Hello there,

I need a help for using struts validator framework. I am retriving records
from DB and displaying these records
as an list page format of which JSP page is as below

+-------------------------------------------------------------------------+
|     No                    Title                       Action
|
|
|
+-------------------------------------------------------------------------+
|       1                   abcd                           /--------\
|
|                                                             |  DELETE   |
|
|                                                              `--------/
|
|
|
+-------------------------------------------------------------------------+
|       2                   pqr                           /--------\
|
|                                                             |  DELETE   |
|
|                                                              `--------/
|
|
|
+-------------------------------------------------------------------------+



                                 /--------\
                                  | UPDATE  |
                                  \--------/

Where title like abcd, pqr are displayed in the textbox.
Now I want to perform validation  (required ,maxlength etc) on the title
textbox when i clicked on UPDATE button.
As I am displaying this list dyanamically, the name of above title control
is the same as

<input type="text" name="txtTitle" value="">

So it becomes array of elements. How can i use validator in this case ?

Can anybody help me for my problem ?
If there is another solution that will be also welcome.


Regards
Pandurang

=========================================================
Pandurang D. Galande
Manas Solutions Pvt. Ltd
+98905 12300 (mobile)
+91 020 4006358 ext. 22
+91 020 6699685 (R)
http://www.manas-solutions.com
http://www.geocities.com/pandurang_g/
=========================================================