But at the moment it fails to validate.

Is this because it's trying to set an integer propety of an object that
isn't an object but a primitive?

Alex

On Wed, Nov 19, 2008 at 2:32 AM, Alex Turner <[EMAIL PROTECTED]> wrote:

> I would like it to be null
>
> Alex
>
>
> On Wed, Nov 19, 2008 at 1:30 AM, Oscar Westra van Holthe - Kind <
> [EMAIL PROTECTED]> wrote:
>
>> On 18-11-2008 at 22:21, Alex Turner wrote:
>> > I have worked up a simple test case that exhibits some behaviour I find
>> > puzzling.  I discovered it by accident a week ago, but worked out of it
>> > somehow.
>> >
>> > The behaviour I'm getting is that if my ActionBean has an object member
>> that
>> > I create a select form element for and the form element doesn't point to
>> a
>> > valid id, but instead to nothing, Stripes throws an error with no
>> message
>> > back to the page.  In the case of my form, 'None' is a valid selection,
>> and
>> > I don't want to throw an error in this case, but I can't figure a way of
>> > avoiding this.
>> [...]
>>
>> >         <s:select name="client">
>> >             <s:option>None</s:option>
>> >         </s:select>
>>
>> What value do you want to have when 'None' is selected? Is "None"
>> converted
>> to null, or does is fail to validate (because it's not an Integer)?
>>
>> The HTML specification states that for option tags, the default value to
>> submit is it's content, i.e. "None". See:
>>  http://www.w3.org/TR/html4/interact/forms.html#edef-OPTION
>>
>> I suspect this is happening.
>>
>>
>> Oscar
>>
>> --
>>   ,-_   The world is a tragedy to those who feel, but a comedy to those
>>  /() )  who think.
>>  (__ (   -- Horace Walpole
>> =/  ()
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Stripes-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to