You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/05/13 18:04:55 UTC

DO NOT REPLY [Bug 18888] - DynaActionForm.get("param") returns an empty string; used to return null

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