Releases: carldea/cognitive
Releases · carldea/cognitive
v1.5.0
What's Changed
- #11 New support for adding a runnable code block to a view model's properties that change.
Here are new features to simplify code in certain scenarios.
- Updating the view model after JFXNode object is FXML loaded. JFXNode's updateViewModel() method.
- Getting the view model after JFXNode object is FXML loaded. JFXNode's getViewModel() method.
- Running a code block when a property has changed. ViewModel's .doOnChange() method.
- Validate on change runs validators based on a property change. ViewModel's
- Determine if Form is invalid. The ValidationViewModel's onInvalid() method.
- Determine if Form is valid. ValidationViewModel's onValid() method.
Full Changelog: release/1.4.0...release/1.5.0
v1.4.0
New support to get properties as a JavaFX property based on common datatypes such as the following:
if (myViewModel.getIntegerProperty(AGE).isLessThan(50)) {
System.out.println(" you are %s years young!".formatted(myViewModel.getIntegerProperty(AGE).getValue()));
};
Prior we only had getProperty(AGE)
where you could not compare the value in an if statement (inline) like above.
IntegerProperty ageProp = myViewModel.getProperty(AGE);
if (ageProp.isLessThan(50)) {
System.out.println(" you are %s years young!".formatted(ageProp.getValue()));
};
v1.3.0
What's Changed
- Correct a little typo error in README by @RealThanhpv in #5
- #6 Feature to support multiple validation messages. by @carldea in #7
- #8 feature to support for Enum property lookups, slf4j, junit5, and began tests by @carldea in #8
New Contributors
- @RealThanhpv made their first contribution in #5
Full Changelog: release/1.1.0...release/1.3.0
v1.2.0
v1.1.0
v1.0.0
Intro
This is the initial release of cognitive v1.0.0. Cognitive is a lightweight framework based on the MVVM UI architectural design pattern.
Features
- Dependancy injection of ViewModels into controller classes.
- A simple view model to maintain a state of a form UI
- A validation view model supporting validators
- Check for error, info and warning type messages.
TODOs
- Bean view model
- Validation bean view model
- Ability to apply error messages to validation overlay icons on UI controls
- Clean up documentation
- Think about an overloaded save() method receiving a consumer allowing caller to provide code to execute if validation fails and code when validation succeeds.