• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Problem with Struts2 validation

 
Ranch Hand
Posts: 53
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I have a registration page known as student registration.

there are few autocompleter fields like country dropdown, state drop down etc.

I am using struts2 validator to validate that none of the fields should be blank. If any field is blank it comes back to same page and displays the message in red that the particular field is required.

now the problem is when it comes back on same page incase of blank field the dropdowns are not working. Autocompleter is not generating the list.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure how to help without any code, configuration, or anything.
 
Bilal A. Siddiqui
Ranch Hand
Posts: 53
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Registration page




My validate xml looks like



and action xml is



The validation is working fine. If it finds any blank field it goes back to registration page and displays the message. But this time autocompleter does not populate.
 
Bilal A. Siddiqui
Ranch Hand
Posts: 53
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I rectified the problem myself.

Thanks to all.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's nice to include the solution so that when future searchers have a similar problem they're able to also see some solutions.

A couple of notes:

- Why do you use the "apt" prefix for the S2 tags?
- Why don't you use the framework's default result names (lower case)?

Using non-conventional/non-default naming conventions is fine, of course, but make the code more difficult for new developers to deal with.
 
reply
    Bookmark Topic Watch Topic
  • New Topic