Title: RE: [OS-webwork] Empty string property now "" instead of null?

A question, why is Long parameters from the FORM set to null, and not String? Cant it be set to Long(0) then?

/Mathias.

-----Original Message-----
From: Francisco Hernandez [mailto:[EMAIL PROTECTED]]
Sent: den 12 december 2003 11:07
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Empty string property now "" instead of null?


seems to be some confusion with this, can someone post what it currently
works like in ww1 and how its supposed to in ww2 (same as ww1, for
backwards compat i assume..)

so say I have foo.action with bar string property

what should bar be when i submit an action like foo.action?bar=

what should bar be when i submit an action like foo.action

this needs to get put on the wiki somewhere too

oh and for primitives too say bar is an int, would foo.action and
foo.action?intBar= and foo.action?intBar=0 all set intBar to 0 ?

Dick Zetterberg wrote:

>In WW1.3 and 1.4 a string parameter that is empty will set the string property to the empty string. Not null.
>If your program choose to interpret this as null that is up to you. How can you otherwise see the difference between a parameter that is not sent in at all and one that is sent in but is empty?

>
>Cheers,
>
>Dick Zetterberg
>[EMAIL PROTECTED]
>
>----- Original Message -----
>From: "Lars Fischer" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, December 11, 2003 12:38 PM
>Subject: Re: [OS-webwork] Empty string property now "" instead of null?
>
>

>
>>IMO it is essential that is is NULL. This has been a problem with WW 1.2.
>>and has
>>been fixed in 1.3. It's perfectly legal for a String to be null.
>>
>>If WW2 handles this as an empty String, it's a bug.
>>
>>   
>>
>>>Hi,
>>>
>>>When a form field (single textfield) is not filled, the request param is
>>>an
>>>empty string, which translates to an empty string array
>>>(ParametersInterceptor), but my property setter is called with an empty
>>>string. Should't that be null?
>>>
>>>Cheers,
>>>Mathias
>>>     
>>>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive?  Does it
>help you create better code?  SHARE THE LOVE, and help us help
>YOU!  Click Here: http://sourceforge.net/donate/
>_______________________________________________
>Opensymphony-webwork mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>
>
>

>



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to