DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22470>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22470 null not assigned to Integer form fields Summary: null not assigned to Integer form fields Product: Struts Version: 1.1 Final Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The Struts I'm running is from "jakarta-struts-1.1.zip". I downloaded it last week. Struts 1.0 assigns null to an Integer form field if there is no input given. Struts 1.1 assigns 0 instead. This is an incompatibility and I believe should be considered a bug. With the new version, there is no way to tell if the user entered "0" or left the input field blank for Integer inputs. This showed up for me when no value was selected for the pulldown input shown below. The general work-around for such situations is for me to declare the input as a String field instead of Integer and then to convert it to an Integer myself. However I have literally hundreds of such inputs already in place for my working Struts 1.0 application. To convert all these for version 1.1 is a tremendous amount of work. It seems much more appropriate for Struts to assign null if no value is available. That is how it worked in version 1.0. <select name="startDay"> <option value="">(Select)</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]