/** * Set the application name into the context. * * @param value Application name. */ public static void setAppName(String value) { setAttribute("applicationName", value); }
/** * Sets the default layout scope. * * @param isShared If true, the default scope is shared. If false, it is private. */ public static void defaultIsShared(boolean isShared) { FrameworkUtil.setAttribute(ATTR_DEFAULT_SCOPE, isShared ? true : null); }
/** * Set the application name into the context. * * @param value Application name. */ public static void setAppName(String value) { setAttribute("applicationName", value); }
/** * Closes the dialog and returns the selected patient to the caller. * * @param patient Patient selected by the user. */ public void selectPatient(Object patient) { FrameworkUtil.setAttribute(Constants.RESULT_ATTRIB, patient); root.detach(); }
/** * Returns the current patient selector. If one has not already been created, it is created from * the factory. * * @return The patient selector. */ private static IPatientSelector getSelector() { IPatientSelector selector = (IPatientSelector) FrameworkUtil.getAttribute(Constants.SELECTOR_ATTRIB); if (selector == null) { IPatientSelectorFactory factory = getFactory(); selector = factory == null ? null : factory.create(); FrameworkUtil.setAttribute(Constants.SELECTOR_ATTRIB, selector); } return selector; }
/** * Returns true if drill down icons are enabled. * * @return True if drill down icons are enabled. */ public static boolean showIcons() { Boolean result = (Boolean) FrameworkUtil.getAttribute(Constants.PROPERTY_ID_DRILLDOWN); if (result == null) { try { String value = PropertyUtil.getValue(Constants.PROPERTY_ID_DRILLDOWN); result = BooleanUtils.toBoolean(value); } catch (Exception e) { result = true; } FrameworkUtil.setAttribute(Constants.PROPERTY_ID_DRILLDOWN, result); } return result; }
/** * Returns true if drill down icons are enabled. * * @return True if drill down icons are enabled. */ public static boolean showIcons() { Boolean result = (Boolean) FrameworkUtil.getAttribute(Constants.PROPERTY_ID_DRILLDOWN); if (result == null) { try { String value = PropertyUtil.getValue(Constants.PROPERTY_ID_DRILLDOWN); result = BooleanUtils.toBoolean(value); } catch (Exception e) { result = true; } FrameworkUtil.setAttribute(Constants.PROPERTY_ID_DRILLDOWN, result); } return result; }
/** * Displays the encounter selection dialog. * * @param flags The encounter flags. */ public static void execute(EncounterFlag... flags) { try { Window dlg = (Window) FrameworkUtil.getAttribute(SELECTION_DIALOG); if (dlg == null || dlg.getPage() == null) { dlg = PopupDialog.popup(SELECTION_DIALOG, true, true, false); FrameworkUtil.setAttribute(SELECTION_DIALOG, dlg); } MainController sel = (MainController) getController(dlg); sel.setEncounterFlags(EncounterFlag.flags(flags)); if (sel.needsInit) { sel.init(); } dlg.doModal(); } catch (Exception e) { FrameworkUtil.setAttribute(SELECTION_DIALOG, null); throw MiscUtil.toUnchecked(e); } }
/** * Displays the encounter selection dialog. * * @param flags The encounter flags. */ public static void execute(EncounterFlag... flags) { String resource = Constants.RESOURCE_PREFIX + "encounterSelection.zul"; Window dlg = (Window) FrameworkUtil.getAttribute(resource); if (dlg == null || dlg.getPage() == null) { dlg = PopupDialog.popup(resource, true, true, false); FrameworkUtil.setAttribute(resource, dlg); } try { EncounterSelection sel = ZKUtil.findChild(dlg, EncounterSelection.class); sel.setEncounterFlags(EncounterFlag.flags(flags)); dlg.doModal(); } catch (Exception e) { throw new RuntimeException(e); } }