Examples of UIOut


Examples of org.apache.myfaces.tobago.component.UIOut

public class OutRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {

    UIOut out = (UIOut) component;

    String text = RenderUtils.currentValue(out);
    if (text == null) {
      text = "";
    }

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    boolean escape = out.isEscape();
    boolean createSpan = out.isCreateSpan();

    if (createSpan) {
      String id = out.getClientId(facesContext);
      writer.startElement(HtmlElements.SPAN, out);
      writer.writeIdAttribute(id);
      HtmlRendererUtils.writeDataAttributes(facesContext, writer, out);
      Style style = new Style(facesContext, out);
      writer.writeStyleAttribute(style);
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

public class OutRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {

    UIOut out = (UIOut) component;

    String text = RenderUtils.currentValue(out);
    if (text == null) {
      text = "";
    }

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    boolean escape = out.isEscape();
    boolean createSpan = out.isCreateSpan();

    if (createSpan) {
      String id = out.getClientId(facesContext);
      writer.startElement(HtmlElements.SPAN, out);
      writer.writeIdAttribute(id);
      Style style = new Style(facesContext, out);
      writer.writeStyleAttribute(style);
      HtmlRendererUtils.renderDojoDndItem(out, writer, true);
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIOut component = (UIOut) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (escape != null) {
      if (!escape.isLiteralText()) {
        component.setValueExpression("escape", escape);
      } else {
        component.setEscape(Boolean.parseBoolean(escape.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

    if (converter != null) {
      if (!converter.isLiteralText()) {
        component.setValueExpression("converter", converter);
      } else {
        component.setConverter(application.createConverter(converter.getExpressionString()));
      }
    }
    if (inline != null) {
      if (!inline.isLiteralText()) {
        component.setValueExpression("inline", inline);
      } else {
        component.setInline(Boolean.parseBoolean(inline.getExpressionString()));
      }
    }
    if (value != null) {
      component.setValueExpression("value", value);
    }

  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

public class OutRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {

    UIOut out = (UIOut) component;

    String text = RenderUtils.currentValue(out);
    if (text == null) {
      text = "";
    }

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    boolean escape = out.isEscape();
    boolean createSpan = out.isCreateSpan();

    if (createSpan) {
      String id = out.getClientId(facesContext);
      writer.startElement(HtmlElements.SPAN, out);
      writer.writeIdAttribute(id);
      Style style = new Style(facesContext, out);
      writer.writeStyleAttribute(style);
      HtmlRendererUtils.renderDojoDndItem(out, writer, true);
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIOut component = (UIOut) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (escape != null) {
      if (!escape.isLiteralText()) {
        component.setValueExpression("escape", escape);
      } else {
        component.setEscape(Boolean.parseBoolean(escape.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

    if (converter != null) {
      if (!converter.isLiteralText()) {
        component.setValueExpression("converter", converter);
      } else {
        component.setConverter(application.createConverter(converter.getExpressionString()));
      }
    }
    if (inline != null) {
      if (!inline.isLiteralText()) {
        component.setValueExpression("inline", inline);
      } else {
        component.setInline(Boolean.parseBoolean(inline.getExpressionString()));
      }
    }
    if (value != null) {
      component.setValueExpression("value", value);
    }

    if (sanitize != null) {
      component.setValueExpression("sanitize", sanitize);
    }

  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

public class OutRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {

    final UIOut out = (UIOut) component;

    String text = RenderUtils.currentValue(out);
    if (text == null) {
      text = "";
    }

    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    final boolean escape = out.isEscape();
    final boolean createSpan = out.isCreateSpan();

    if (createSpan) {
      final String id = out.getClientId(facesContext);
      writer.startElement(HtmlElements.SPAN, out);
      writer.writeIdAttribute(id);
      HtmlRendererUtils.writeDataAttributes(facesContext, writer, out);
      final Style style = new Style(facesContext, out);
      writer.writeStyleAttribute(style);
      writer.writeClassAttribute(Classes.create(out));
      HtmlRendererUtils.renderTip(out, writer);
    }
    if (escape) {
      final StringTokenizer tokenizer = new StringTokenizer(text, "\r\n");
      while (tokenizer.hasMoreTokens()) {
        final String token = tokenizer.nextToken();
        writer.writeText(token);
        if (tokenizer.hasMoreTokens()) {
          writer.startElement(HtmlElements.BR, null);
          writer.endElement(HtmlElements.BR);
        }
      }
    } else { // escape="false"
      writer.writeText("", null); // to ensure the closing > of the <span> start tag.
      if ("auto".equals(out.getSanitize())) {
        final Sanitizer sanitizer = TobagoConfig.getInstance(facesContext).getSanitizer();
        text = sanitizer.sanitize(text);
      }
      writer.write(text);
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

public class OutRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {

    final UIOut out = (UIOut) component;

    String text = RenderUtils.currentValue(out);
    if (text == null) {
      text = "";
    }

    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    final boolean escape = out.isEscape();
    final boolean createSpan = out.isCreateSpan();

    if (createSpan) {
      final String id = out.getClientId(facesContext);
      writer.startElement(HtmlElements.SPAN, out);
      writer.writeIdAttribute(id);
      HtmlRendererUtils.writeDataAttributes(facesContext, writer, out);
      final Style style = new Style(facesContext, out);
      writer.writeStyleAttribute(style);
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

public class OutRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {

    final UIOut out = (UIOut) component;

    String text = RenderUtils.currentValue(out);
    if (text == null) {
      text = "";
    }

    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    final boolean escape = out.isEscape();
    final boolean createSpan = out.isCreateSpan();

    if (createSpan) {
      final String id = out.getClientId(facesContext);
      writer.startElement(HtmlElements.SPAN, out);
      writer.writeIdAttribute(id);
      HtmlRendererUtils.writeDataAttributes(facesContext, writer, out);
      final Style style = new Style(facesContext, out);
      writer.writeStyleAttribute(style);
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIOut component = (UIOut) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (escape != null) {
      if (!escape.isLiteralText()) {
        component.setValueExpression("escape", escape);
      } else {
        component.setEscape(Boolean.parseBoolean(escape.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

    if (converter != null) {
      if (!converter.isLiteralText()) {
        component.setValueExpression("converter", converter);
      } else {
        component.setConverter(application.createConverter(converter.getExpressionString()));
      }
    }
    if (inline != null) {
      if (!inline.isLiteralText()) {
        component.setValueExpression("inline", inline);
      } else {
        component.setInline(Boolean.parseBoolean(inline.getExpressionString()));
      }
    }
    if (value != null) {
      component.setValueExpression("value", value);
    }

  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIOut

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIOut component = (UIOut) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (escape != null) {
      if (!escape.isLiteralText()) {
        component.setValueExpression("escape", escape);
      } else {
        component.setEscape(Boolean.parseBoolean(escape.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

    if (converter != null) {
      if (!converter.isLiteralText()) {
        component.setValueExpression("converter", converter);
      } else {
        component.setConverter(application.createConverter(converter.getExpressionString()));
      }
    }
    if (value != null) {
      component.setValueExpression("value", value);
    }

    if (sanitize != null) {
      component.setValueExpression("sanitize", sanitize);
    }

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.