-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep default values for fields if parameter isn't provided #71
Conversation
LeStegii
commented
Mar 14, 2024
- Don't overwrite values if parameter isn't provided
- cleanup some code
framework/src/main/java/org/fulib/fx/controller/ControllerManager.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/fulib/fx/controller/ControllerManager.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/fulib/fx/controller/ControllerManager.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Adrian Kunz <[email protected]>
Co-authored-by: Adrian Kunz <[email protected]>
Co-authored-by: Adrian Kunz <[email protected]>
framework/src/main/java/org/fulib/fx/controller/ControllerManager.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/fulib/fx/controller/ControllerManager.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but there was a suggestion for another usecase that could be integrated. Right in this case:
class Component1 {
@Param("foo")
IntegerProperty fooProperty;
}
class Component2 {
IntegerProperty fooProperty;
// ...
show(component1, Map.of("foo", fooProperty));
}
There will be an error. In this case it makes sense to treat the attribute as a regular object instead of a WritableValue
. I am unsure about other cases involving final
, or if bind
or even bindBidirectional
might be wanted. But I guess as a default behavior, simple assignment should be possible.
I changed it so that the special logic for |
# Conflicts: # framework/src/main/java/org/fulib/fx/controller/ControllerManager.java