Given the specified components, render them to a stand-alone HTML page (which is returned as a String)

@param components Components to render
@return Stand-alone HTML page, as a String
351787
public static String renderHTML(Component... components) {
        try {
            return renderHTMLContent(components);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
1245212
function renderComponent(req, res, hrStart) {
  var extension = getExtension(req), // Get the extension for the request
    renderer = findRenderer(extension), // Determine which renderer we are using
    _ref = req.uri,
    locals = res.locals,
    options = options || {};

  if (renderer instanceof Error) {
    log('error', renderer);
    return Promise.reject(renderer);
  }
  // Add request route params, request query params
  // and the request extension to the locals object
  locals.params = req.params;
  locals.query = req.query;
  locals.extension = extension;

  return components.get(_ref, locals)
    .then(cmptData => formDataForRenderer(cmptData, { _ref }, locals))
    .tap(logTime(hrStart, _ref))
    .then(({data, options}) => renderer.render(data, options, res))
    .catch(err => log('error', err));
}
59946
def render(self, context, request=None):
        """"""
        context['component'] = self
        return render_to_string(self.template_name, context, request)
951036
@Override
	public void paint(final RenderContext renderContext) {
		if (renderContext instanceof WebXmlRenderContext) {
			PageContentHelper.addAllHeadlines(((WebXmlRenderContext) renderContext).getWriter(),
					getUI().getHeaders());
		}

		getBackingComponent().paint(renderContext);
	}
901909
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WTab tab = (WTab) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("ui:tab");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("open", tab.isOpen(), "true");
		xml.appendOptionalAttribute("disabled", tab.isDisabled(), "true");
		xml.appendOptionalAttribute("hidden", tab.isHidden(), "true");
		xml.appendOptionalAttribute("toolTip", tab.getToolTip());

		switch (tab.getMode()) {
			case CLIENT:
				xml.appendAttribute("mode", "client");
				break;
			case LAZY:
				xml.appendAttribute("mode", "lazy");
				break;
			case EAGER:
				xml.appendAttribute("mode", "eager");
				break;
			case DYNAMIC:
				xml.appendAttribute("mode", "dynamic");
				break;
			case SERVER:
				xml.appendAttribute("mode", "server");
				break;
			default:
				throw new SystemException("Unknown tab mode: " + tab.getMode());
		}

		if (tab.getAccessKey() != 0) {
			xml.appendAttribute("accessKey", String.valueOf(Character.
					toUpperCase(tab.getAccessKey())));
		}

		xml.appendClose();

		// Paint label
		tab.getTabLabel().paint(renderContext);

		// Paint content
		WComponent content = tab.getContent();

		xml.appendTagOpen("ui:tabcontent");
		xml.appendAttribute("id", tab.getId() + "-content");
		xml.appendClose();

		// Render content if not EAGER Mode or is EAGER and is the current AJAX trigger
		if (content != null && (TabMode.EAGER != tab.getMode() || AjaxHelper.isCurrentAjaxTrigger(
				tab))) {
			// Visibility of content set in prepare paint
			content.paint(renderContext);
		}

		xml.appendEndTag("ui:tabcontent");

		xml.appendEndTag("ui:tab");
	}
1342430
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WFieldLayout fieldLayout = (WFieldLayout) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int labelWidth = fieldLayout.getLabelWidth();
		String title = fieldLayout.getTitle();

		xml.appendTagOpen("ui:fieldlayout");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", fieldLayout.isHidden(), "true");
		xml.appendOptionalAttribute("labelWidth", labelWidth > 0, labelWidth);
		xml.appendAttribute("layout", fieldLayout.getLayoutType());
		xml.appendOptionalAttribute("title", title);
		// Ordered layout
		if (fieldLayout.isOrdered()) {
			xml.appendAttribute("ordered", fieldLayout.getOrderedOffset());
		}
		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(fieldLayout, renderContext);

		// Paint Fields
		paintChildren(fieldLayout, renderContext);

		xml.appendEndTag("ui:fieldlayout");
	}
1258409
public static Path pathFromComponents(String[] components) {
        if (null == components || components.length == 0) {
            return null;
        }
        return new PathImpl(pathStringFromComponents(components));
    }
653870
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WMultiSelectPair multiSelectPair = (WMultiSelectPair) component;
		XmlStringBuilder xml = renderContext.getWriter();
		boolean readOnly = multiSelectPair.isReadOnly();

		xml.appendTagOpen("ui:multiselectpair");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", multiSelectPair.isHidden(), "true");
		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
		} else {
			int rows = multiSelectPair.getRows();
			int min = multiSelectPair.getMinSelect();
			int max = multiSelectPair.getMaxSelect();
			xml.appendAttribute("size", rows < 2 ? WMultiSelectPair.DEFAULT_ROWS : rows);
			xml.appendOptionalAttribute("disabled", multiSelectPair.isDisabled(), "true");
			xml.appendOptionalAttribute("required", multiSelectPair.isMandatory(), "true");
			xml.appendOptionalAttribute("shuffle", multiSelectPair.isShuffle(), "true");
			xml.appendOptionalAttribute("fromListName", multiSelectPair.getAvailableListName());
			xml.appendOptionalAttribute("toListName", multiSelectPair.getSelectedListName());
			xml.appendOptionalAttribute("accessibleText", multiSelectPair.getAccessibleText());
			xml.appendOptionalAttribute("min", min > 0, min);
			xml.appendOptionalAttribute("max", max > 0, max);
		}
		xml.appendClose();

		// Options
		List<?> options = multiSelectPair.getOptions();
		boolean renderSelectionsOnly = readOnly;

		if (options != null) {
			if (multiSelectPair.isShuffle()) {
				// We need to render the selected options in order
				renderOrderedOptions(multiSelectPair, options, 0, xml, renderSelectionsOnly);
			} else {
				renderUnorderedOptions(multiSelectPair, options, 0, xml, renderSelectionsOnly);
			}
		}

		if (!readOnly) {
			DiagnosticRenderUtil.renderDiagnostics(multiSelectPair, renderContext);
		}
		xml.appendEndTag("ui:multiselectpair");
	}
381660
public static String cat (Object... components) {
        StringBuilder stringBuilder = new StringBuilder ();
        if (components.length > 0) {
            stringBuilder.append (components[0]);
            for (int i = 1; i < components.length; ++i) {
                stringBuilder.append (BagObject.PATH_SEPARATOR).append (components[i].toString ());
            }
        }
        return stringBuilder.toString ();
    }
1304127
public static final boolean renderHTMLStringPreserveEmptyAttribute(ResponseWriter writer,
            UIComponent component, String componentProperty, String htmlAttrName)
            throws IOException
    {
        String value = (String) component.getAttributes().get(componentProperty);
        if (!isDefaultStringPreserveEmptyAttributeValue(value))
        {
            writer.writeAttribute(htmlAttrName, value, componentProperty);
            return true;
        }
        return false;
    }
639061
private void renderChildren(final WPanel panel, final WebXmlRenderContext renderContext) {
		LayoutManager layout = panel.getLayout();
		Renderer layoutRenderer = null;

		if (layout != null) {
			layoutRenderer = new RendererFactoryImpl().getRenderer(layout.getClass());
		}

		if (layoutRenderer == null) {
			renderContext.getWriter().appendTag("ui:content");
			paintChildren(panel, renderContext);
			renderContext.getWriter().appendEndTag("ui:content");
		} else {
			layoutRenderer.render(panel, renderContext);
		}
	}
288977
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WSubMenu menu = (WSubMenu) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("ui:submenu");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		if (isTree(menu)) {
			xml.appendAttribute("open", String.valueOf(isOpen(menu)));
		}
		xml.appendOptionalAttribute("disabled", menu.isDisabled(), "true");
		xml.appendOptionalAttribute("hidden", menu.isHidden(), "true");
		if (menu.isTopLevelMenu()) {
			xml.appendOptionalAttribute("accessKey", menu.getAccessKeyAsString());
		} else {
			xml.appendAttribute("nested", "true");
		}
		xml.appendOptionalAttribute("type", getMenuType(menu));

		switch (menu.getMode()) {
			case CLIENT:
				xml.appendAttribute("mode", "client");
				break;
			case LAZY:
				xml.appendAttribute("mode", "lazy");
				break;
			case EAGER:
				xml.appendAttribute("mode", "eager");
				break;
			case DYNAMIC:
			case SERVER:
				// mode server mapped to mode dynamic as per https://github.com/BorderTech/wcomponents/issues/687
				xml.appendAttribute("mode", "dynamic");
				break;
			default:
				throw new SystemException("Unknown menu mode: " + menu.getMode());
		}

		xml.appendClose();

		// Paint label
		menu.getDecoratedLabel().paint(renderContext);

		MenuMode mode = menu.getMode();

		// Paint submenu items
		xml.appendTagOpen("ui:content");
		xml.appendAttribute("id", component.getId() + "-content");
		xml.appendClose();

		// Render content if not EAGER Mode or is EAGER and is the current AJAX request
		if (mode != MenuMode.EAGER || AjaxHelper.isCurrentAjaxTrigger(menu)) {
			// Visibility of content set in prepare paint
			menu.paintMenuItems(renderContext);
		}

		xml.appendEndTag("ui:content");

		xml.appendEndTag("ui:submenu");
	}
405817
private StringBuilder renderFacets() throws IOException {

		StringBuilder sb = new StringBuilder();
		if( ! this.applicationTemplate.getGraphs().getFacetNameToFacet().isEmpty()) {

			sb.append( renderTitle1( this.messages.get( "facets" ))); //$NON-NLS-1$
			sb.append( renderParagraph( this.messages.get( "facets.intro" ))); //$NON-NLS-1$

			List<String> sectionNames = new ArrayList<> ();
			List<Facet> allFacets = new ArrayList<>( this.applicationTemplate.getGraphs().getFacetNameToFacet().values());
			Collections.sort( allFacets, new AbstractTypeComparator());

			for( Facet facet : allFacets ) {

				// Start a new section
				final String sectionName = DocConstants.SECTION_FACETS + facet.getName();
				StringBuilder section = startSection( sectionName );

				// Overview
				section.append( renderTitle2( facet.getName()));

				String customInfo = readCustomInformation( this.applicationDirectory, facet.getName(), DocConstants.FACET_DETAILS );
				if( Utils.isEmptyOrWhitespaces( customInfo ))
					customInfo = this.typeAnnotations.get( facet.getName());

				if( ! Utils.isEmptyOrWhitespaces( customInfo )) {
					section.append( renderTitle3( this.messages.get( "overview" ))); //$NON-NLS-1$
					section.append( renderParagraph( customInfo ));
				}

				// Exported variables
				Map<String,String> exportedVariables = ComponentHelpers.findAllExportedVariables( facet );
				section.append( renderTitle3( this.messages.get( "exports" ))); //$NON-NLS-1$
				if( exportedVariables.isEmpty()) {
					String msg = MessageFormat.format( this.messages.get( "facet.no.export" ), facet ); //$NON-NLS-1$
					section.append( renderParagraph( msg ));

				} else {
					String msg = MessageFormat.format( this.messages.get( "facet.exports" ), facet ); //$NON-NLS-1$
					section.append( renderParagraph( msg ));
					section.append( renderList( convertExports( exportedVariables )));
				}

				// End the section
				section = endSection( sectionName, section );
				sb.append( section );
				sectionNames.add( sectionName );
			}

			sb.append( renderSections( sectionNames ));
		}

		return sb;
	}
150721
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WFieldSet fieldSet = (WFieldSet) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("ui:fieldset");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", fieldSet.isHidden(), "true");

		switch (fieldSet.getFrameType()) {
			case NO_BORDER:
				xml.appendOptionalAttribute("frame", "noborder");
				break;

			case NO_TEXT:
				xml.appendOptionalAttribute("frame", "notext");
				break;

			case NONE:
				xml.appendOptionalAttribute("frame", "none");
				break;

			case NORMAL:
			default:
				break;
		}

		xml.appendOptionalAttribute("required", fieldSet.isMandatory(), "true");
		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(fieldSet, renderContext);

		// Label
		WDecoratedLabel label = fieldSet.getTitle();
		label.paint(renderContext);

		// Children
		xml.appendTag("ui:content");
		int size = fieldSet.getChildCount();

		for (int i = 0; i < size; i++) {
			WComponent child = fieldSet.getChildAt(i);

			// Skip label, as it has already been painted
			if (child != label) {
				child.paint(renderContext);
			}
		}

		xml.appendEndTag("ui:content");
		DiagnosticRenderUtil.renderDiagnostics(fieldSet, renderContext);
		xml.appendEndTag("ui:fieldset");
	}
1094060
public Optional<PluginComponent> show(long componentId)
    {
        return HTTP.GET(String.format("/v2/components/%d.json", componentId), PLUGIN_COMPONENT);
    }
115756
private void renderApplication() throws IOException {
		StringBuilder sb = new StringBuilder();

		// First pages
		sb.append( renderDocumentTitle());
		sb.append( renderPageBreak());

		sb.append( renderParagraph( this.messages.get( "intro" ))); //$NON-NLS-1$
		sb.append( renderPageBreak());

		sb.append( renderDocumentIndex());
		sb.append( renderPageBreak());

		sb.append( startTable());
		sb.append( addTableLine( this.messages.get( "app.name" ), this.applicationTemplate.getName())); //$NON-NLS-1$
		sb.append( addTableLine( this.messages.get( "app.qualifier" ), this.applicationTemplate.getVersion())); //$NON-NLS-1$
		sb.append( endTable());

		sb.append( renderApplicationDescription());
		sb.append( renderPageBreak());
		sb.append( renderSections( new ArrayList<String>( 0 )));

		// Render information about components
		sb.append( renderComponents());

		// Render information about initial instances
		sb.append( renderInstances());

		writeFileContent( sb.toString());
	}
191000
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WDataTable table = (WDataTable) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("ui:table");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", table.isHidden(), "true");
		xml.appendOptionalAttribute("caption", table.getCaption());

		switch (table.getType()) {
			case TABLE:
				xml.appendAttribute("type", "table");
				break;
			case HIERARCHIC:
				xml.appendAttribute("type", "hierarchic");
				break;
			default:
				throw new SystemException("Unknown table type: " + table.getType());
		}

		switch (table.getStripingType()) {
			case ROWS:
				xml.appendAttribute("striping", "rows");
				break;
			case COLUMNS:
				xml.appendAttribute("striping", "cols");
				break;
			case NONE:
				break;
			default:
				throw new SystemException("Unknown striping type: " + table.getStripingType());
		}

		switch (table.getSeparatorType()) {
			case HORIZONTAL:
				xml.appendAttribute("separators", "horizontal");
				break;
			case VERTICAL:
				xml.appendAttribute("separators", "vertical");
				break;
			case BOTH:
				xml.appendAttribute("separators", "both");
				break;
			case NONE:
				break;
			default:
				throw new SystemException("Unknown separator type: " + table.getSeparatorType());
		}

		xml.appendClose();

		if (table.getPaginationMode() != PaginationMode.NONE) {
			paintPaginationElement(table, xml);
		}

		if (table.getSelectMode() != SelectMode.NONE) {
			paintRowSelectionElement(table, xml);
		}

		if (table.getExpandMode() != ExpandMode.NONE) {
			paintRowExpansionElement(table, xml);
		}

		if (table.isSortable()) {
			paintSortElement(table, xml);
		}

		paintColumnHeadings(table, renderContext);
		paintRows(table, renderContext);
		paintTableActions(table, renderContext);

		xml.appendEndTag("ui:table");
	}