Skip to content
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

showView methods from AbstractJavaFxApplicationSupport should return more information #74

Open
Blackdread opened this issue Aug 5, 2018 · 1 comment

Comments

@Blackdread
Copy link

Both methods should return at least the AbstractFxmlView, but could useful to return an interface that would allow to get:

  • AbstractFxmlView
  • Stage
  • more?

When using

public static void showView(final Class<? extends AbstractFxmlView> window, final Modality mode) {
}

or

public static void showView(final Class<? extends AbstractFxmlView> newView) {
}

Mainly useful for the first one.

It would allow to call getPresenter() on the returned View bean (newly instantiated or previous managed bean).

The use case is when a AbstractFxmlView and Controller are annotated with @ Scope("prototype").
With a modality mode passed, it is not possible to get the Controller and set some field in order to finish the initialization.

@octaviospain
Copy link
Contributor

Some changes related to this were implemented in #58, the showView methods now belongs to classes that extends from AbstractFxmlView. Check the code changed and upgrade to version 2.1.6

You can inject your @FXMLView annotated class as any other, and call getPresenter() and others methods/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants