This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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.