@NotNull public static HtmlOutputText addVerbatimText(@NotNull UIComponent parent, CharSequence html) { HtmlOutputText outputText = createComponent(HtmlOutputText.class, null); outputText.setEscape(false); outputText.setValue(html); parent.getChildren().add(outputText); return outputText; }
public static UIComponent addVerbatim(UIComponent parent, String text) throws Exception { HtmlOutputText verbatim = new HtmlOutputText(); verbatim.setTransient(true); verbatim.setValue(text); verbatim.setEscape(false); parent.getChildren().add(verbatim); return verbatim; }
public static UIComponent addVerbatim(UIComponent parent, String prevId, String text) throws Exception { HtmlOutputText verbatim = new HtmlOutputText(); verbatim.setTransient(true); verbatim.setValue(text); verbatim.setEscape(false); addChild(parent, prevId, verbatim); return verbatim; }
headerText.setId( FacesUtils.createUniqueId() ); headerText.setValue( "<div></div>" ); headerText.setEscape( false ); column.setHeader( headerText );
headerText.setId( FacesUtils.createUniqueId() ); headerText.setValue( "<div></div>" ); headerText.setEscape( false ); column.setHeader( headerText );
protected HtmlCommandLink getLink(FacesContext facesContext, HtmlCollapsiblePanel collapsiblePanel) throws IOException { Application application = facesContext.getApplication(); HtmlCommandLink link = (HtmlCommandLink) application.createComponent(HtmlCommandLink.COMPONENT_TYPE); link.setId(collapsiblePanel.getId() + LINK_ID); link.setTransient(true); link.setImmediate(true); List children = link.getChildren(); // Create the indicator. You could later make this conditional and render optional images instead HtmlOutputText uiText = (HtmlOutputText) application.createComponent(HtmlOutputText.COMPONENT_TYPE); uiText.setTransient(true); uiText.setValue(collapsiblePanel.isCollapsed() ? ">" : "ν"); uiText.setEscape(false); uiText.setStyleClass(collapsiblePanel.getIndicatorStyleClass()); uiText.setStyle(collapsiblePanel.getIndicatorStyle()); children.add(uiText); // Create the optional label String label = collapsiblePanel.getTitle(); if (label != null) { uiText = (HtmlOutputText) application.createComponent(HtmlOutputText.COMPONENT_TYPE); uiText.setTransient(true); uiText.setValue(" " + label); uiText.setStyleClass(collapsiblePanel.getTitleStyleClass()); uiText.setStyle(collapsiblePanel.getTitleStyle()); children.add(uiText); } return link; }