Posted By:
joey_corleon
Posted On:
Monday, July 15, 2002 01:00 PM
Hi, In my ActionForm, I have 2 attributes: String email = null; int age = -1; (initialised within the constructor) I then code the following code within my JSP to display these fields to be edited: My question is the following: When I display these attributes for the very first time on the browser, as expected the field "email" is BLANK (nothing at all in the field), waiting for the user's input (as the String object associated to this filed has been initialized to null within the constructor of the actionForm) - HOWEVER, the field "age" displays "-1" (which is understand
More>>
Hi,
In my ActionForm, I have 2 attributes:
String email = null;
int age = -1;
(initialised within the constructor)
I then code the following code within my JSP to display these fields to be edited:
My question is the following:
When I display these attributes for the very first time on the browser, as expected the field "email" is BLANK (nothing at all in the field), waiting for the user's input (as the String object associated to this filed has been initialized to null within the constructor of the actionForm) - HOWEVER, the field "age" displays "-1" (which is understandable for the same reason).
HOW DO I DO TO GET THE FIELD age (represnting an integer) EMPTY THE FIRST TIME I DISPLAY THE JSP? (rather than the default value as it has been set within the ActionForm constructor???)
I have the same question regarding the tag
:
How do I do to set the value of the field to the generic string "-PLEASE SELECT-" (or something like this) the very first time the JSP page is presented to the user (rather than using a valid default value, as it has been initialised within the constructor).
THANKS!
Joey