Show one Address component per address so the pane stays in step with the person's list.

A second component of the same class is a new injected instance, leaving the cached singleton in place, and selection stays an attribute of the person.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-30 18:17:47 +01:00
co-authored by Cursor
parent a89fe47133
commit 0321e0de8d
13 changed files with 642 additions and 31 deletions
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.layout.VBox?>
<?import de.neitzel.fx.view.BindingList?>
<?import de.neitzel.fx.view.DirectBinding?>
<?import de.neitzel.fx.view.Repeat?>
<VBox xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml">
<fx:define>
<BindingList>
<Repeat pane="addressPane" component="de.neitzel.fx.view.component.AddressForm" collection="addresses"/>
<DirectBinding control="selection" property="value" path="selectedAddress" direction="both"/>
</BindingList>
</fx:define>
<VBox fx:id="addressPane" id="addressPane"/>
<ComboBox fx:id="selection" id="selection"/>
</VBox>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.VBox?>
<?import de.neitzel.fx.view.BindingList?>
<?import de.neitzel.fx.view.DirectBinding?>
<?import de.neitzel.fx.view.component.AddressForm?>
<VBox xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml">
<fx:define>
<BindingList>
<DirectBinding control="homeForm" property="model" path="home" direction="both"/>
<DirectBinding control="workForm" property="model" path="work" direction="both"/>
</BindingList>
</fx:define>
<AddressForm fx:id="homeForm"/>
<AddressForm fx:id="workForm"/>
</VBox>