File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form forgets data after validate method returns errors

 
Eric Juneau
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to retain the non-writable data in a form without a bunch of hidden fields?

Say I have a form that contains various fields, some are read-only, some are writable. If the validate method in the form executes and returns an error, all the data on the form, except for the writable fields disappears. Is there a way to retain this data without having a html:hidden field for each read-only field?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33671
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric,
Welcome to JavaRanch!

You do need the hidden fields to submit the data to the server. You can then store it in the session to avoid keeping it from being sent back and forth extra times though.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic