Opens the principal select dialog within an embedded dialog context.<p>

@param dialogContext the dialog context
@param params the request parameters
422727
public static void openEmbeddedDialog(final CmsEmbeddedDialogContext dialogContext, Map<String, String[]> params) {

        openEmbeddedDialog(dialogContext, params, true);
    }
672134
public void setParamEditContext(String editContext) {

        m_paramEditContext = editContext;
        CmsObject cms = getCms();
        if ((cms != null) && (editContext != null)) {
            cms.getRequestContext().setAttribute(ATTRIBUTE_EDITCONTEXT, editContext);
        }
    }
394194
public void start(IntentFactoryStrategy parameters) {
        Intent intent = buildIntent(parameters);

        parameters.start(context, intent);

    }
1374607
static void initSingleParam(String key, String initValue, DbConn cnx)
    {
        try
        {
            cnx.runSelectSingle("globalprm_select_by_key", 2, String.class, key);
            return;
        }
        catch (NoResultException e)
        {
            GlobalParameter.create(cnx, key, initValue);
        }
        catch (NonUniqueResultException e)
        {
            // It exists! Nothing to do...
        }
    }
741062
protected void open() {

        m_oldValue = m_selectionInput.m_textbox.getValue();
        CmsEmbeddedDialogHandler handler = new CmsEmbeddedDialogHandler();
        handler.setPrincipleSelectHandler(new I_CmsPrincipalSelectHandler() {

            public void selectPrincipal(String principal) {

                if (!getFormValue().equals(principal)) {
                    setFormValueAsString(principal);
                    fireValueChange(principal);
                }
            }
        });
        handler.openDialog(DIALOG_ID, null, null, m_configuration);
    }
86825
public void select(I_CmsPrincipal value) {

        if (m_selectField != null) {
            m_selectField.handlePrincipal(value);
        }
        if (m_selectHandler != null) {
            m_selectHandler.onPrincipalSelect(
                value.isGroup() ? I_CmsPrincipal.PRINCIPAL_GROUP : I_CmsPrincipal.PRINCIPAL_USER,
                value.getName());
        }
        m_closeButton.click();
    }
847061
public CmsSelectBox createViewSelectorForGalleryDialog() {

        List<CmsElementViewInfo> elementViews = m_controller.getData().getElementViews();
        if (elementViews.size() <= 1) {
            return null;
        }
        CmsUUID currentView = m_controller.getElementView().getElementViewId();
        Map<String, String> options = Maps.newHashMap();
        for (CmsElementViewInfo view : elementViews) {
            options.put("" + view.getElementViewId(), view.getTitle());
        }
        CmsSelectBox result = new CmsSelectBox(options);
        result.setFormValueAsString(currentView.toString());
        result.addValueChangeHandler(new ValueChangeHandler<String>() {

            public void onValueChange(ValueChangeEvent<String> event) {

                m_editor.getAdd().setActive(false);
                CmsElementViewInfo newValue = m_controller.getView(event.getValue());
                setElementView(newValue, new Runnable() {

                    public void run() {

                        m_editor.getAdd().setActive(true);
                    }
                });
            }
        });
        result.getElement().getStyle().setWidth(250, Unit.PX);

        return result;
    }
300777
public static void openEditConfirmDialog(final CmsNewResourceInfo resourceInfo) {

        I_CmsConfirmDialogHandler handler = new I_CmsConfirmDialogHandler() {

            public void onClose() {

                // noop
            }

            public void onOk() {

                String resourcePath = resourceInfo.getVfsPath();
                String siteRoot = CmsCoreProvider.get().getSiteRoot();
                if (resourcePath.startsWith(siteRoot)) {
                    resourcePath = resourcePath.substring(siteRoot.length());
                    // prepend slash if necessary
                    if (!resourcePath.startsWith("/")) {
                        resourcePath = "/" + resourcePath;
                    }
                }
                CmsSitemapController controller = CmsSitemapView.getInstance().getController();
                controller.leaveEditor(resourcePath);
            }
        };
        String dialogTitle = Messages.get().key(Messages.GUI_EDIT_MODELPAGE_CONFIRM_TITLE_0);
        String dialogContent = Messages.get().key(Messages.GUI_EDIT_MODELPAGE_CONFIRM_CONTENT_0);
        String buttonText = Messages.get().key(Messages.GUI_EDIT_MODELPAGE_OK_0);

        CmsConfirmDialog dialog = new CmsConfirmDialog(dialogTitle, dialogContent);
        dialog.getOkButton().setText(buttonText);
        dialog.setHandler(handler);
        dialog.center();
    }
608843
public void showPublishDialog() {

        CmsPublishDialog.showPublishDialog(new HashMap<String, String>(), new CloseHandler<PopupPanel>() {

            /**
             * @see com.google.gwt.event.logical.shared.CloseHandler#onClose(com.google.gwt.event.logical.shared.CloseEvent)
             */
            public void onClose(CloseEvent<PopupPanel> event) {

                deactivateCurrentButton();

            }
        }, new Runnable() {

            public void run() {

                showPublishDialog();
            }

        }, null);
    }
890089
function(params, callback) {
        /**
         * Callback for QB.chat.dialog.create().
         * @param {Object} error - The error object
         * @param {Object} createdDialog - the dialog object
         * @callback createDialogCallback
         * */

        if (params && params.occupants_ids && Utils.isArray(params.occupants_ids)) {
            params.occupants_ids = params.occupants_ids.join(', ');
        }

        this.service.ajax({
            url: Utils.getUrl(DIALOGS_API_URL),
            type: 'POST',
            data: params
        }, callback);
    }
130977
public synchronized void initParams(CmsToolDialog wp) {

        setCurrentRoot(wp, wp.getParamRoot());
        setCurrentToolPath(wp, wp.getParamPath());
        setBaseToolPath(wp, wp.getParamBase());

        // if the current tool path is not under the current root, set the current root as the current tool
        if (!getCurrentToolPath(wp).startsWith(getBaseToolPath(wp))) {
            setCurrentToolPath(wp, getBaseToolPath(wp));
        }
        wp.setParamPath(getCurrentToolPath(wp));
        wp.setParamBase(getBaseToolPath(wp));
        wp.setParamRoot(getCurrentRoot(wp).getKey());
    }
275454
public int showDialog(Component parent) {
        dialogResultValue = ERROR_OPTION;
        JDialog dialog = createDialog(parent);
        dialog.addWindowListener(new WindowAdapter() {

            @Override
            public void windowClosing(WindowEvent e) {
                dialogResultValue = CANCEL_OPTION;
            }
        });

        dialog.setVisible(true);
        dialog.dispose();
        dialog = null;

        return dialogResultValue;
    }
899586
public void openDialog(final I_CmsDialogContext context, String tabId) {

        CmsGwtDialogExtension extension = new CmsGwtDialogExtension(A_CmsUI.get(), new I_CmsUpdateListener<String>() {

            public void onUpdate(List<String> updatedItems) {

                List<CmsUUID> ids = Lists.newArrayList();
                for (String item : updatedItems) {
                    ids.add(new CmsUUID(item));
                }
                context.finish(ids);
            }
        });
        extension.openInfoDialog(context.getResources().get(0), tabId);
    }
1222116
function(selector, params) {
      var t = this;
      UI.pauseTour();
      $(selector).css({display:'none'}).centerBox().css({top:40}).modal('show');
      setTimeout(function(){
        // $(selector).centerBox().css({top:40}).modal('show');
      }, 0);

      // Set the cursor when the dialog fades in
      setTimeout(function(){
        $(selector + ' input').first().focus();
      }, 500);
    }
589721
protected void openPublish() {

        HashMap<String, String> params = Maps.newHashMap();
        params.put(CmsPublishOptions.PARAM_CONTAINERPAGE, "" + CmsCoreProvider.get().getStructureId());
        params.put(CmsPublishOptions.PARAM_START_WITH_CURRENT_PAGE, "");
        params.put(CmsPublishOptions.PARAM_DETAIL, "" + m_controller.getData().getDetailId());
        CmsPublishDialog.showPublishDialog(params, new CloseHandler<PopupPanel>() {

            /**
             * @see com.google.gwt.event.logical.shared.CloseHandler#onClose(com.google.gwt.event.logical.shared.CloseEvent)
             */
            public void onClose(CloseEvent<PopupPanel> event) {

                deactivateCurrentButton();
                activateSelection();

            }
        }, new Runnable() {

            public void run() {

                openPublish();
            }

        }, m_controller.getContentEditorHandler());
    }
153484
public static <G extends GroupedOptions> G select(String[] params, G... groupings)
    {
        for (String param : params)
        {
            boolean accepted = false;
            for (GroupedOptions grouping : groupings)
                accepted |= grouping.accept(param);
            if (!accepted)
                throw new IllegalArgumentException("Invalid parameter " + param);
        }
        for (G grouping : groupings)
            if (grouping.happy() && grouping.accepted == params.length)
                return grouping;
        return null;
    }
990403
public void openDeleteDialog(Set<String> data) {

        CmsDeleteSiteDialog form = new CmsDeleteSiteDialog(this, data);
        openDialog(form, CmsVaadinUtils.getMessageText(Messages.GUI_SITE_DELETE_0));
    }