• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

prevention of default value considered in the jsp page??

 
divya chamarti
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic