Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem in Validating array of form field

 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone tell me How to use 'indexedListProperty' field in validation.xml ?
 
this is supposed to be a surprise, but it smells like a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic