Package org.zkoss.zul.impl

Examples of org.zkoss.zul.impl.MessageboxDlg


    if ((buttons & ABORT) != 0)
      params.put("ABORT", new Integer(ABORT));
    if ((buttons & IGNORE) != 0)
      params.put("IGNORE", new Integer(IGNORE));

    final MessageboxDlg dlg = (MessageboxDlg)
      Executions.createComponents(_templ, null, params);
    dlg.setButtons(buttons);
    dlg.setEventListener(listener);
    if (focus > 0) dlg.setFocus(focus);

    if (dlg.getDesktop().getWebApp().getConfiguration().isEventThreadEnabled()) {
      try {
        dlg.doModal();
      } catch (Throwable ex) {
        try {
          dlg.detach();
        } catch (Throwable ex2) {
          log.warningBriefly("Failed to detach when recovering from an error", ex2);
        }
        if (ex instanceof InterruptedException)
          throw (InterruptedException)ex;
        throw UiException.Aide.wrap(ex);
      }
      return dlg.getResult();
    } else {
      dlg.doHighlighted();
      return OK;
    }
  }
View Full Code Here


     *
     * @param materialAssignment
     */
    @SuppressWarnings("unchecked")
    public void showSplitMaterialAssignmentDlg(A materialAssignment) {
        MessageboxDlg dialogSplitAssignment;

        final String message = _("Do you want to split the material assignment {0}?",
                getMaterial(materialAssignment).getCode());

        Map args = new HashMap();
        args.put("message", message);
        args.put("title", _("Split new assignment"));
        args.put("OK", Messagebox.OK);
        args.put("CANCEL", Messagebox.CANCEL);
        args.put("icon", Messagebox.QUESTION);

        dialogSplitAssignment = (MessageboxDlg) Executions
                .createComponents("/orders/_splitMaterialAssignmentDlg.zul",
                        self, args);
        Decimalbox dbUnits = (Decimalbox) dialogSplitAssignment
                .getFellowIfAny("dbUnits");
        dbUnits.setValue(getUnits(materialAssignment));
        try {
            dialogSplitAssignment.doModal();
            int status = dialogSplitAssignment.getResult();
            if (Messagebox.OK == status) {
                splitMaterialAssignment(materialAssignment, dbUnits.getValue());
            }
        } catch (SuspendNotAllowedException e) {
            throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.impl.MessageboxDlg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.