Package javax.faces.context

Examples of javax.faces.context.ResponseWriter.writeAttribute()


    ResponseWriter responseWriter = facesContext.getResponseWriter();
    responseWriter.startElement("label",component);
    responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");
   
    String value = getValueAsString(facesContext,(UIOutput) component);
    responseWriter.writeAttribute("value", "" +value , "value");
   
    renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));
  }
 
View Full Code Here


  @Override
  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
    ResponseWriter responseWriter = facesContext.getResponseWriter();
    responseWriter.startElement("column",component);
    responseWriter.writeAttribute("id",component.getClientId(facesContext),"id");
    renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));
    responseWriter.endElement("column");
  }
View Full Code Here

public class CaptionRenderer extends OutputRenderer {
 
  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
    ResponseWriter responseWriter = facesContext.getResponseWriter();
    responseWriter.startElement("caption",component);
    responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");
   
    String label = getValueAsString(facesContext,(UIOutput) component);
    if(label != null){
      responseWriter.writeAttribute("label",label, "label")
    }       
View Full Code Here

public class TreeColumnRenderer extends XULRenderer {

  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {       
    ResponseWriter responseWriter = facesContext.getResponseWriter();      
    responseWriter.startElement("treecol",component);
    responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");
    renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));   
    responseWriter.endElement("treecol");
 
}
View Full Code Here

    responseWriter.startElement("caption",component);
    responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");
   
    String label = getValueAsString(facesContext,(UIOutput) component);
    if(label != null){
      responseWriter.writeAttribute("label",label, "label")
    }       
    renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));
        responseWriter.endElement("label")
 
View Full Code Here

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

    ResponseWriter responseWriter = facesContext.getResponseWriter();
    responseWriter.startElement("command",component);
    responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");
    renderAttributes(facesContext,component,(List) component.getAttributes().get("annotatedAttributes"));

    // Render oncommand attribute by calling triggerAction
    if(component.getAttributes().get("oncommand") == null){
      ActionSource actionSource = (ActionSource) component;
View Full Code Here

        else {
          script.append("triggerAsynchronousAction('")
        }       
        script.append(component.getClientId(facesContext));
        script.append("')");
        responseWriter.writeAttribute("oncommand",script.toString(), "oncommand")
      }     
    }
    responseWriter.endElement("command");
  }
View Full Code Here

    LabelProvider labelProvider = treeCellComponent.getLabelProvider();

    responseWriter.startElement("treecell", component);
   
    treeCellComponent.setNodeId(computeId(treeCellComponent));
    responseWriter.writeAttribute("id", treeCellComponent.getNodeId(), "id");

    String var = treeCellComponent.getVar();
    Object userObject = facesContext.getExternalContext().getSessionMap().get(var);

    if ( (treeCellComponent.getAttributes().get("label") != null|| (labelProvider != null)){
View Full Code Here

          label = value.toString();
        }
      }

      if (label != null) {
        responseWriter.writeAttribute("label", label, "label");
      }
    }

    if ( (treeCellComponent.getAttributes().get("src") != null) || (iconProvider != null)){
      // Deal with src
View Full Code Here

      } else {
        src = (String) convertAsString(facesContext, component, getProperty(facesContext, "src", component));
      }
      if (src != null) {
        if (!src.equals("")) {
          responseWriter.writeAttribute("src", src, "src");
        }
      }
    }
    renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));
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.