Creates the "recursive" checkbox for touching subresources of folders.<p>

@return the String with the checkbox input field or an empty String for folders.
15372
public String buildCheckRecursive() {

        StringBuffer retValue = new StringBuffer(256);

        // show the checkbox only for folders
        if (isOperationOnFolder()) {
            retValue.append("<tr>\n\t<td colspan=\"3\" style=\"white-space: nowrap;\" unselectable=\"on\">");
            retValue.append("<input type=\"checkbox\" name=\"");
            retValue.append(PARAM_RECURSIVE);
            retValue.append("\" value=\"true\">&nbsp;");
            retValue.append(key(Messages.GUI_TOUCH_MODIFY_SUBRESOURCES_0));
            retValue.append("</td>\n</tr>\n");
        }
        return retValue.toString();
    }
17507
public String buildSubChoices() {

        String elementPath = getParamElementName();

        // we have to add a choice element, first check if the element to add itself is part of a choice or not
        boolean choiceType = Boolean.valueOf(getParamChoiceType()).booleanValue();
        I_CmsXmlSchemaType elemType = m_content.getContentDefinition().getSchemaType(elementPath);
        if (!choiceType || (elemType.isChoiceOption() && elemType.isChoiceType())) {
            // this is a choice option or a nested choice type to add, remove last element name from xpath
            elementPath = CmsXmlUtils.removeLastXpathElement(elementPath);
        }
        elementPath = CmsXmlUtils.concatXpath(elementPath, getParamChoiceElement());
        return buildElementChoices(elementPath, choiceType, false).toString();
    }
1251191
protected CmsBasicFormField createUrlNameField() {

        if (m_urlNameField != null) {
            m_urlNameField.unbind();
        }

        String description = message(Messages.GUI_URLNAME_PROPERTY_DESC_0);
        String label = message(Messages.GUI_URLNAME_PROPERTY_0);
        final CmsTextBox textbox = new CmsTextBox();
        textbox.setTriggerChangeOnKeyPress(true);
        textbox.setInhibitValidationForKeypresses(true);

        CmsBasicFormField result = new CmsBasicFormField(FIELD_URLNAME, description, label, null, textbox);
        result.getLayoutData().put("property", A_CmsPropertyEditor.FIELD_URLNAME);
        String urlName = m_handler.getName();
        if (urlName == null) {
            urlName = "";
        }
        String parent = CmsResource.getParentFolder(m_handler.getPath());
        CmsUUID id = m_handler.getId();

        result.setValidator(new CmsUrlNameValidator(parent, id));
        I_CmsStringModel model = getUrlNameModel(urlName);
        result.getWidget().setFormValueAsString(model.getValue());
        result.bind(model);
        //result.getWidget().setFormValueAsString(getUrlNameModel().getValue());
        m_urlNameField = result;
        return result;
    }
474943
public CmsResource getResource() {

        return new CmsResource(
            m_base.getStructureId(),
            m_base.getResourceId(),
            m_rootPath,
            m_typeId,
            m_isFolder,
            m_base.getFlags(),
            m_base.getProjectLastModified(),
            m_base.getState(),
            m_base.getDateCreated(),
            m_base.getUserCreated(),
            m_base.getDateLastModified(),
            m_base.getUserLastModified(),
            m_base.getDateReleased(),
            m_base.getDateExpired(),
            m_base.getSiblingCount(),
            m_length,
            m_base.getDateContent(),
            m_base.getVersion());
    }
460111
public String getRootFolder() {

        String folder = "/";
        if (getSettings().getUserSettings().getRestrictExplorerView()) {
            folder = getSettings().getUserSettings().getStartFolder();
        }
        try {
            getCms().readFolder(folder, CmsResourceFilter.IGNORE_EXPIRATION);
            return folder;
        } catch (CmsException e) {
            // should usually never happen
            if (LOG.isInfoEnabled()) {
                LOG.info(e);
            }
            return "/";
        }
    }
602540
public String buildCheckboxModifySiblings() {

        StringBuffer result = new StringBuffer(254);
        try {
            if (isMultiOperation() || (getCms().readSiblings(getParamResource(), CmsResourceFilter.ALL).size() > 1)) {
                result.append("<tr>\n<td style=\"white-space:nowrap;\">");
                result.append(key(Messages.GUI_AVAILABILITY_MODIFY_SIBLINGS_0));
                result.append("</td>\n<td class=\"maxwidth\" style=\"padding-left: 5px;\">\n");
                result.append("<input type=\"checkbox\" name=\"");
                result.append(PARAM_MODIFY_SIBLINGS);
                result.append("\" value=\"true\" style=\"text-align:left\">\n</td>\n<td>&nbsp</td></tr>");
            }
        } catch (CmsException e) {
            if (LOG.isInfoEnabled()) {
                LOG.info(e);
            }
        }
        return result.toString();
    }
1032129
private List<CmsVfsEntryBean> getRootEntries() throws CmsRpcException {

        List<CmsVfsEntryBean> rootFolders = new ArrayList<CmsVfsEntryBean>();
        CmsObject cms = getCmsObject();
        try {
            String path = "/";
            if (!cms.existsResource(path, CmsResourceFilter.ONLY_VISIBLE_NO_DELETED)) {
                String startFolder = getWorkplaceSettings().getUserSettings().getStartFolder();
                if (cms.existsResource(startFolder, CmsResourceFilter.ONLY_VISIBLE_NO_DELETED)) {
                    path = startFolder;
                } else {
                    path = null;
                }
            }
            if (path != null) {
                CmsResource rootFolderResource = getCmsObject().readResource(
                    path,
                    CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
                String title = cms.readPropertyObject(path, CmsPropertyDefinition.PROPERTY_TITLE, false).getValue();
                rootFolders.add(
                    internalCreateVfsEntryBean(
                        getCmsObject(),
                        rootFolderResource,
                        title,
                        true,
                        isEditable(getCmsObject(), rootFolderResource),
                        null,
                        false));
            }

        } catch (CmsException e) {
            error(e);
        }
        return rootFolders;
    }
997205
public String buildDeleteSiblings() {

        StringBuffer result = new StringBuffer(512);
        if (isMultiOperation() || (hasSiblings() && hasCorrectLockstate())) {
            // show only for multi resource operation or if resource has siblings and correct lock state
            CmsResourceDeleteMode defaultMode = Boolean.valueOf(getParamDeleteSiblings()).booleanValue()
            ? CmsResource.DELETE_REMOVE_SIBLINGS
            : CmsResource.DELETE_PRESERVE_SIBLINGS;
            if (!isMultiOperation()) {
                result.append(key(Messages.GUI_DELETE_WARNING_SIBLINGS_0));
                result.append("<p>");
            }
            result.append("<input type=\"radio\" name=\"");
            result.append(PARAM_DELETE_SIBLINGS);
            result.append("radio\" value=\"false\"");
            if (defaultMode == CmsResource.DELETE_PRESERVE_SIBLINGS) {
                result.append(" checked=\"checked\"");
            }
            result.append(" onclick='reloadDialog(false);'>&nbsp;");
            result.append(key(Messages.GUI_DELETE_PRESERVE_SIBLINGS_0));
            result.append("<br>");
            result.append("<input type=\"radio\" name=\"");
            result.append(PARAM_DELETE_SIBLINGS);
            result.append("radio\" value=\"true\"");
            if (defaultMode == CmsResource.DELETE_REMOVE_SIBLINGS) {
                result.append(" checked=\"checked\"");
            }
            result.append(" onclick='reloadDialog(true);'>&nbsp;");
            result.append(key(Messages.GUI_DELETE_ALL_SIBLINGS_0));
            result.append("<p>");
        }
        return result.toString();
    }
606183
@SuppressWarnings("unchecked")
    private Set<String> getResourcePaths() {

        Set<String> resources = new HashSet<String>();
        for (Component c : m_resources) {
            if (c instanceof CmsRemovableFormRow<?>) {
                String value = ((CmsRemovableFormRow<CmsPathSelectField>)c).getInput().getValue();
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    resources.add(value);
                }
            }
        }
        return resources;
    }
215535
function() {
        // Folder
        var folder = this.createElementNS(this.kmlns, "Folder");

        // Folder name
        if (this.foldersName) {
            var folderName = this.createElementNS(this.kmlns, "name");
            var folderNameText = this.createTextNode(this.foldersName); 
            folderName.appendChild(folderNameText);
            folder.appendChild(folderName);
        }

        // Folder description
        if (this.foldersDesc) {
            var folderDesc = this.createElementNS(this.kmlns, "description");        
            var folderDescText = this.createTextNode(this.foldersDesc); 
            folderDesc.appendChild(folderDescText);
            folder.appendChild(folderDesc);
        }

        return folder;
    }
1340339
private CmsTreeItem buildTreeItem(CmsCategoryTreeEntry category, Collection<String> selectedCategories) {

        // generate the widget that should be shown in the list
        CmsDataValue dataValue = new CmsDataValue(
            600,
            3,
            CmsCategoryBean.SMALL_ICON_CLASSES,
            true,
            category.getTitle(),
            "rtl:" + category.getPath(),
            "hide:" + category.getSitePath());

        // create the check box for this item
        CmsCheckBox checkBox = new CmsCheckBox();
        // if it has to be selected, select it
        boolean isPartofPath = false;
        Iterator<String> it = selectedCategories.iterator();
        while (it.hasNext()) {
            String path = it.next();
            if (path.startsWith(category.getPath()) || path.contains("/" + category.getPath())) {
                isPartofPath = true;
            }
        }
        if (isPartofPath) {
            checkBox.setChecked(true);
        }
        if (!isEnabled()) {
            checkBox.disable(m_disabledReason);
        }
        if (category.getPath().isEmpty()) {
            checkBox.setVisible(false);
        }
        // bild the CmsTreeItem out of the widget and the check box
        CmsTreeItem treeItem = new CmsTreeItem(true, checkBox, dataValue);
        // abb the handler to the check box
        dataValue.addClickHandler(new DataValueClickHander(treeItem));

        checkBox.addValueChangeHandler(new CheckBoxValueChangeHandler(treeItem));

        // set the right style for the small view
        treeItem.setSmallView(true);
        treeItem.setId(category.getPath());
        // add it to the list of all categories
        m_categories.put(treeItem.getId(), treeItem);
        return treeItem;
    }
163056
public int doEndTag() throws JspException
    {
        Tag parent = getParent();
        if (parent instanceof CheckBoxGroup)
            registerTagError(Bundle.getString("Tags_CheckBoxGroupChildError"), null);

        Object val = evaluateDataSource();
        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        ByRef ref = new ByRef();
        nameHtmlControl(_state, ref);

        String hiddenParamName = _state.name + OLDVALUE_SUFFIX;
        ServletRequest req = pageContext.getRequest();

        if (val instanceof String) {
            if (val != null && Boolean.valueOf(val.toString()).booleanValue())
                _state.checked = true;
            else
                _state.checked = false;
        }
        else if (val instanceof Boolean) {
            _state.checked = ((Boolean) val).booleanValue();
        }
        else {
            String oldCheckBoxValue = req.getParameter(hiddenParamName);
            if (oldCheckBoxValue != null) {
                _state.checked = new Boolean(oldCheckBoxValue).booleanValue();
            }
            else {
                _state.checked = evaluateDefaultValue();
            }
        }
        _state.disabled = isDisabled();

        //Create a hidden field to store the CheckBox oldValue
        String oldValue = req.getParameter(_state.name);
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);

        // if the checkbox is disabled we need to not write out the hidden
        // field because it can cause the default state to change from
        // true to false.  Disabled check boxes do not postback.
        if (!_state.disabled) {
            _hiddenState.name = hiddenParamName;
            if (oldValue == null) {
                _hiddenState.value = "false";
            }
            else {
                _hiddenState.value = oldValue;
            }
            TagRenderingBase hiddenTag = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_HIDDEN_TAG, req);
            hiddenTag.doStartTag(writer, _hiddenState);
            hiddenTag.doEndTag(writer);
        }

        _state.type = INPUT_CHECKBOX;

        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_BOOLEAN_TAG, req);
        br.doStartTag(writer, _state);

        if (!ref.isNull())
            write((String) ref.getRef());

        // Continue processing this page
        localRelease();
        return EVAL_PAGE;
    }
915108
public FolderResources folderResources() {
        if (folders.get() == null) {
            folders.compareAndSet(null, new FolderResourcesImpl(this));
        }
        return folders.get();
    }
964163
public Mailbox createMailbox() {
        final int siteId = m_nextSiteId.getAndIncrement();
        long hsId = getHSIdForLocalSite(siteId);
        SiteMailbox sm = new SiteMailbox( this, hsId);
        addMailbox(hsId, sm);
        return sm;
    }
879816
@Nullable
  B getParent() {
    ImmutableList<String> parts = getSegments();
    if (parts.isEmpty()) {
      return null;
    }
    return createPathWithSegments(parts.subList(0, parts.size() - 1));
  }
1290791
@Nullable
    public final String getDefFolder() {
        if (getFolder() == null) {
            if (parent == null) {
                return null;
            }
            return parent.getFolder();
        }
        return getFolder();
    }
1194513
public String getSelectedResourceName() {

        String resParam = getJsp().getRequest().getParameter(getListId() + LIST_RACTION_SEL);
        if (CmsStringUtil.isNotEmpty(resParam)) {
            CmsListItem item = getList().getItem(resParam);
            return (String)item.get(LIST_COLUMN_NAME);
        }
        return null;
    }