Review request for RT-19228
Daniel Zwolenski
zonski at googlemail.com
Fri Mar 30 14:07:24 PDT 2012
On 31/03/2012, at 7:26 AM, Greg Brown <greg.x.brown at oracle.com> wrote:
>> I'm not overly fussed on this but just an observation: this is basically an 'expression' and there has been some talk of supporting EL style expressions in the future.
>>
>> With that in mind have you considered:
>>
>> <TableView columnResizePolicy="${TableView.CONSTRAINED_RESIZE_POLICY}" />
>
> I don't think EL supports constant references - I believe it only supports instance properties. So, as written, I don't think this would work.
Just as a reference, looks like the EL3 spec has something for this:
http://java.net/projects/el-spec/pages/StaticField
So the syntax would be:
<TableView columnResizePolicy="#{T{TableView}.CONSTRAINED_RESIZE_POLICY}"/>
This spec also mentions Enums, which raises a good point: it would be good if the fx:constant (or whatever option is used) handles these as well.
>
> EL does support functions, so something like this could work:
>
> <TableView columnResizePolicy="#{getResizePolicy('CONSTRAINED_RESIZE_POLICY')}"/>
>
> but, to me, that's doesn't seem quite as readable as simply using fx:constant (or even the builder-based shortcut syntax).
>
> Interesting idea though. Definitely something to think about for the future.
>
> G
>
More information about the openjfx-dev
mailing list