File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes prevention of default value considered in the jsp page?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "prevention of default value considered in the jsp page??" Watch "prevention of default value considered in the jsp page??" New topic
Author

prevention of default value considered in the jsp page??

divya chamarti
Ranch Hand

Joined: Jul 28, 2006
Posts: 56
hello can any body tell me to prevent the default value considered in the form created by the jsp page , which is supported by the FormBean class in which i have provided supporting properties for a field of integer type , so in the form , field is pre-populated with 0 as default value ,
so i want to give some logic in the reset() method in the FormBean class so that the field will not be pre-populated with 0 and it will be appear with blank field
thanks in advance
regards
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The simple solution would be to change the type of the property to String. That will get rid of the zero default. You can still convert it to an int in your model layer if you need to, and you can still validate it as an int.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: prevention of default value considered in the jsp page??
 
Similar Threads
Portlets with Struts File Upload Trouble
Old Form Bean data VS New Form Bean Data
Data Population on PageLoad
textfield disabled---value not sent to form bean
How to perform validation conditionally ?