Created
July 12, 2017 01:53
-
-
Save joeldatabox/9607976489fff5a9277de73e521325b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Dialog<T> { | |
| protected void openDialogModal(String dialog) { | |
| Map<String, Object> options = new HashMap<>(); | |
| options.put("modal", true); | |
| options.put("draggable", false); | |
| options.put("responsive", true); | |
| options.put("resizable", false); | |
| options.put("contentHeight", 600); | |
| options.put("contentWidth", 800); | |
| RequestContext.getCurrentInstance().openDialog(dialog, options, null); | |
| } | |
| protected void openDialog(String dialog) { | |
| RequestContext.getCurrentInstance().openDialog(dialog); | |
| } | |
| protected void openDialog(String dialog, Map<String, Object> options) { | |
| RequestContext.getCurrentInstance().openDialog(dialog, options, null); | |
| } | |
| protected void onCloseDialog() { | |
| RequestContext.getCurrentInstance().closeDialog(null); | |
| } | |
| protected void onSelectDialog(T value) { | |
| RequestContext.getCurrentInstance().closeDialog(value); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment