public void onDateChange(Event event) { event = ZKUtil.getEventOrigin(event); }
/** * Display the issue viewer dialog for the specified items. * * @param items Esignature items that have issues for display. * @return True unless the dialog was canceled. * @throws Exception Unspecified exception. */ public static boolean execute(List<ESigItem> items) throws Exception { IssueViewer dlg = (IssueViewer) ZKUtil.loadZulPage(Constants.RESOURCE_PREFIX + "issueViewer.zul", null); dlg.init(items); dlg.doModal(); return !dlg.canceled; }
public void setColor(String color) { this.color = color; ZKUtil.updateStyle(lblCurrentTime, "color", color); }
/** * Create the dialog. * * @param parent The parent component. * @param dataObject The data object. * @param title The dialog title. */ public DrillDownDisplay(Component parent, Object dataObject, String title) { super(parent, title); setDataObject(dataObject); setWidth("600px"); try { Executions.createComponents(ZKUtil.loadCachedPageDefinition(Constants.RESOURCE_PREFIX + "drillDownDisplay.zul"), this, null); ZKUtil.wireController(this); adjustGrid(); } catch (Exception e) { log.error("Error creating drilldown display dialog.", e); } }
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); ZKUtil.wireController(ZKUtil.loadZulPage(PARTICIPANT_SELECTOR, comp), this); broker = VistAUtil.getBrokerSession(); lstAllParticipants.setItemRenderer(new ParticipantRenderer()); lstAllParticipants.setModel(allParticipantsModel); lstEncounterParticipants.setItemRenderer(encounterParticipantRenderer); lstEncounterParticipants.setModel(encounterParticipantsModel); }
public void onDeleteNote$lstNotes(Event event) { event = ZKUtil.getEventOrigin(event); Listitem item = ZKUtil.findAncestor(event.getTarget(), Listitem.class); ProblemNote pn = (ProblemNote) item.getValue(); if (PromptDialog .confirm("Are you sure that you wish to delete this note:\n" + pn.getNumber() + " - " + pn.getNarrative(), "Delete Note?")) { item.detach(); if (VistAUtil.validateIEN(pn)) { changedNotes.add(pn); } else { changedNotes.remove(pn); } } }
public void onTest() throws Exception { PopupDialog popup = new PopupDialog(null, "Test Popup"); setSizable(false); ZKUtil.loadZulPage(ZKUtil.getResourcePath(PopupTest.class) + "testPopup2.zul", popup); popup.addForward("onTest", this, null); popup.show(); } }
/** * Wire variables and events. * * @throws Exception Unspecified exception. */ public void onCreate() throws Exception { log.trace("onCreate"); ZKUtil.wireController(this, this); init(); }
private void setActivePatient(Patient patient) { // Build the demographic display here activePatient = patient; root.setAttribute(Constants.SELECTED_PATIENT_ATTRIB, activePatient); ZKUtil.detachChildren(pnlDemoRoot); if (patient != null && patientDetailRenderer != null) { patientDetailRenderer.render(pnlDemoRoot, patient, this); } btnDemoDetail.setDisabled(activePatient == null); updateControls(); }
/** * Create the controller. * * @param service The is the data query service. * @param labelPrefix Prefix used to resolve label id's with placeholders. * @param propertyPrefix Prefix for property names. * @param printStyleSheet Optional style sheet to apply when printing. * @param patientAware If true, uses patient context. * @param autowireColumns If true, columns are auto-wired with sort comparators. * @param grouper The grouper implementation, or null if the data is not grouped. */ @SuppressWarnings("unchecked") public AbstractMeshController(IQueryService<T> service, String labelPrefix, String propertyPrefix, String printStyleSheet, boolean patientAware, boolean autowireColumns, IGrouper<M, ?> grouper) { super(service, patientAware, labelPrefix); this.propertyPrefix = propertyPrefix; this.autowireColumns = autowireColumns; if (printStyleSheet != null && !printStyleSheet.startsWith("~./")) { printStyleSheet = ZKUtil.getResourcePath(getClass()) + printStyleSheet; } this.printStyleSheet = printStyleSheet; this.grouper = grouper; this.listModel = new HybridModel<M, Object>((IGrouper<M, Object>) grouper); }
/** * Close the main dialog. */ private void close() { ZKUtil.findAncestor(root, Window.class).detach(); }
/** * Update controls to reflect the current selection state. * * @param processingUpdate If true, a processing status update has occurred. */ private void updateControls(boolean processingUpdate) { btnAll.setDisabled(isProcessing || model.isEmpty()); btnDelete.setDisabled(isProcessing || !canDeleteSelected()); btnInfoAll.setDisabled(isProcessing || !hasInfoOnly()); btnSelected.setDisabled(isProcessing || model.getSelection().isEmpty()); btnForward.setDisabled(isProcessing || btnSelected.isDisabled()); radAll.setStyle(radAll.isChecked() ? BOLD : NO_BOLD); radPatient.setStyle(radPatient.isChecked() ? BOLD : NO_BOLD); if (processingUpdate) { lstNotification.setDisabled(isProcessing); ZKUtil.disableChildren(lstNotification, isProcessing); } }
private void init(List<ESigItem> items) { ZKUtil.wireController(this, this); this.items = items; for (ESigItem item : items) { addItem(item); } updateControls(); }
/** * Re-renders a previously rendered row. * * @param row Row to re-render. */ protected void rerender(Row row) { try { ZKUtil.detachChildren(row); grid.getRowRenderer().render(row, row.getValue(), row.getIndex()); } catch (Exception e) { throw MiscUtil.toUnchecked(e); } }
@Override protected void init() { setup("Anticoagulation Data", "", "BGOVCOAG GET", null, 1, "Indicated", "Visit Date", "INR Goal", "Min", "Max", "Duration", "Start Date", "End Date", "Entered Date", "Category", "Comment"); toolbar.setVisible(true); setIcon(ZKUtil.getResourcePath(MainController.class) + "main-icon.png"); super.init(); }
dropContainer = ZKUtil.findAncestor(renderedItem, DropContainer.class);
/** * Loads form data from the current problem. */ private void loadForm() { if (test != null) { setEventType(test.getEventType()); radRefusal.setDisabled(!radRefusal.isChecked()); radHistorical.setDisabled(!radHistorical.isChecked()); radCurrent.setDisabled(!radCurrent.isChecked()); datEvent.setValue(test.getDate()); ZKUtil.disableChildren(fraHistorical, true); datEvent.setDisabled(true); int reading = NumberUtils.toInt(test.getReading(), -1); spnReading.setValue(reading < 0 ? null : reading); } else { onClick$btnSkinTest(); if (txtSkinTest.getValue().isEmpty()) { close(true); return; } setEventType(EventType.CURRENT); Encounter visit = EncounterContext.getActiveEncounter(); Date date = visit == null ? null : visit.getPeriod().getStart(); datEvent.setValue(DateUtil.stripTime(date == null ? new Date() : date)); } }
public void onDataChange(Event event) { event = ZKUtil.getEventOrigin(event); }
/** * Displays the signature review dialog. * * @param esigService Reference to the esignature service. * @param filter Optional filter to control which items are displayed. * @return True unless the dialog was canceled. * @throws Exception Unspecified exception. */ public static boolean execute(IESigService esigService, ESigFilter filter) throws Exception { Iterable<ESigItem> items = esigService.getItems(filter); if (items == null || !items.iterator().hasNext()) { return true; } ESigViewer dlg = (ESigViewer) ZKUtil.loadZulPage(Constants.RESOURCE_PREFIX + "esigViewer.zul", null); dlg.init(esigService, items); dlg.doModal(); return !dlg.canceled; }
/** * Override to implement any special controller initialization logic. */ protected void initializeController() { log.trace("Initializing Controller"); if (lblMessage != null) { lblMessage.setZclass("z-toolbar"); ZKUtil.updateStyle(lblMessage, "text-align", "center"); } }