/** * Display the error message. * * @param message The error message. */ private void setError(String message) { lblError.setValue(message == null ? " " : message); }
public Label(String value) { setValue(value); }
/** Sets the value of the {@link Label} it contains. * * <p>If it is not created, we automatically create it. */ public void setLabel(String label) { autoFirstCell().setValue(label); }
/** * Sets the documents to be displayed and updates the displayed count. * * @param documents The documents to be displayed. */ protected void setDocuments(List<Document> documents) { this.documents = documents; int docCount = documents == null ? 0 : documents.size(); lblInfo.setValue(docCount + " document(s)"); refresh(); }
/** Sets the value of the {@link Label} it contains. * * <p>If it is not created, we automatically create it. */ public void setLabel(String label) { autoFirstCell().setValue(label); }
/** * Displays the specified message text on the form. * * @param text Message text to display. */ private void showMessage(String text) { lblMessage.setValue(text); tbMessage.setVisible(!StringUtils.isEmpty(text)); }
/** * Displays the specified message text on the form. * * @param text Message text to display. */ private void showMessage(final String text) { lblMessage.setValue(text); lblMessage.setVisible(!StringUtils.isEmpty(text)); }
/** * Displays the specified message text on the form. * * @param text Message text to display. * @param args Additional args for message. */ private void showMessage(String text, Object... args) { text = StrUtil.formatMessage(text, args); lblMessage.setValue(text); }
/** * Displays the specified message text on the form. * * @param text Message text to display. */ private void showMessage(String text) { lblMessage.setValue(text); lblMessage.getParent().setVisible(!StringUtils.isEmpty(text)); }
/** * Disable all user input elements. * * @param text Status text to display. */ private void showStatus(String text) { lblStatus.setValue(text); loginPrompts.setVisible(false); lblStatus.setVisible(true); }
/** * Disable all user input elements. * * @param text State text to display. */ private void showState(final String text) { lblState.setValue(text); loginPrompts.setVisible(false); lblState.setVisible(true); }
private void setLabel(Label label, String value, Component associatedComponent) { label.setValue(value); label.setVisible(value != null && !value.isEmpty()); if (associatedComponent != null) { associatedComponent.setVisible(label.isVisible()); } }
/** * Update the display when the location context changes. */ @Override public void committed() { Location location = LocationContext.getActiveLocation(); if (log.isDebugEnabled()) { log.debug("location: " + location); } String text = location == null ? noSelectionMessage : location.getName().getValue(); locationHeader.setValue(text); Clients.resize(root); }
@Override protected void setListModel(ListModel<Document> model) { super.setListModel(model); int docCount = model == null ? 0 : model.getSize(); lblInfo.setValue(docCount + " document(s)"); btnView.setDisabled(docCount == 0); updateSelectCount(((Selectable<?>) model).getSelection().size()); }
private void setValue(int col, int row, String value) { Component cmp = getCell(col, row).getFirstChild(); cmp.setAttribute("value", value); if (cmp instanceof Label) { ((Label) cmp).setValue(value); } else { ((Textbox) cmp).setValue(value); } }
/** * Sets the fixed filter. * * @param name The fixed filter. */ public void setFixedFilter(String name) { fixedFilter = findCategory(name); cboFilter.setVisible(fixedFilter == null); lblFilter.setVisible(fixedFilter != null); lblFilter.setValue(fixedFilter == null ? null : fixedFilter.getName()); refresh(); }
/** * Show detail for specified list item. * * @param li The list item. */ protected void showDetail(Listitem li) { @SuppressWarnings("unchecked") T value = li == null ? null : (T) li.getValue(); String detail = value == null ? null : getDetail(value); detailView.setValue(detail); if (!getShowDetailPane() && detail != null) { ReportBox.modal(detail, detailTitle, getAllowPrint()); } }
/** * @see org.zkoss.zk.ui.util.GenericAutowireComposer#doAfterCompose(org.zkoss.zk.ui.Component) */ @Override public void doAfterCompose(HtmlBasedComponent comp) throws Exception { super.doAfterCompose(comp); lblMessage.setValue(AbstractSecurityService.getLogoutAttribute(Constants.LOGOUT_WARNING_ATTR, StrUtil.getLabel(Constants.LBL_LOGOUT_MESSAGE_DEFAULT))); btnLogin.setHref(AbstractSecurityService.getLogoutAttribute(Constants.LOGOUT_TARGET_ATTR, "/")); // Unregister this desktop to allow session to auto-invalidate if appropriate. Application.getInstance().register(desktop, false); }
/** * Update dependent UI elements when security domain selection has changed. */ private void domainChanged() { ISecurityDomain securityDomain = getSelectedSecurityDomain(); lblDomain.setValue(securityDomain.getName()); String logoUrl = securityDomain.getAttribute(Constants.PROP_LOGIN_LOGO); imgDomain.setSrc(logoUrl == null ? defaultLogoUrl : logoUrl); setMessageText(securityDomain.getAttribute(Constants.PROP_LOGIN_HEADER), lblHeader, htmlHeader, null); setMessageText(securityDomain.getAttribute(Constants.PROP_LOGIN_INFO), lblInfo, htmlInfo, divInfo); }
private void managedListFilterChanged() { if (itemManager != null) { itemManager.save(); lstManagedList.setModel(new ListModelList<PatientListItem>(managedList.getListItems())); AbstractPatientListFilter filter = managedList.getActiveFilter(); lblManagedList.setValue(managedList.getEntityName() + (filter == null ? "" : ": " + filter.getName())); } updateControls(); }