Generates a NAV tag with the role attribute.

@return an HtmlTree object for the NAV tag
544228
public static HtmlTree NAV() {
        HtmlTree htmltree = new HtmlTree(HtmlTag.NAV);
        htmltree.setRole(Role.NAVIGATION);
        return htmltree;
    }
1103012
public static HtmlTree SECTION(Content body) {
        HtmlTree htmltree = new HtmlTree(HtmlTag.SECTION, nullCheck(body));
        htmltree.setRole(Role.REGION);
        return htmltree;
    }
491548
public Content getNavLinkPrevious() {
        Content li;
        if (prev != null) {
            Content prevLink = getLink(new LinkInfoImpl(configuration,
                    LinkInfoImpl.Kind.CLASS, prev)
                    .label(prevclassLabel).strong(true));
            li = HtmlTree.LI(prevLink);
        }
        else
            li = HtmlTree.LI(prevclassLabel);
        return li;
    }
973956
public String generateHtml() {

        StringBuffer result = new StringBuffer(2048);
        result.append(htmlStart(null));
        result.append(CmsListExplorerColumn.getExplorerStyleDef());
        result.append(bodyStart("dialog", null));
        result.append(dialogStart());
        result.append(dialogContentStart(getParamTitle()));
        result.append(m_list.printableHtml());
        result.append(dialogContentEnd());
        result.append(dialogEnd());
        result.append(bodyEnd());
        result.append(htmlEnd());
        return result.toString();
    }
194887
public AttributeType getTagAttribute() {
      if (tagAttributeType == null) {
         synchronized (this) {
            if (tagAttributeType == null) {
               String attribute = Config.get(typeName, name(), "tag").asString();
               if (StringUtils.isNullOrBlank(attribute) && !AnnotationType.ROOT.equals(getParent())) {
                  tagAttributeType = getParent().getTagAttribute();
               } else if (StringUtils.isNullOrBlank(attribute)) {
                  tagAttributeType = Types.TAG;
               } else {
                  tagAttributeType = AttributeType.create(attribute);
               }
            }
         }
      }
      return tagAttributeType;
   }
1059176
@Override
    protected Content getNavLinkHelp() {
        Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, helpLabel);
        return li;
    }
267204
public static HtmlTree SCRIPT() {
        HtmlTree htmltree = new HtmlTree(HtmlTag.SCRIPT);
        htmltree.addAttr(HtmlAttr.TYPE, "text/javascript");
        return htmltree;
    }
1059783
public Content getMemberTree(HtmlStyle style, Content contentTree) {
        Content div = HtmlTree.DIV(style, getMemberTree(contentTree));
        return div;
    }
452738
protected String htmlBegin() {

        StringBuffer html = new StringBuffer(512);
        // help & confirmation text for actions if needed
        if (!isPrintable() && (m_visibleItems != null) && !m_visibleItems.isEmpty()) {
            Iterator<CmsListColumnDefinition> cols = getMetadata().getColumnDefinitions().iterator();
            while (cols.hasNext()) {
                CmsListColumnDefinition col = cols.next();
                Iterator<I_CmsListDirectAction> actions = col.getDirectActions().iterator();
                while (actions.hasNext()) {
                    I_CmsListDirectAction action = actions.next();
                    action.setItem(m_visibleItems.get(0));
                    html.append(action.helpTextHtml());
                    html.append(action.confirmationTextHtml());
                }
                Iterator<CmsListDefaultAction> defActions = col.getDefaultActions().iterator();
                while (defActions.hasNext()) {
                    I_CmsListDirectAction action = defActions.next();
                    action.setItem(m_visibleItems.get(0));
                    html.append(action.helpTextHtml());
                    html.append(action.confirmationTextHtml());
                }
            }
        }
        // start list code
        html.append("<div class='listArea'>\n");
        if (isBoxed()) {
            html.append(getWp().dialogBlock(CmsWorkplace.HTML_START, m_name.key(getWp().getLocale()), false));
        }
        html.append("\t\t<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n");
        html.append("\t\t\t<tr><td>\n");
        return html.toString();
    }
528491
@Override
    protected Content getNavLinkModule() {
        Content linkContent = getModuleLink(utils.elementUtils.getModuleOf(annotationType),
                contents.moduleLabel);
        Content li = HtmlTree.LI(linkContent);
        return li;
    }
322220
private function getRoot()
	{
		if ($this->root === NULL)
		{
			$selector = reset($this->parameters);
			$strategy = key($this->parameters);
			if ($selector instanceof Element)
			{
				$this->root = $selector;
			}
			else
			{
				$this->root = $this->parent->findElement($strategy, $selector);
			}
			$expectedTagName = next($this->parameters);
			$expectedAttributes = next($this->parameters);
			if ($expectedTagName !== FALSE)
			{
				$actualTagName = $this->root->name();
				if ($actualTagName !== $expectedTagName)
				{
					throw new ViewStateException("Root element of '" . get_class($this) . "' is expected to be tag '$expectedTagName', but is '$actualTagName'.");
				}
			}
			if ($expectedAttributes !== FALSE)
			{
				foreach ($expectedAttributes as $attributeName => $expectedAttributeValue)
				{
					$actualAttributeValue = $this->root->attribute($attributeName);
					if ($actualAttributeValue !== $expectedAttributeValue)
					{
						throw new ViewStateException("Root element's attribute '$attributeName' is expected to be '$expectedAttributeValue', but is '$actualAttributeValue'.");
					}
				}
			}
		}
		return $this->root;
	}
218148
protected String buildHtmlHelpNavigation() {

        StringBuffer result = new StringBuffer(512);
        // determine current URI
        String currentUri = getParamHelpresource();
        // ignore ressources outside content folder: e.g. the search.html which
        // is in the general help module and not the german or english online help folder.
        if ((currentUri == null) || (currentUri.indexOf("/workplace/locales/") == -1)) {
            // BUG!: getLocale().getLanguage() -> getCms().getRequestContext().getLocale() returns "en"!
            //currentUri = "/system/workplace/locales/" + getLocale().getLanguage() + "/help/";
            currentUri = resolveMacros(PATH_HELP) + DEFAULT_HELPFILE;
        }
        // determine level of help start folder
        int helpLevel = CmsResource.getPathLevel(PATH_HELP);

        // get a list of all pages / subfolders in the help folder
        List<CmsJspNavElement> navList = getJsp().getNavigation().getNavigationTreeForFolder(currentUri, helpLevel, 99);
        Iterator<CmsJspNavElement> i = navList.iterator();

        while (i.hasNext()) {
            CmsJspNavElement nav = i.next();
            // calculate level to display
            int level = nav.getNavTreeLevel() - (helpLevel - 1);
            if (nav.getResourceName().equals(currentUri)
                || (nav.isFolderLink() && currentUri.equals(nav.getResourceName() + "index.html"))) {
                result.append("\t\t<span class=\"navhelpcurrent\" style=\"padding-left: ");
                result.append(level * 10);
                result.append("px; background-position: ");
                result.append((level - 1) * 10);
                result.append("px 1px;\">");
                result.append(nav.getNavText());
                result.append("</span><br style=\"clear:left\">\n");
            } else {
                result.append("\t\t<a class=\"navhelp\" style=\"padding-left: ");
                result.append(level * 10);
                result.append("px; background-position: ");
                result.append((level - 1) * 10);
                result.append("px 1px;\" href=\"");
                if (nav.isFolderLink()) {
                    // append file name to folder links to avoid static export issues
                    result.append(
                        getJsp().link(
                            "/system/modules/org.opencms.workplace.help/jsptemplates/help_body.jsp?helpresource="
                                + nav.getResourceName()
                                + "index.html&"
                                + CmsLocaleManager.PARAMETER_LOCALE
                                + "="
                                + getLocale()));
                } else {
                    result.append(getJsp().link(
                        "/system/modules/org.opencms.workplace.help/jsptemplates/help_body.jsp?helpresource="
                            + nav.getResourceName()
                            + "&"
                            + CmsLocaleManager.PARAMETER_LOCALE
                            + "="
                            + getLocale()));
                    //                    result.append(getJsp().link(nav.getResourceName()));
                }
                result.append("\">");
                result.append(nav.getNavText());
                result.append("</a><br style=\"clear:left\">\n");
            }
        }
        return result.toString();
    }
800526
public CmsJspNavBuilder getNavigation() {

        if (isNotInitialized()) {
            return null;
        }
        if (m_vfsNav == null) {
            m_vfsNav = new CmsJspNavBuilder(getCmsObject());
        }
        return m_vfsNav;
    }
823272
function Tag(page, startPosition, endPosition, attributes) {
        var self = this;
        self.childNodes = [];
        self.firstChild = null;
        self.lastChild = null;
        self.attributes = attributes || [];
        self.nodeType = 1;
        if (typeof page === 'string') {
            createTag.apply(null, [self].concat(util.makeArray(arguments)));
        } else {
            Tag.superclass.constructor.apply(self, arguments);
            attributes = self.attributes;    // first attribute is actually nodeName
            // first attribute is actually nodeName
            if (attributes[0]) {
                self.nodeName = attributes[0].name.toLowerCase();    // end tag (</div>) is a tag too in lexer , but not exist in parsed dom tree
                // end tag (</div>) is a tag too in lexer , but not exist in parsed dom tree
                self.tagName = self.nodeName.replace(/\//, '');
                self._updateSelfClosed();
                attributes.splice(0, 1);
            }
            var lastAttr = attributes[attributes.length - 1], lastSlash = !!(lastAttr && /\/$/.test(lastAttr.name));
            if (lastSlash) {
                attributes.length = attributes.length - 1;
            }    // self-closing flag
            // self-closing flag
            self.isSelfClosed = self.isSelfClosed || lastSlash;    // whether has been closed by its end tag
                                                                   // !TODO how to set closed position correctly
            // whether has been closed by its end tag
            // !TODO how to set closed position correctly
            self.closed = self.isSelfClosed;
        }
        self.closedStartPosition = -1;
        self.closedEndPosition = -1;
    }
818532
protected Map<String, String> getElementAttributes() {
        // Preserve order of attributes
        Map<String, String> attrs = new HashMap<>();

        if (this.getRole() != null) {
            attrs.put("role", this.getRole());
        }

        return attrs;
    }
583184
function () {
            var document = this._document;
            var cfg = this.conf;
            var div = document.createElement("div");
            div.style.cssText = "position:absolute;top:-15000px;left:-15000px;";
            document.body.appendChild(div);
            var html = [
                 "<div ",
                 ariaUtilsDelegate.getMarkup(this._delegateId),
                 ' style="position:absolute;top:-15000px;left:-15000px;visibility:hidden;display:block;"'
            ];

            if (cfg.waiAria) {
                var role = cfg.role;
                if (role) {
                    role = ariaUtilsString.escapeForHTML(role, {attr: true});
                    html.push(' role="' + role + '"');
                }

                var labelId = cfg.labelId;
                if (labelId) {
                    labelId = ariaUtilsString.escapeForHTML(labelId, {attr: true});
                    html.push(' aria-labelledby="' + labelId + '"');
                }
            }

            html.push("></div>");
            div.innerHTML = html.join('');

            var domElement = div.firstChild;
            document.body.removeChild(div);
            return this.popupContainer.getContainerElt().appendChild(domElement);
        }
812358
@Override
    protected Content getNavLinkClassUse() {
        Content useLink = getHyperLink(DocPaths.PACKAGE_USE,
                contents.useLabel, "", "");
        Content li = HtmlTree.LI(useLink);
        return li;
    }