Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Server Validation and Prepopulation

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a form that gets pre-populated in an action. So in my PrepMappingAction it does a mappingForm.setYears(years).

The years populate a select box.




There are other input fields on the form that get validated. If they fail, server performs validation and then tries to forward back to that form.
But I get an error saying that the options in the select box are null. This is because those were in the request and they dissapear after server validation.

I suggested using the session, and I got mocked despite being relatively new to web programming.

Anyways, I need to redeem myself by finding out a way to do this before anyone else finds out how to
Right now I can only think of using client side validation using javascript. But some people on the team are violently opposed to it.

Can anyone help me?

I'd be in your debt!!!

-Nate
 
Nate Leech
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found an answer on jguru.com

Can anyone confirm that this solution is a good one?


Here is the link:

www.jguru.com/forums/view.jsp?EID=1222509

Thanks!!!

-Nate
 
reply
    Bookmark Topic Watch Topic
  • New Topic