Run Designer previews with application-owned DI adapters

This commit is contained in:
2026-11-26 16:01:19 +01:00
parent e49d586916
commit 6126967fdc
56 changed files with 2131 additions and 50 deletions
+5 -1
View File
@@ -14,7 +14,11 @@ mvn -pl fx-example javafx:run
Surefire fails the build on test failures. The XML reports record which tests ran.
The first command builds/installs the required reactor modules. The second launches only the application module; do not add `-am` to `javafx:run`, because the parent and library modules have no application entry point. The `Main` launcher calls `Application.launch(DeskApp.class, args)`. `DeskApp` creates the sample Person and injection context, then loads `view/Desk.fxml` through NeitzelLib's `ViewLoader`.
The first command builds/installs the required reactor modules. The second launches only the application module; do not add `-am` to `javafx:run`, because the parent and library modules have no application entry point. The `Main` launcher calls `Application.launch(DeskApp.class, args)`. On the separated development checkout, `DeskApp` creates the sample Person
and a `NeitzelViewDependencies` adapter through `DeskApp.dependencies(person)`.
It passes both to the managed loader with its own `ViewModelContext`. For the
preview, build the reference example from the same checkout and use the current
Designer tools. See [runtime compatibility](projects.md#use-the-separated-fx-runtime-with-neitzel-di).
Edit the name and home address, add a visit or tag, and select a visit. The same visit list feeds both the Table and repeated forms. Close the application before continuing. The library's [`fx-example` README](https://gitea.neitzel.de/konrad/NeitzelLib/src/branch/main/fx-example/README.md) explains the individual controls and binding behavior.