FXML expression binding
Philipp Dörfler
phdoerfler at gmail.com
Mon May 6 12:10:04 PDT 2013
More news:
<CheckBox selected="${(boxA.selected && boxB.selected) || boxC.selected}" />
note the && instead of && for XML goodness.
Also note that operator precedence is somewhat different from what you might be used:
! boxD.selected && boxE.selected seems to be: !(boxD.selected && boxE.selected)
so:
! true && false evaluates to true
I conclude that FXML expression binding supports more than the most basic expressions but it is nowhere documented which ones exactly.
I am curious what other expressions are supported.
~ philipp
Am 06.05.2013 um 16:36 schrieb Philipp Dörfler <phdoerfler at gmail.com>:
> Good to know, that a negation is working!
>
> I've tried some more and found that the following works, too:
>
> text="${'this is some ' + textField.text}"
>
> Note the ' instead of ".
>
> What language is this? Any documentation on which expressions are supported?
>
> Cheers,
> ~ Philipp
>
> Am 06.05.2013 um 11:49 schrieb Werner Lehmann <lehmann at media-interactive.de>:
>
>> Me too. I always wonder what exactly is a simple expression. For example, this one works:
>>
>> visible="${!label.text.empty}"
>>
>> Must be simple then...
>>
>> Werner
>>
>> On 03.05.2013 12:48, Philipp Dörfler wrote:
>>> Hi,
>>>
>>> http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html
>>>
>>> says:
>>>> Only simple expressions that resolve to property values or page
>>>> variables are currently supported. Support for more complex
>>>> expressions involving boolean or other operators may be added in
>>>> the future.
>>>>
>>> I'd love to see this "may" turn into "will". How are the chances for
>>> this to happen?
>>>
>>> ~ Philipp
>>
>
More information about the openjfx-dev
mailing list