struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18888] - DynaActionForm.get("param") returns an empty string; used to return null
Date Tue, 13 May 2003 16:04:55 GMT
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=18888>.
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=18888

DynaActionForm.get("param") returns an empty string; used to return null

turner@blackbear.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX



------- Additional Comments From turner@blackbear.com  2003-05-13 16:04 -------
This patch, unfortunately, has the unintended consequence of breaking the 
size= parameter of the form-property, which allows you to create an array of 
beans before entering a form.  Since you return null if the initialization 
string is null in the new getScalar method, the array will be initialized to 
an array of null rather than an array of objects.  

If you depend on strings being null before form submission, I suggest you 
implement an explicit reset() for a subclass.  

I will say that in general, depending on the presence or absence of a 
parameter to detect state is a bad idea IMHO.  You could do it with greater 
transparency by coding an explicit hidden state parameter in the form.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message