pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@gmail.com>
Subject Re: Setting a bean property to null in BXML
Date Sat, 04 Sep 2010 14:04:41 GMT
On 4 September 2010 20:25, Greg Brown <gkbrown@mac.com> wrote:

> > If I have a bean with a property named nullableProperty, I can set it to
> null like this
> >
> > <MyBean>
> >     <nullableProperty />
> > </MyBean>
>
> You can? I have never tried that.  :-)
>

I discovered it using my normal thought process with regards to Pivot - I
bet those smart people have already thought of this, so what would be
elegant syntax!


> > Is there a way to set it like this?
> >
> > <MyBean nullableProperty="someSpecialNullToken" />
>
> Not at the moment. I can think of at least one class that converts an empty
> string to null in a string setter, but we don't have dedicated "null"
> support in BXML.
>
> Seems like a reasonable thing to add, though - the "empty string to null"
> conversion isn't especially intuitive. Whatever token we adopt, it should
> probably start with "$" so we know it is a reference. Maybe "$bxml:null"?
>
> Sounds good to me.

Chris

Mime
View raw message