Package org.apache.myfaces.tobago.webapp

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeComponentClass()


  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
     String clientId = component.getClientId(facesContext);
    TobagoResponseWriter writer = (TobagoResponseWriter) facesContext.getResponseWriter();
    writer.startElement(HtmlConstants.DIV, component);
    writer.writeComponentClass();
    writer.writeIdAttribute(clientId);
    if (TobagoConfig.getInstance(facesContext).isAjaxEnabled()) {
      HtmlRendererUtil.writeJavascript(writer, "Tobago.addAjaxComponent(\"" + clientId + "\")");
      Integer frequency = null;
      UIComponent facetReload = component.getFacet(FACET_RELOAD);
View Full Code Here


    createClassAttribute(component);
    TobagoResponseWriter writer = (TobagoResponseWriter) facesContext.getResponseWriter();

    writer.startElement(HtmlConstants.DIV, output);
    writer.writeComponentClass();   
    writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE);
    writer.startElement(HtmlConstants.A, output);
    writer.writeComponentClass();
    writer.startElement(HtmlConstants.LABEL, output);
    String clientId = output.getClientId(facesContext);
View Full Code Here

    writer.startElement(HtmlConstants.DIV, output);
    writer.writeComponentClass();   
    writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE);
    writer.startElement(HtmlConstants.A, output);
    writer.writeComponentClass();
    writer.startElement(HtmlConstants.LABEL, output);
    String clientId = output.getClientId(facesContext);
    writer.writeIdAttribute(clientId);
    if (forValue != null) {
      writer.writeAttribute(HtmlAttributes.FOR, forValue, null);
View Full Code Here

    String clientId = output.getClientId(facesContext);
    writer.writeIdAttribute(clientId);
    if (forValue != null) {
      writer.writeAttribute(HtmlAttributes.FOR, forValue, null);
    }
    writer.writeComponentClass();
    if (width != null) {
      writer.writeAttribute(HtmlAttributes.STYLE, "width: " + width + "px;", null);
    }
    writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
   
View Full Code Here

    UITreeOldNode root = tree.getRoot();

    TobagoResponseWriter writer = (TobagoResponseWriter) facesContext.getResponseWriter();

    writer.startElement(HtmlConstants.DIV, tree);
    writer.writeComponentClass();
    writer.writeAttribute(HtmlAttributes.STYLE, null, TobagoConstants.ATTR_STYLE);

    writer.startElement(HtmlConstants.INPUT, tree);
    writer.writeAttribute(HtmlAttributes.TYPE, "hidden", null);
    writer.writeNameAttribute(clientId);
View Full Code Here

    writer.startElement(HtmlConstants.TABLE, tree);
    writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", null);
    writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", null);
    writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
    writer.writeAttribute(HtmlAttributes.SUMMARY, "", null);
    writer.writeComponentClass();
    writer.startElement(HtmlConstants.TR, null);
    writer.startElement(HtmlConstants.TD, null);
    writer.writeIdAttribute(clientId + "-cont");
    writer.writeComment("placeholder for treecontent");
    writer.endElement(HtmlConstants.TD);
View Full Code Here

      String classes = ComponentUtil.getStringAttribute(component, ATTR_STYLE_CLASS);
      String rendererName = HtmlRendererUtil.getRendererName(facesContext, component);
      classes = classes.replaceAll(TOBAGO_CSS_CLASS_PREFIX+rendererName+TOBAGO_CSS_CLASS_SUFFIX_REQUIRED, "");
      component.getAttributes().put(ATTR_STYLE_CLASS, classes);
    }
    writer.writeComponentClass();
    if (renderAjaxSuggest) {
      writer.writeAttribute(HtmlAttributes.AUTOCOMPLETE, "off", false);
    }
    if (component instanceof UIInput) {
      String onchange = HtmlUtils.generateOnchange((UIInput) component, facesContext);
View Full Code Here

      }
      if (!submitAction) {
        writer.writeAttribute(HtmlAttributes.TARGET, null, ATTR_TARGET);
      }
    }
    writer.writeComponentClass();
    writer.writeIdAttribute(clientId);
    writer.writeNameAttribute(clientId);
    writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);

    //TODO: check if this is still needed
View Full Code Here

    writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
    if (onclick != null) {
      writer.writeAttribute(HtmlAttributes.ONCLICK, onclick, null);
    }
    writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE);
    writer.writeComponentClass();
    writer.writeText("", null); // force closing the start tag

//  image
    String imageName = (String) component.getAttributes().get(ATTR_IMAGE);
    if (imageName != null) {
View Full Code Here

    //contentStyle.append(top);
    //contentStyle.append("; ");
    if (component.isModal()) {
      writer.startElement(HtmlConstants.DIV, component);
      writer.writeIdAttribute(clientId);
      writer.writeComponentClass();
      writer.writeAttribute(HtmlAttributes.ONCLICK, "Tobago.popupBlink('" + clientId + "')", null);
      if (ClientProperties.getInstance(facesContext).getUserAgent().isMsie()) {
        String bgImage = ResourceManagerUtil.getImageWithPath(facesContext, "image/popupBg.png");
        writer.writeAttribute(HtmlAttributes.STYLE, "background: none; "
            + "filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"
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.