This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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
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.