-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conventional fxml views #20
Conventional fxml views #20
Conversation
I kind of doubt this belongs in this extension. I leave it open for other feedbacks. |
Good point!, Implementation relies on CDI. It can be an external library that only works with this extension or updated to handle other DI environments. There are already similar libraries like afterburner.fx (standalone) and ignite (micronaut). So I felt it's suitable to have this to integrate with CDI |
I would like there is an annotation Ideally, the controller can be a CDI bean to process the business logic, the JavaFX fxml file is used to layout the UI, also can access the controller properties/method via EL like Jakarta Faces/Facelets. Personally I have used JavaFX Weaver core moudle to integrate CDI/Weld with JavaFX in my example project, https://github.com/hantsy/cargotracker-regapp/blob/master/src/main/java/org/eclipse/cargotrakcer/regapp/ui/HandlingReportController.java#L28 |
|
||
private static final Logger LOGGER = Logger.getLogger(FXMLView.class); | ||
protected static final String FXML_EXT = ".fxml"; | ||
protected static final String CSSL_EXT = ".css"; |
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.
CSSL_EXT -> CSS_EXT
Conventional FXML views
Conventional FXML views offers a convenient way to load FXML based views, by following structural and naming conventions a view can easily be used without manually loading the
.fxml
file and associated stylesheet and resource bundleio.quarkiverse.fx.FXMLView
src/main/resources
src/main/resources
(Optional)src/main/resources
(Optional)Example
ContactCardView.java
Extending FXMLView specifying the root node as defined on
ContactCardView.fxml
ContactCardView.fxml
styleClass
set to a class defined onContactCardView.css
text
set to an entry defined onContactCardView.properties
resource bundleContactCardView.css
ContactCardView.properties
location=Some location