I'm new to struts and am setting up some form beans. I'm using hibernate, and one of my tables has a lot of foreign keys. The target tables are pretty much just lookup tables, which I use to populate a good number of drop-downs on my web page. Most of the foreign keys are optional, and I'm storing the values in the action form as java.lang.Long.

The optional dropdowns all have <option value="">None</option>, but when the form is submitted, and the empty string is coerced to a java.lang.Long, it gives me a value of 0 instead of null. Am I going about this the right way? Should I just suck it up and handle the 0 value, or is there a better way to lay out my form bean's class?

Thanks,
 Scott

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

Reply via email to