A request for FXML exxamples (Re: [jfx15] Fix mistakes in FX API docs [v3]

Rony G. Flatscher Rony.Flatscher at wu.ac.at
Mon Jul 27 13:09:54 UTC 2020

On 26.07.2020 12:10, Nir Lisker wrote:
>> Fixes https://bugs.openjdk.java.net/browse/JDK-8246343 and some additional fixes in the vicinity.
> Nir Lisker has updated the pull request incrementally with one additional commit since the last revision:
>   VBox and HBox fixes
> -------------
> Changes:
>   - all: https://git.openjdk.java.net/jfx/pull/274/files
>   - new: https://git.openjdk.java.net/jfx/pull/274/files/5c7d74ef..141e78f1
> Webrevs:
>  - full: https://webrevs.openjdk.java.net/jfx/274/webrev.02
>  - incr: https://webrevs.openjdk.java.net/jfx/274/webrev.01-02
>   Stats: 11 lines in 2 files changed: 0 ins; 2 del; 9 mod
>   Patch: https://git.openjdk.java.net/jfx/pull/274.diff
>   Fetch: git fetch https://git.openjdk.java.net/jfx pull/274/head:pull/274
> PR: https://git.openjdk.java.net/jfx/pull/274

One of the changes reads (at <https://git.openjdk.java.net/jfx/pull/274/files>):



    @@ -720,7 +720,7 @@ <h4><a id="collections_and_property_handlers">Special handlers for
    collections a

    <p> Collections and object properties cannot be listen to using <span class="code">setOn<span
    class="variable">Event</span>()</span> methods.

    For these reason, special handler methods need to be used.

    <span class="code">ObservableList</span>, <span class="code">ObservableMap</span> or <span

    uses a special <span class="code">onChange</span> attribute that points to a handler method with
    a <span class="code">ListChangeListener.Change</span>, <span
    class="code">MapChangeListener.Change</span> or <span
    class="code">SetChangeListener.Change</span> parameter, respectively.


    <pre class="code">

    <VBox fx:controller="com.foo.MyController"

Does anyone have FXML examples where "onChange" for ObservableList, ObservableMap and ObservableSet 
get employed?


More information about the openjfx-dev mailing list