-
Enhancement
-
Resolution: Unresolved
-
P4
-
8
-
generic
-
generic
A DESCRIPTION OF THE REQUEST :
javafx.scene.control.ContextMenu should have a @javafx.beans.DefaultProperty annotation set.
JUSTIFICATION :
Having a default property feels natural here. The developer is used to it, because other elements have it, too.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Writing the following in FXML:
<ContextMenu>
<MenuItem text="item 1"/>
<MenuItem text="item 2"/>
</ContextMenu>
ACTUAL -
You have to write the items tag as well:
<ContextMenu>
<items>
<MenuItem text="item 1"/>
<MenuItem text="item 2"/>
</items>
</ContextMenu>
javafx.scene.control.ContextMenu should have a @javafx.beans.DefaultProperty annotation set.
JUSTIFICATION :
Having a default property feels natural here. The developer is used to it, because other elements have it, too.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Writing the following in FXML:
<ContextMenu>
<MenuItem text="item 1"/>
<MenuItem text="item 2"/>
</ContextMenu>
ACTUAL -
You have to write the items tag as well:
<ContextMenu>
<items>
<MenuItem text="item 1"/>
<MenuItem text="item 2"/>
</items>
</ContextMenu>