Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Validating array of form field

 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ranchers,
I am having JSP form with two text field one is Name : and other is Email :
I am displaying it more than one time like , on single page it appears as ;

Name : ---- Email :---
Name : ---- Email :---
Name : ---- Email :--- SUBMIT

And in my form bean i store them with String[] array.
like private String[] name; and String[] email;

Now i write validation for this form in validation.xml as



Now when my validation fails, an error message get printed on top of page but , the input box of Name: and Email : contains a hashcode of String []. like [Ljava.lang.String;@14c01ac..

How can i remove this hashcode value , and put the same Name or email into text field which is same as before submitting ??

Thanks in advance !
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me How to use 'indexedListProperty' field in validation.xml ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic