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

"Back Button" Pattern #1

Open
shannah opened this issue Jan 25, 2021 · 0 comments
Open

"Back Button" Pattern #1

shannah opened this issue Jan 25, 2021 · 0 comments

Comments

@shannah
Copy link

shannah commented Jan 25, 2021

If you want to embed your own custom back button into a View, you can simply fire a FormBackEvent. This will automatically be propagated up the controller hierarchy and handled by the form controller to go "back" to the parent controller.

E.g.

Button back = new Button();
back.addActionListener(evt->{
    evt.consume();
    ActionSupport.dispatchEvent(new FormController.FormBackEvent(back));
});

E.g. You could use this pattern in your back button in the DishView class.

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

1 participant