Hi,

Sorry if this is an oft asked question, but I just joined the list as I was unable to find the answer elsewhere.

I'm using StrutsRC 1.1 (with webdoclet/xdoclet going to jboss). My question is basically in the subject: If I have a java Integer class on a form, can I send a null value to this from a jsp? While I cannot find a way to do so, the logic in the "requiredif" part of the Validator makes me think that it should be possible. [In case anyone doesn't know why I want to do this: I have several fields (html:text elements) on a form that are optional - a common occurrence! I'm trying to send a null for the Integer ones so that I know nothing was entered there. However, whenever it runs I get a zero (0) instead. This happens to be a legal value so I seem to be out of luck.

If this is not possible should all parameters passed (from a jsp) be Strings? At least this way one can test for empty strings and take some action accordingly.

Looking forward to any thoughts or comments from others who have experienced this previously.

Joe Gamache


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to