summaryrefslogtreecommitdiff
path: root/src/com.example.portfolio2/com/example/portfolio2/Controller.java
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-04-29 21:33:08 +0200
committerJonas Smedegaard <dr@jones.dk>2025-04-29 21:33:08 +0200
commit8afad8fc4669f88ea7807cce98ab51e4ac8b40c8 (patch)
tree862a66ab6b265dfe8539584bd3ff9fa0941c42ed /src/com.example.portfolio2/com/example/portfolio2/Controller.java
parent23e1ea2583f12121adf86b2776b1ad63e1b05ea4 (diff)
pass selection (not surrounding GUI object) in callback onCategorySelected()
Diffstat (limited to 'src/com.example.portfolio2/com/example/portfolio2/Controller.java')
-rw-r--r--src/com.example.portfolio2/com/example/portfolio2/Controller.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/com.example.portfolio2/com/example/portfolio2/Controller.java b/src/com.example.portfolio2/com/example/portfolio2/Controller.java
index 91236ea..e249863 100644
--- a/src/com.example.portfolio2/com/example/portfolio2/Controller.java
+++ b/src/com.example.portfolio2/com/example/portfolio2/Controller.java
@@ -37,11 +37,11 @@ class Controller {
/// callback when category has been selected
///
- /// @param combo involved activity box
- /// @param select selected item
- /// @param area whole text area
+ /// @param category selected category
+ /// @param select selected item
+ /// @param area whole text area
void onCategorySelected(
- final ComboBox<String> combo,
+ final String category,
final ComboBox<String> select,
final TextArea area
) {
@@ -53,8 +53,7 @@ class Controller {
area.clear();
// fill activity box from data in store
- select.getItems().addAll(
- store.selectProgram(combo.getValue()));
+ select.getItems().addAll(store.selectProgram(category));
}
/// callback when activity has been selected