Executed when the dialog is shown.<p>
435654
protected void onShow() {

        getCloseButton().setEnabled(true);
        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            public void execute() {

                truncate(CmsAlertDialog.this.hashCode() + "", getTopWidgets().getElement().getClientWidth());

            }
        });
    }
299018
protected void actionNext() {

        if (m_dialogIndex >= (m_resources.size() - 1)) {
            return;
        }

        m_dialogIndex++;
        m_uploadPropertyPanel.getPropertyEditor().getForm().validateAndSubmit();
        m_nextAction = new Runnable() {

            public void run() {

                loadDialogBean(m_resources.get(m_dialogIndex));
            }
        };
    }
383627
void exit() {

        if (m_changed) {
            CmsConfirmationDialog.show(
                CmsVaadinUtils.getMessageText(org.opencms.ui.apps.Messages.GUI_EDITOR_CLOSE_CAPTION_0),
                CmsVaadinUtils.getMessageText(org.opencms.ui.apps.Messages.GUI_EDITOR_CLOSE_TEXT_0),
                new Runnable() {

                    public void run() {

                        exitInternal();
                    }
                });
        } else {
            exitInternal();
        }

    }
737980
void openAddUserDialog() {

        CmsPrincipalSelectDialog dialog;

        final Window window = CmsBasicDialog.prepareWindow(DialogWidth.max);

        dialog = new CmsPrincipalSelectDialog(
            this,
            m_stateBean.getPath(),
            window,
            WidgetType.userwidget,
            true,
            WidgetType.userwidget);

        try {
            dialog.setOuComboBoxEnabled(
                !OpenCms.getOrgUnitManager().readOrganizationalUnit(m_cms, m_stateBean.getPath()).hasFlagWebuser()
                    | m_stateBean.getType().equals(CmsOuTreeType.ROLE));
        } catch (CmsException e) {
            LOG.error("Can not read OU.", e);
        }
        window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_USER_TO_GROUP_0));
        window.setContent(dialog);
        A_CmsUI.get().addWindow(window);

    }
185681
void openModelSelectDialog(final CmsEditorContext context, final CmsContentDefinition definition) {

        I_CmsModelSelectHandler handler = new I_CmsModelSelectHandler() {

            public void onModelSelect(CmsUUID modelStructureId) {

                if (modelStructureId == null) {
                    modelStructureId = CmsUUID.getNullUUID();
                }
                openFormEditor(
                    context,
                    definition.getLocale(),
                    definition.getReferenceResourceId().toString(),
                    m_clientId,
                    definition.getNewLink(),
                    modelStructureId,
                    null,
                    null,
                    null,

                    null,
                    m_onClose);
            }
        };
        String title = org.opencms.gwt.client.Messages.get().key(
            org.opencms.gwt.client.Messages.GUI_MODEL_SELECT_TITLE_0);
        String message = org.opencms.gwt.client.Messages.get().key(
            org.opencms.gwt.client.Messages.GUI_MODEL_SELECT_MESSAGE_0);
        CmsModelSelectDialog dialog = new CmsModelSelectDialog(handler, definition.getModelInfos(), title, message);
        dialog.center();
    }
267034
public void openDialog(String dialogId, String contextType, List<CmsUUID> resources) {

        openDialog(dialogId, contextType, resources, null);
    }
1298714
private void initializeShowEditTextDialogPreference() {
        Preference preference =
                findPreference(getString(R.string.show_edit_text_dialog_preference_key));
        preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(final Preference preference) {
                initializeEditTextDialog();
                editTextDialog.setShowAnimation(createRectangularRevealAnimation(preference));
                editTextDialog.setDismissAnimation(createRectangularRevealAnimation(preference));
                editTextDialog.setCancelAnimation(createRectangularRevealAnimation(preference));
                editTextDialog.show();
                return true;
            }

        });
    }
935793
protected void openEditDialog(boolean isNew, String mode, CmsEditHandlerData handlerDataForNew) {

        CmsContainerpageController.get().getContentEditorHandler().openDialog(
            m_editableData,
            isNew,
            m_parentResourceId,
            mode,
            handlerDataForNew);
    }
1014155
public static void showRateDialog(final Context context) {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        showRateDialog(context, builder);
    }
507302
@Override
    public void onDialogTimeout(MAPDialog mapDialog) {
        logger.error(String.format("onDialogTimeout for DialogId=%d", mapDialog.getLocalDialogId()));
    }
233133
protected void defaultNew() {

        CmsUUID referenceId = m_editableData.getStructureId();
        CmsCreateModeSelectionDialog.showDialog(referenceId, new AsyncCallback<String>() {

            public void onFailure(Throwable caught) {
                // is never called
            }

            public void onSuccess(String result) {

                openEditDialog(true, result, null);
                removeHighlighting();
            }
        });
    }
1063736
public static void showDialog(final CmsUUID referenceId, final AsyncCallback<String> createModeCallback) {

        CmsRpcAction<CmsListInfoBean> action = new CmsRpcAction<CmsListInfoBean>() {

            @Override
            public void execute() {

                start(0, true);
                CmsCoreProvider.getVfsService().getPageInfo(referenceId, this);

            }

            @Override
            protected void onResponse(CmsListInfoBean result) {

                stop(false);
                Boolean isFolder = result.getIsFolder();
                if ((isFolder != null) && isFolder.booleanValue()) {
                    createModeCallback.onSuccess(null);
                } else {
                    (new CmsCreateModeSelectionDialog(result, createModeCallback)).center();
                }

            }
        };
        action.execute();

    }
960821
protected void open() {

        m_oldValue = m_selectionInput.m_textbox.getValue();
        if (m_popup == null) {
            String title = org.opencms.gwt.client.Messages.get().key(
                org.opencms.gwt.client.Messages.GUI_GALLERY_SELECT_DIALOG_TITLE_0);
            m_popup = new CmsFramePopup(title, buildGalleryUrl());

            m_popup.setCloseHandler(new Runnable() {

                public void run() {

                    String textboxValue = m_selectionInput.m_textbox.getText();

                    if (!m_oldValue.equals(textboxValue)) {
                        m_selectionInput.m_textbox.setValue("", true);
                        m_selectionInput.m_textbox.setValue(textboxValue, true);
                    }

                    if (m_previewHandlerRegistration != null) {
                        m_previewHandlerRegistration.removeHandler();
                        m_previewHandlerRegistration = null;
                    }
                    m_selectionInput.m_textbox.setFocus(true);
                    m_selectionInput.m_textbox.setCursorPos(m_selectionInput.m_textbox.getText().length());
                }
            });
            m_popup.setModal(false);
            m_popup.setId(m_id);
            m_popup.setWidth(717);
            m_popup.getFrame().setSize("705px", "640px");
            m_popup.addDialogClose(new Command() {

                public void execute() {

                    close();

                }
            });
        } else {
            m_popup.getFrame().setUrl(buildGalleryUrl());
        }
        m_popup.setAutoHideEnabled(true);
        m_popup.center();
        if (m_previewHandlerRegistration == null) {
            m_previewHandlerRegistration = Event.addNativePreviewHandler(new CloseEventPreviewHandler());
        }
    }
1098315
public void loadAndShow() {

        CmsRpcAction<CmsRestoreInfoBean> action = new CmsRpcAction<CmsRestoreInfoBean>() {

            @Override
            public void execute() {

                start(0, true);
                CmsCoreProvider.getVfsService().getRestoreInfo(m_structureId, this);
            }

            @Override
            protected void onResponse(CmsRestoreInfoBean result) {

                stop(false);
                m_restoreView = new CmsRestoreView(result, m_afterRestoreAction);
                m_restoreView.setPopup(CmsRestoreDialog.this);
                setMainContent(m_restoreView);
                List<CmsPushButton> buttons = m_restoreView.getDialogButtons();
                for (CmsPushButton button : buttons) {
                    addButton(button);
                }
                center();
            }
        };
        action.execute();
    }
475027
@Override
    public void onDialogRelease(MAPDialog mapDialog) {
        if (logger.isDebugEnabled()) {
            logger.debug(String.format("onDialogResease for DialogId=%d", mapDialog.getLocalDialogId()));
        }

        this.endCount++;

        if ((this.endCount % 2000) == 0) {
            long currentTime = System.currentTimeMillis();
            long processingTime = currentTime - start;
            start = currentTime;
            logger.warn("Completed 2000 Dialogs in=" + processingTime);
        }

    }
313805
protected void actionBack() {

        if (m_dialogIndex <= 0) {
            return;
        }
        m_dialogIndex--;
        m_uploadPropertyPanel.getPropertyEditor().getForm().validateAndSubmit();
        m_nextAction = new Runnable() {

            public void run() {

                loadDialogBean(m_resources.get(m_dialogIndex));
            }
        };
    }
771132
@Override
    public void handleSelection(final CmsResourceTypeBean selectedType) {

        CmsObject cms = A_CmsUI.getCmsObject();
        m_selectedType = selectedType;
        try {

            CmsNewResourceBuilder builder = new CmsNewResourceBuilder(cms);
            builder.addCallback(new I_Callback() {

                public void onError(Exception e) {

                    m_dialogContext.error(e);
                }

                public void onResourceCreated(CmsNewResourceBuilder builderParam) {

                    finish(Lists.newArrayList(builderParam.getCreatedResource().getStructureId()));
                }
            });

            m_selectedType = selectedType;

            Boolean useDefaultLocation = m_defaultLocationCheckbox.getValue();
            if (useDefaultLocation.booleanValue() && (m_selectedType.getCreatePath() != null)) {
                try {
                    CmsADEConfigData configData = OpenCms.getADEManager().lookupConfiguration(
                        cms,
                        m_folderResource.getRootPath());

                    CmsResourceTypeConfig typeConfig = configData.getResourceType(m_selectedType.getType());
                    if (typeConfig != null) {
                        typeConfig.configureCreateNewElement(cms, m_folderResource.getRootPath(), builder);
                    }
                } catch (Exception e) {
                    m_dialogContext.error(e);
                }

            } else {
                boolean explorerNameGenerationMode = false;
                String sitePath = cms.getRequestContext().removeSiteRoot(m_folderResource.getRootPath());
                String namePattern = m_selectedType.getNamePattern();
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(namePattern)) {
                    namePattern = OpenCms.getWorkplaceManager().getDefaultNamePattern(m_selectedType.getType());
                    explorerNameGenerationMode = true;
                }
                String fileName = CmsStringUtil.joinPaths(sitePath, namePattern);
                builder.setPatternPath(fileName);
                builder.setType(m_selectedType.getType());
                builder.setExplorerNameGeneration(explorerNameGenerationMode);

            }
            CmsPropertyDialogExtension ext = new CmsPropertyDialogExtension(A_CmsUI.get(), null);
            CmsAppWorkplaceUi.get().disableGlobalShortcuts();
            ext.editPropertiesForNewResource(builder);
            finish(new ArrayList<CmsUUID>());

        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }