@PostConstruct public void testMethod(){ outputText = new HtmlOutputText(); getOutputText().setValue(displayText); }
private UIPanel panel; // getter and setter // Action method, might also work in a @PostConstruct public String showComponent() { if (showComponent1) { UIOutput component1 = new HtmlOutputText(); component1.setValue("Hello world!"); getPanel().getChildren().add(component1); } return "viewId"; }
public void encodeBegin(FacesContext context) throws IOException { getChildren().add(new HtmlLabel()); getChildren().add(new HtmlOutputText(); }
String value; HtmlOutputText htmlOutputText = new HtmlOutputText(); htmlOutputText.setValue(value);
HtmlOutputText text = new HtmlOutputText(); text.setValueExpression("value", createValueExpression("#{bean.property}", String.class));
private HtmlPanelGrid gridComponent; public void someFunction(){ HtmlOutputText outPutText = new HtmlOutputText(); outPutText.setValue("Some Text"); gridComponent.getChildren().add(outPutText);
... public class MyBackingBean { ... private HtmlPanelGroup generatedElements = new HtmlPanelGroup(); public void init() { for (Element e : myElements) { // Take any element type you want HtmlOutputText subElement = new HtmlOutputText(); subElement.setValue(e.getText()); generatedElements.getChildren().add(subElement); } }
@NotNull public static HtmlColumn addColumn(@NotNull UIComponent parent, FacesComponentIdFactory idFactory, CharSequence headerText, String headerStyle) { HtmlColumn column = createComponent(HtmlColumn.class, idFactory); HtmlOutputText header = new HtmlOutputText(); header.setValue(headerText); header.setStyleClass(headerStyle); column.setHeader(header); parent.getChildren().add(column); return column; }
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; }
/** * @see org.pivot4j.analytics.property.AbstractPropertyInputEditor#createComponent(org.pivot4j.analytics.property.PropertyDescriptor, * javax.faces.component.UIComponent, javax.el.ValueExpression, * javax.el.MethodExpression, java.lang.String) */ @Override public void createComponent(PropertyDescriptor descriptor, UIComponent parent, ValueExpression expression, MethodExpression listener, String update) { super.createComponent(descriptor, parent, expression, listener, update); HtmlOutputText unitText = new HtmlOutputText(); unitText.setStyleClass("unit-text"); unitText.setValue("(pt)"); parent.getChildren().add(unitText); }
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; }
/** * Creates the label. * * @param composer * The composer. * @param htmlForm * The form. */ private void createLabel(final UIComponent htmlForm, final Composer<RenderContext, ?, ?> composer) { final HtmlOutputText labelText = new HtmlOutputText(); labelText.setValue(composer.getLabel()); labelText.setStyleClass(composer.getContext().resolveStyleClass(JsfStyleClasses.TABLE_LABEL)); htmlForm.getChildren().add(labelText); }
/** * Process the label. * * @param composer * The composer. * @param htmlForm * The form. */ private void processLabel(final Composer<RenderContext, S, E> composer, final UIComponent htmlForm) { final HtmlOutputText labelText = new HtmlOutputText(); labelText.setValue(composer.getLabel()); labelText.setStyleClass(composer.getContext().resolveStyleClass(JsfStyleClasses.FORM_LABEL)); htmlForm.getChildren().add(labelText); }
/** * Sets the label. * * @param jsfContext * The context. * @param label * The label. */ private void setLabel(final RenderContext jsfContext, final String label) { this.label = new HtmlOutputText(); this.label.setId(VariableUtil.compileName("label_", jsfContext.getPrefixDeque())); this.label.setValue(label); this.label.setStyleClass(jsfContext.resolveStyleClass(JsfStyleClasses.TABLE_OUTPUT_LABEL)); }
/** {@inheritDoc} */ @Override public void build(final PropertyDescriptor<P, E> property, final RenderContext context) { Validate.notNull(property, "Descriptor may not be null."); Validate.notNull(context, "Render context may not be null."); final Deque<PropertyDescriptor<?, ?>> prefixes = context.getPrefixDeque(); this.buildLabel(property, context); this.buildMessages(property, context); this.input = new HtmlOutputText(); this.addValue(this.input, prefixes, property, context); this.input.setId(this.compileInputName(prefixes)); this.input.setStyleClass(context.resolveStyleClass(JsfStyleClasses.FORM_INPUT_ROTEXT)); final PresentationPropertyDescriptor<?, ?> presentationProperty = property.adapt(PresentationPropertyDescriptor.class); String format = null; if (!CheckUtil.isNull(presentationProperty)) { format = presentationProperty.getFormat(); } if (!CheckUtil.isNull(format)) { final HtmlFormat htmlFormat = new HtmlFormat(); htmlFormat.setFormat(format); this.input.getFacets().put("format", htmlFormat); } }
Validate.notNull(jsfContext, "Render context may not be null."); HtmlOutputText output; output = new HtmlOutputText(); output.setStyleClass(jsfContext.resolveStyleClass(JsfStyleClasses.TABLE_OUTPUT_TEXT)); output.setValueExpression(
HtmlOutputText text = new HtmlOutputText(); String id = "txt-" + text.hashCode();