Sorry if you find if this is a bit off topic. ;)

Hi all,

Hope this is not a FAQ. (I spent 2 hours to do net search but didn't
get a good answer)

8<
<jsp:useBean name="abc" scope="session" .... />
<jsp:setProperty name="abc" property="*"/>
8<

Introspection magic makes the property setters called if they match the
input parameters by GET or by POST.

e.g. URL?address1=a&address2=&address3=


There are exceptions: setters of some parameters which have no value
won't get called. In the above string, the later two are not called
because they have no values assigned. Suppose my bean has session scope.
Values kept unchanged.

My question is: how can the web users clear a text field if the field is
incorrectly filled?

I suppose the introspection magic is a life-saver. I just don't want to
check the return value of request.getParameter("address2) for each input
to determine if it's empty.

Can anybody give me a good alternative to clear unwanted fields easily?

--
Kan LEUNG, M K
email: [EMAIL PROTECTED]
Digital Empires Company Limited




Reply via email to