Tabnine Logo
Window.doModal
Code IndexAdd Tabnine to your IDE (free)

How to use
doModal
method
in
org.zkoss.zul.Window

Best Java code snippets using org.zkoss.zul.Window.doModal (Showing top 9 results out of 315)

origin: org.zkoss.zk/zul

/** Process the onModal event by making itself a modal window.
 */
public void onModal() {
  doModal();
}
origin: stackoverflow.com

 @Listen("onClick = #reorderBtn")
public void onEditorOpen(Event e) {
  Window win = (Window) Executions.createComponents("/lbMenu.zul", this.getSelf(), null);
  win.doModal();
}
origin: org.carewebframework/org.carewebframework.cal.ui.reporting

/**
 * Show detail for specified list item.
 *
 * @param li The list item.
 */
protected void showDetail(Listitem li) {
  @SuppressWarnings("unchecked")
  M modelObject = li == null ? null : (M) li.getValue();
  String detail = modelObject == null ? null : getDetail(modelObject);
  
  if (!StringUtils.isEmpty(detail)) {
    if (getShowDetailPane()) {
      detailView.setContent(detail);
    } else {
      Map<Object, Object> map = new HashMap<Object, Object>();
      map.put("title", detailTitle);
      map.put("content", detail);
      map.put("allowPrint", getAllowPrint());
      try {
        ((Window) ZKUtil.loadZulPage(Constants.RESOURCE_PREFIX + "resourceListDetail.zul", null, map)).doModal();
      } catch (Exception e) {
        PromptDialog.showError(e);
      }
    }
  }
}

origin: org.zkoss.zk/zul

    Events.postEvent(Events.ON_MODAL, this, null);
  else
    doModal();
} else if ("highlighted".equals(name))
  doHighlighted();
origin: org.zkoss.zk/zkplus

private void doModal(Page page, String url) {
  final Execution exec = Executions.getCurrent();
  final Object[] urls = parseUrl(url);
  final Component modalwin = exec.createComponents((String) urls[0], null, (Map) urls[1]);
  if (!(modalwin instanceof Window)) {
    throw new UiException("The page must enclosed with a Window component. Check url definition: " + url);
  }
  modalwin.setPage(page);
  ((Window) modalwin).doModal();
}
origin: org.carewebframework/org.carewebframework.cal.ui.patientselection.v1

/**
 * Handles a deferred request to show the dialog.
 * 
 * @param event The onShow event.
 * @throws Exception Unspecified exception.
 */
public void onShow(Event event) throws Exception {
  root.removeAttribute(Constants.SELECTED_PATIENT_ATTRIB);
  lstSearch.clearSelection();
  onCheck$rgrpLists();
  Events.echoEvent(Events.ON_FOCUS, root, null);
  
  if (!root.inModal()) {
    root.doModal();
  }
}

origin: org.carewebframework/org.carewebframework.vista.ui.context.encounter

/**
 * 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);
  }
}

origin: org.zkoss.zk/zul

/** Sets the mode to overlapped, popup, modal, embedded or highlighted.
 *
 * @see #setMode(String)
 */
public void setMode(int mode) {
  switch (mode) {
  case POPUP:
    doPopup();
    break;
  case OVERLAPPED:
    doOverlapped();
    break;
  case EMBEDDED:
    doEmbedded();
    break;
  case MODAL:
    if (isEventThreadEnabled(false))
      Events.postEvent(Events.ON_MODAL, this, null);
    else
      doModal();
    break;
  case HIGHLIGHTED:
    doHighlighted();
    break;
  default:
    throw new WrongValueException("Unknown mode: " + mode);
  }
}
origin: org.carewebframework/org.carewebframework.vista.ui.encounter

/**
 * 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);
  }
}

org.zkoss.zulWindowdoModal

Javadoc

Makes this window as a modal dialog. It will automatically center the window (ignoring #getLeft and #getTop).

Notice: though both setMode("modal") and doModal() both causes the window to become modal, they are a bit different. doModal causes the event listener to suspend immediately, while setMode("modal") posts an event ( Events#ON_MODAL). That is, #setMode won't suspend the execution immediately, but #doModal will. #doModal can be called only in an event listener, while #setMode can be called anytime.

Popular methods of Window

  • detach
  • getPage
  • getAttribute
  • setTitle
    Sets the title.
  • getCaption
    Returns the caption of this window.
  • getChildren
  • getTitle
    Returns the title. Besides this attribute, you could use Caption to define a more sophisticated capt
  • isMaximizable
    Returns whether to display the maximizing button and allow the user to maximize the window.Default:
  • isMinimizable
    Returns whether to display the minimizing button and allow the user to minimize the window.Default:
  • setAttribute
  • setVisible
    Changes the visibility of the window.Note if you turned on the event thread: If a modal dialog becom
  • afterUnmarshal
  • setVisible,
  • afterUnmarshal,
  • checkOverlappable,
  • doEmbedded,
  • doHighlighted,
  • doOverlapped,
  • doPopup,
  • enterModal,
  • getBorder

Popular in Java

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • getApplicationContext (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • String (java.lang)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now