/** * Can be used to popup any page as a modal dialog. * * @param fspPage Url of page. * @param closable If true, window closure button appears. * @param sizable If true, window sizing grips appear. * @param show If true, the window is displayed modally. If false, the window is created but not * displayed. * @return Reference to the opened window, if successful. */ public static Window popup(String fspPage, boolean closable, boolean sizable, boolean show) { return PopupDialog.show(fspPage, null, closable, sizable, show, null); }
/** * Invokes the layout manager dialog. * * @param manage If true, open in management mode; otherwise, in selection mode. * @param deflt Default layout name. * @param closeListener Close event listener. */ public static void show(boolean manage, String deflt, IEventListener closeListener) { Map<String, Object> args = new HashMap<>(); args.put("manage", manage); args.put("deflt", deflt); PopupDialog.show(RESOURCE_PREFIX + "layoutManager.fsp", args, true, true, true, closeListener); }
/** * Display a detail dialog for a single manifest entry. * * @param manifestItem The row to display. If null, all manifests are displayed. */ private static void execute(ManifestItem manifestItem) { Map<String, Object> args = new HashMap<>(); args.put("manifestItem", manifestItem); PopupDialog.show(CWFUtil.getResourcePath(ManifestViewer.class) + "manifestViewer.fsp", args, true, false, true, null); }
/** * Creates and displays the form. * * @param form Url of the form. * @param domainObject The domain object to be modified. * @return True if changes were committed. False if canceled. */ protected static boolean execute(String form, Object domainObject) { Map<String, Object> args = new HashMap<>(); args.put("domainObject", domainObject); BaseComponent dlg = PopupDialog.show(form, args, true, false, true, null); return dlg.getAttribute("cancelled", false); }
/** * Show the dialog, loading the specified document. * * @param document The XML document. * @param parent If specified, show viewer in embedded mode. Otherwise, show as modal dialog. * @return The dialog. */ public static Window showXML(Document document, BaseUIComponent parent) { Map<String, Object> args = Collections.singletonMap("document", document); boolean modal = parent == null; Window dialog = PopupDialog.show(XMLConstants.VIEW_DIALOG, args, modal, modal, modal, null); if (parent != null) { dialog.setParent(parent); } return dialog; }
/** * Creates a chat session bound to the specified session id. * * @param sessionId The chat session id. * @param originator If true, this user is originating the chat session. * @return The controller for the chat session. */ protected static SessionController create(String sessionId, boolean originator) { Map<String, Object> args = new HashMap<>(); args.put("id", sessionId); args.put("title", StrUtil.formatMessage("@cwf.chat.session.title")); args.put("originator", originator ? true : null); Window dlg = PopupDialog.show(DIALOG, args, true, true, false, null); return (SessionController) FrameworkController.getController(dlg); }
/** * Displays the dialog. * * @param text The text or HTML content. HTML content is indicated by prefixing with the html * tag. * @param title Dialog title. * @param allowPrint If true, a print button is provided. * @param asModal If true, open as modal; otherwise, as popup. * @param callback Callback when dialog is closed. * @return The created dialog. */ public static Window show(String text, String title, boolean allowPrint, boolean asModal, IEventListener callback) { Map<String, Object> args = new HashMap<>(); args.put("text", text); args.put("title", title); args.put("allowPrint", allowPrint); Window dialog = PopupDialog.show(DialogConstants.RESOURCE_PREFIX + "reportDialog.fsp", args, true, true, false, null); if (asModal) { dialog.modal(callback); } else { dialog.popup(callback); } return dialog; }
/** * Displays the participant invitation dialog. * * @param sessionId The id of the chat session making the invitation request. * @param exclusions List of participants that should be excluded from user selection. * @param callback Reports the list of participants that were sent invitations, or null if the * dialog was cancelled. */ @SuppressWarnings("unchecked") public static void show(String sessionId, Collection<IPublisherInfo> exclusions, IResponseCallback<Collection<IPublisherInfo>> callback) { Map<String, Object> args = new HashMap<>(); args.put("sessionId", sessionId); args.put("exclusions", exclusions); PopupDialog.show(DIALOG, args, true, true, true, (event) -> { Collection<IPublisherInfo> invitees = (Collection<IPublisherInfo>) event.getTarget().getAttribute("invitees"); IResponseCallback.invoke(callback, invitees); }); }
/** * Show the popup dialog, populating it with detail information for the specified data object. */ @Override public void show() { addRows(); if (debug) { debugObject(dataObject, false); } if (grid.getRows().getChildren().size() > 20) { grid.setHeight("600px"); } super.show(); }