You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, one can use @FxView on a controller to link resources (fxml, css, bundles) to it which will be constructed on startup. Then inject FxViewRepository to access it, something like:
@FxView("login")
@Singleton
public class LoginController {
public void prepareLogin(){...}
}
@FxView("core")
@Singleton
public class CoreController {
@Inject FxViewRepository fxViewRepository;
@FXML BorderPane root;
@FXML
void initialize() {
if (!isLoggedIn()) {
var loginViewData = fxViewRepository.getViewData("login");
root.setCenter(loginViewData.getRootNode());
loginViewData.<LoginController>getController().prepareLogin();
}
}
}
Currently, one can use
@FxView
on a controller to link resources (fxml, css, bundles) to it which will be constructed on startup. Then injectFxViewRepository
to access it, something like:or inject
FXMLLoader
to load the view on demand:It would be nice to be able to inject
FXMLLoader
and bind it to a view using a qualifier (making @FxView a qualifier?), something like:The text was updated successfully, but these errors were encountered: