attachUi(TaskModel.class, Builders.buildUiData(getView().yourPlaceHolder()).toArray(new WaveData[0]));
Builders.buildUiData allow to customize the wave bean and the command called.
=>Grab the view/rootNode of the TaskModel:
model.getRootNode()
getModel(TaskModel.class).getRootNode() // Warning this code will be run into the current thread so it't not adviced.
=> Build yourself the wave that does the job (longest method)
=> use fx:include if your view hierarchy is composed by several fxml files aggregated.
=> manage them by using InnerComponent, if the TaskModel is always used inside its parent. InnerComponent lifecycle rely on their parents lifecycle.
To conclude, you can use a MainModel<BorderPane> loaded by the Application (public Class<? extends Model> getFirstModelClass() { return MainModel.class;}), in this model you can add code into showView, to attach your TaslModel to the centerproperty of the BorderPane.
(use ShowmodelCommand before 8.0.3, otherwise attachUi)
You can find an example here for your MainModel : https://github.com/JRebirth/MasteringTables/blob/master/org.jrebirth.demo.masteringtables/src/main/java/org/jrebirth/demo/masteringtables/ui/page/PageModel.java
This is a small and simple game from which you can get inspiration.
If you want to use StackModel you have a sample here : https://github.com/JRebirth/JRebirth/blob/master/org.jrebirth.af/showcase/fxml/src/main/java/org/jrebirth/af/showcase/fxml/ui/main/FXMLShowCaseModel.java
Let me know if you have any question
Seb
Hello SébastienI'm using JRebirth first time and want to create an application which shows several modules (tasks, notifications, etc.).But I'm stucking with adding an (for instance Task.fxml) view into the existent tree. I don't know how to instanciate the model (FXML, Model, Controller) andhow to insert it into the tree at a specific pane with JRebirth. FXMLoader failes.I found the class StackModel - but seams this is for a main screen switch, not for an particular location.Do you have an sample, how to navigate between views with JRebirth? The documentation announce something about in wave chapter.Thanks a lot in advanceKind RegardsAndreas
I should improve documentation and javadoc to explicitly mention that default folders of fonts, styles and images are configurable (and have a default value) using a JRebirth parameter.
Best Regards
--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "JRebirth Users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jrebirth-user...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jrebirth-users+unsubscribe@googlegroups.com.