Returns the different xml editor widgets used in the form to display.<p>

@return the different xml editor widgets used in the form to display
6785
public CmsXmlContentWidgetVisitor getWidgetCollector() {

        if (m_widgetCollector == null) {
            // create an instance of the widget collector
            m_widgetCollector = new CmsXmlContentWidgetVisitor(getElementLocale());
            m_content.visitAllValuesWith(m_widgetCollector);
        }
        return m_widgetCollector;
    }
662757
public String getXmlEditorIncludes() throws JspException {

        StringBuffer result = new StringBuffer(1024);

        // first include general JQuery JS and UI components
        result.append("<script type=\"text/javascript\" src=\"");
        result.append(CmsWorkplace.getSkinUri()).append("jquery/packed/jquery.js");
        result.append("\"></script>\n");
        result.append("<script type=\"text/javascript\" src=\"");
        result.append(CmsWorkplace.getSkinUri()).append("jquery/packed/jquery.ui.js");
        result.append("\"></script>\n");

        // including dialog-helper.js to be used by ADE gallery widgets
        result.append("<script type=\"text/javascript\" src=\"");
        result.append(CmsWorkplace.getSkinUri()).append("components/widgets/dialog-helper.js");
        result.append("\"></script>\n");

        // import the JavaScript for JSON helper functions
        result.append("<script type=\"text/javascript\" src=\"");
        result.append(CmsWorkplace.getSkinUri()).append("commons/json2.js");
        result.append("\"></script>\n");
        result.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
        result.append(CmsWorkplace.getSkinUri()).append("jquery/css/ui-ocms/jquery.ui.css");
        result.append("\">\n");
        result.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
        result.append(CmsWorkplace.getSkinUri()).append("jquery/css/ui-ocms/jquery.ui.ocms.css");
        result.append("\">\n");

        try {
            // iterate over unique widgets from collector
            Iterator<I_CmsWidget> i = getWidgetCollector().getUniqueWidgets().iterator();
            while (i.hasNext()) {
                I_CmsWidget widget = i.next();
                result.append(widget.getDialogIncludes(getCms(), this));
                result.append("\n");
            }
        } catch (Exception e) {
            showErrorPage(e);
        }
        return result.toString();
    }
144499
public List getTemplateConfigOptions() {

        List result = new ArrayList();
        result.add(new CmsSelectWidgetOption("", true, key(Messages.GUI_CHANGEELEMENTLOCALE_DIALOG_TEMPLATE_ALL_0)));

        TreeMap templates = null;
        try {
            // get all available templates
            templates = CmsNewResourceXmlPage.getTemplates(getCms(), null);
        } catch (CmsException e) {
            // can usually be ignored
            if (LOG.isInfoEnabled()) {
                LOG.info(e);
            }
        }
        if (templates != null) {
            // templates found, create option and value lists
            Iterator i = templates.entrySet().iterator();
            while (i.hasNext()) {
                Map.Entry entry = (Map.Entry)i.next();
                String key = (String)entry.getKey();
                String path = (String)entry.getValue();
                result.add(new CmsSelectWidgetOption(path, false, key));
            }
        }
        return result;
    }
163775
@SuppressWarnings("unchecked")
    public CmsList<CmsListItem> getParentList() {

        Widget parent = getParent();
        if (parent == null) {
            return null;
        }
        return (CmsList<CmsListItem>)parent;
    }
650946
@Override
    protected void defineWidgets() {

        setKeyPrefix(KEY_PREFIX);

        // initialize the cache object to use for the dialog
        CmsFlexController controller = (CmsFlexController)getJsp().getRequest().getAttribute(
            CmsFlexController.ATTRIBUTE_NAME);
        CmsFlexCache cache = controller.getCmsCache();

        setOffline(true);
        setOnline(true);
        setMode(MODE_ALL);

        // widgets to display
        if (cache.cacheOffline()) {
            addWidget(new CmsWidgetDialogParameter(this, "offline", PAGES[0], new CmsCheckboxWidget()));
        }
        addWidget(new CmsWidgetDialogParameter(this, "online", PAGES[0], new CmsCheckboxWidget()));
        addWidget(new CmsWidgetDialogParameter(this, "mode", PAGES[0], new CmsRadioSelectWidget(getModes())));
    }
1238220
private Set<String> getChangeHandlerScopes(CmsXmlContentDefinition definition) {

        List<I_CmsXmlContentEditorChangeHandler> changeHandlers = definition.getContentHandler().getEditorChangeHandlers();
        Set<String> scopes = new HashSet<String>();
        for (I_CmsXmlContentEditorChangeHandler handler : changeHandlers) {
            String scope = handler.getScope();
            scopes.addAll(evaluateScope(scope, definition));
        }
        return scopes;
    }
567678
@Override
    protected void defineWidgets() {

        super.defineWidgets();

        // widgets to display in first block (like edit view)
        addWidget(new CmsWidgetDialogParameter(getSearchIndexIndex(), "name", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(getSearchIndexIndex(), "rebuildMode", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(getSearchIndexIndex(), "locale", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(getSearchIndexIndex(), "project", PAGES[0], new CmsDisplayWidget()));
        addWidget(new CmsWidgetDialogParameter(
            getSearchIndexIndex(),
            "fieldConfigurationName",
            PAGES[0],
            new CmsDisplayWidget()));
    }
1099100
public String getWidgetHtmlEnd() {

        StringBuffer result = new StringBuffer(32);
        // iterate over unique widgets from collector
        Iterator<CmsWidgetDialogParameter> i = getWidgets().iterator();
        while (i.hasNext()) {
            CmsWidgetDialogParameter param = i.next();
            result.append(param.getWidget().getDialogHtmlEnd(getCms(), this, param));
        }
        return result.toString();
    }
547699
public Map<Layout, Collection<XmlScope>> getXmlScopes() {
        List<File> layoutDirs = layoutsFinder.findLayoutDirs();

        Collection<File> layoutFiles = collectionUtils.flatMap(layoutDirs, new CollectionUtils.Function<File, Collection<File>>() {
            @Override
            public Collection<File> apply(File file) {
                return collectionUtils.filter(Arrays.asList(file.listFiles()), new CollectionUtils.Function<File, Boolean>() {
                    @Override
                    public Boolean apply(File file) {
                        return file.getName().endsWith(".xml");
                    }
                });
            }
        });

        Collection<Document> docs = collectionUtils.flatMapOpt(layoutFiles, new CollectionUtils.Function<File, Option<Document>>() {
            @Override
            public Option<Document> apply(File file) {
                return getDocumentFromFile(file);
            }
        });

        return collectionUtils.toMap(collectionUtils.flatMapOpt(docs, new CollectionUtils.Function<Document, Option<Tuple<Layout, Collection<XmlScope>>>>() {
            @Override
            public Option<Tuple<Layout, Collection<XmlScope>>> apply(Document doc) {
                Option<String> optNameSpace = namespaceFinder.getNameSpace(doc);
                if (optNameSpace.isPresent()) {
                    attrPattern = Pattern.compile(String.format(NAMESPACE_ATTRIBUTE_REG, optNameSpace.get()));
                    Collection<XmlScope> scopes = getScopes(doc);
                    return Option.of(Tuple.of(new Layout(doc.getDocumentURI()), scopes));
                } else {
                    return Option.absent();
                }
            }
        }));
    }
1263536
function getEditorLayoutSettings()
    {
        if ( $this->editorLayoutSettings === null )
        {
            $oeini = eZINI::instance( 'ezoe.ini' );
            $xmlini = eZINI::instance( 'ezxml.ini' );

            // get global layout settings
            $editorLayoutSettings = self::getEditorGlobalLayoutSettings();

            // get custom layout features, works only in eZ Publish 4.1 and higher
            $contentClassAttribute = $this->ContentObjectAttribute->attribute('contentclass_attribute');
            $buttonPreset = $contentClassAttribute->attribute('data_text2');
            $buttonPresets = $xmlini->hasVariable( 'TagSettings', 'TagPresets' ) ? $xmlini->variable( 'TagSettings', 'TagPresets' ) : array();

            if( $buttonPreset && isset( $buttonPresets[$buttonPreset] ) )
            {
                if ( $oeini->hasSection( 'EditorLayout_' . $buttonPreset ) )
                {
                    if ( $oeini->hasVariable( 'EditorLayout_' . $buttonPreset , 'Buttons' ) )
                        $editorLayoutSettings['buttons'] = $oeini->variable( 'EditorLayout_' . $buttonPreset , 'Buttons' );

                    if ( $oeini->hasVariable( 'EditorLayout_' . $buttonPreset , 'ToolbarLocation' ) )
                        $editorLayoutSettings['toolbar_location'] = $oeini->variable( 'EditorLayout_' . $buttonPreset , 'ToolbarLocation' );

                    if ( $oeini->hasVariable( 'EditorLayout_' . $buttonPreset , 'PathLocation' ) )
                        $editorLayoutSettings['path_location'] = $oeini->variable( 'EditorLayout_' . $buttonPreset , 'PathLocation' );
                }
                else
                {
                    eZDebug::writeWarning( 'Undefined EditorLayout : EditorLayout_' . $buttonPreset, __METHOD__ );
                }
            }

            $contentini = eZINI::instance( 'content.ini' );
            $tags = $contentini->variable('CustomTagSettings', 'AvailableCustomTags' );
            $hideButtons = array();
            $showButtons = array();

            // filter out custom tag icons if the custom tag is not enabled
            if ( !in_array('underline', $tags ) )
                $hideButtons[] = 'underline';

            if ( !in_array('sub', $tags ) )
                $hideButtons[] = 'sub';

            if ( !in_array('sup', $tags ) )
                $hideButtons[] = 'sup';

            if ( !in_array('pagebreak', $tags ) )
                $hideButtons[] = 'pagebreak';

            // filter out relations buttons if user dosn't have access to relations
            if ( !$this->currentUserHasAccess( 'relations' ) )
            {
                $hideButtons[] = 'image';
                $hideButtons[] = 'object';
                $hideButtons[] = 'file';
                $hideButtons[] = 'media';
            }

            // filter out align buttons on eZ Publish 4.0.x
            if ( $this->eZPublishVersion < 4.1 )
            {
                $hideButtons[] = 'justifyleft';
                $hideButtons[] = 'justifycenter';
                $hideButtons[] = 'justifyright';
                $hideButtons[] = 'justifyfull';
            }

            foreach( $editorLayoutSettings['buttons'] as $buttonString )
            {
                if ( strpos( $buttonString, ',' ) !== false )
                {
                    foreach( explode( ',', $buttonString ) as $button )
                    {
                        if ( !in_array( $button, $hideButtons ) )
                            $showButtons[] = trim( $button );
                    }
                }
                else if ( !in_array( $buttonString, $hideButtons ) )
                    $showButtons[] = trim( $buttonString );
            }

            $editorLayoutSettings['buttons'] = $showButtons;
            $this->editorLayoutSettings = $editorLayoutSettings;
        }
        return $this->editorLayoutSettings;
    }
495432
@Override
    protected void defineWidgets() {

        // initialize the user object to use for the dialog
        initUserObject();
        boolean webuserOu = false;
        try {
            webuserOu = OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), getParamOufqn()).hasFlagWebuser();
        } catch (CmsException e) {
            webuserOu = m_user.isWebuser();
        }
        setKeyPrefix(KEY_PREFIX);

        // widgets to display
        if (isNewUser() && isEditable(m_user)) {
            addWidget(new CmsWidgetDialogParameter(this, "name", PAGES[0], new CmsInputWidget()));
        } else {
            addWidget(new CmsWidgetDialogParameter(this, "name", PAGES[0], new CmsDisplayWidget()));
        }
        if (isEditable(m_user)) {
            addWidget(new CmsWidgetDialogParameter(this, "description", "", PAGES[0], new CmsTextareaWidget(), 0, 1));
            addWidget(new CmsWidgetDialogParameter(m_user, "lastname", PAGES[0], new CmsInputWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "firstname", PAGES[0], new CmsInputWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "email", PAGES[0], new CmsInputWidget()));
            addWidget(new CmsWidgetDialogParameter(this, "assignedOu", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "institution", "", PAGES[0], new CmsInputWidget(), 0, 1));
            addWidget(new CmsWidgetDialogParameter(m_user, "address", "", PAGES[0], new CmsInputWidget(), 0, 1));
            addWidget(new CmsWidgetDialogParameter(m_user, "zipcode", "", PAGES[0], new CmsInputWidget(), 0, 1));
            addWidget(new CmsWidgetDialogParameter(m_user, "city", "", PAGES[0], new CmsInputWidget(), 0, 1));
            addWidget(new CmsWidgetDialogParameter(m_user, "country", "", PAGES[0], new CmsInputWidget(), 0, 1));
            if (!webuserOu) {
                addWidget(
                    new CmsWidgetDialogParameter(this, "language", PAGES[0], new CmsSelectWidget(getLanguages())));
                if (!getSites().isEmpty()) {
                    addWidget(new CmsWidgetDialogParameter(this, "site", PAGES[0], new CmsSelectWidget(getSites())));
                }
                addWidget(
                    new CmsWidgetDialogParameter(this, "startProject", PAGES[0], new CmsSelectWidget(getProjects())));
                addWidget(
                    new CmsWidgetDialogParameter(
                        this,
                        "startFolder",
                        PAGES[0],
                        new CmsVfsFileWidget(true, null, false)));
                addWidget(new CmsWidgetDialogParameter(this, "startView", PAGES[0], new CmsSelectWidget(getViews())));
                if (isNewUser()) {
                    addWidget(
                        new CmsWidgetDialogParameter(
                            this,
                            "group",
                            PAGES[0],
                            new CmsGroupWidget(null, null, getParamOufqn())));
                    addWidget(new CmsWidgetDialogParameter(this, "role", PAGES[0], new CmsSelectWidget(getRoles())));
                }
            }
        } else {
            addWidget(new CmsWidgetDialogParameter(this, "description", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "lastname", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "firstname", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "email", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(this, "assignedOu", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "institution", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "address", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "zipcode", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "city", PAGES[0], new CmsDisplayWidget()));
            addWidget(new CmsWidgetDialogParameter(m_user, "country", PAGES[0], new CmsDisplayWidget()));
            if (!webuserOu) {
                addWidget(new CmsWidgetDialogParameter(this, "language", PAGES[0], new CmsDisplayWidget()));
                if (!getSites().isEmpty()) {
                    addWidget(new CmsWidgetDialogParameter(this, "site", PAGES[0], new CmsDisplayWidget()));
                }
                addWidget(new CmsWidgetDialogParameter(this, "startProject", PAGES[0], new CmsDisplayWidget()));
                addWidget(new CmsWidgetDialogParameter(this, "startFolder", PAGES[0], new CmsDisplayWidget()));
                addWidget(new CmsWidgetDialogParameter(this, "startView", PAGES[0], new CmsDisplayWidget()));
            }
        }
        addWidget(new CmsWidgetDialogParameter(m_user, "enabled", PAGES[0], new CmsCheckboxWidget()));
        addWidget(new CmsWidgetDialogParameter(this, "selfManagement", PAGES[0], new CmsCheckboxWidget()));
        if (isPwdChangeAllowed(m_user)) {
            addWidget(new CmsWidgetDialogParameter(m_pwdInfo, "newPwd", PAGES[0], new CmsPasswordWidget()));
            addWidget(new CmsWidgetDialogParameter(m_pwdInfo, "confirmation", PAGES[0], new CmsPasswordWidget()));
        }
    }
1371002
private List<CmsSelectWidgetOption> getTypeWidgetConfiguration() {

        List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>();
        result.add(new CmsSelectWidgetOption(CmsSearchFieldMappingType.CONTENT.toString(), true));
        result.add(new CmsSelectWidgetOption(CmsSearchFieldMappingType.PROPERTY.toString(), false));
        result.add(new CmsSelectWidgetOption(CmsSearchFieldMappingType.PROPERTY_SEARCH.toString(), false));
        result.add(new CmsSelectWidgetOption(CmsSearchFieldMappingType.ITEM.toString(), false));
        return result;
    }
1223977
private List<CmsSelectWidgetOption> getTokenizedWidgetConfiguration() {

        List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>();
        result.add(new CmsSelectWidgetOption("true", true));
        result.add(new CmsSelectWidgetOption("false", false));
        result.add(new CmsSelectWidgetOption("untokenized", false));
        return result;
    }
762039
public String getSelectedEditorUri() {

        // get the handler class from the OpenCms runtime property
        I_CmsEditorHandler editorClass = OpenCms.getWorkplaceManager().getEditorHandler();

        // the resourcenameparameter could be encoded, so decode it
        String resource = getParamResource();
        resource = CmsEncoder.unescape(resource, CmsEncoder.ENCODING_UTF_8);
        if (editorClass == null) {
            // error getting the dialog class, return to file list
            return CmsWorkplace.FILE_EXPLORER_FILELIST;
        }
        // get the dialog URI from the class defined in the configuration
        String editorUri = null;
        try {
            editorUri = editorClass.getEditorUri(resource, getJsp());
            if (editorUri == null) {
                // no valid editor was found, show the error dialog
                throw new CmsWorkplaceException(Messages.get().container(Messages.ERR_NO_EDITOR_FOUND_0));
            }
        } catch (CmsException e) {
            showErrorDialog(getJsp(), e);
        }
        return editorUri;
    }
11575
protected List getComboExportFiles() {

        List result = new ArrayList(8);
        Iterator i = CmsDatabaseImportFromServer.getFileListFromServer(true).iterator();
        while (i.hasNext()) {
            String fileName = (String)i.next();
            String helpText = key(Messages.GUI_EDITOR_HELP_EXPORTFILE_1, new String[] {fileName});
            result.add(new CmsSelectWidgetOption(fileName, false, null, helpText));
        }
        return result;
    }
770768
private String getPropertySelectWidgetConfiguration() {

        String result = "";
        CmsObject cms = getCms();
        try {
            List<CmsPropertyDefinition> props = cms.readAllPropertyDefinitions();
            StringBuffer buffer = new StringBuffer();
            Iterator<CmsPropertyDefinition> it = props.iterator();
            CmsPropertyDefinition prop;
            while (it.hasNext()) {
                prop = it.next();
                buffer.append(prop.getName());
                if (it.hasNext()) {
                    buffer.append('|');
                }
            }
            result = buffer.toString();

        } catch (CmsException e) {
            if (LOG.isErrorEnabled()) {
                LOG.error(Messages.get().getBundle().key(Messages.LOG_ERR_PROPERTYVIEWER_READALLPROPS_0), e);
            }
        }
        return result;
    }
143058
private EditorSettings getCurrentSettings() {

        EditorSettings result = new EditorSettings();
        result.m_closeBrackets = m_codeMirror.isCloseBrackets();
        result.m_lineWrapping = m_codeMirror.isLineWrapping();
        result.m_highlighting = m_codeMirror.isHighlighting();
        result.m_tabsVisible = m_codeMirror.isTabsVisible();
        result.m_fontSize = m_codeMirror.getFontSize();
        return result;
    }