I have a form with several textfields. When I populate it with data, there are some integer textfields which is showing ‘0’, which is the default value for integer. I want the textfield to be blank than a zero.
<s:textfield id="txtPhone" name="phone"/>
Please help.
You need to use
Integerclass and notintfor that. int will always be initialized to 0.S2 OGNL and type convertor will take care of type conversion for you.
For Integer default will be null and it will solve your issue.