FXML binding expression error (false positive)

Answered

Intellij IDEA - 2020.1

OpenJFX - 14.0.1

My FXML code is:

<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.GridPane?>
<GridPane fx:id="gridPane" fx:controller="sample.Controller"
xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
<Button text="test" prefWidth="${gridPane.width*0.3}"/>
</GridPane>

the issue is in that line:

<Button text="test" prefWidth="${gridPane.width*0.3}"/>

Cannot resolve symbol 'width*0'

The project and the binding works fine.

I've uploaded the project via web form (https://imgur.com/a/kTBrJNN)

3 comments
Comment actions Permalink
Official comment

Hi,

IDEA doesn't support expression binding. Please watch/vote for https://youtrack.jetbrains.com/issue/IDEA-100322

Sorry for the inconvenience

Anna

Comment actions Permalink

That is not the case!

The code I've provided is working, but the problem is Intellij IDEA marks the line as erroneous (it's a bug of IDE)

0

Please sign in to leave a comment.