Package javax.faces.context

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


      responseWriter.writeAttribute("label",selectItem.getLabel(),"label");
      responseWriter.writeAttribute("value",getFormattedValue(context,component,selectItem.getValue()),"value");     
      Object itemValue = selectItem.getValue();
      if(itemValue!=null){
        if(values.contains(itemValue)){
          responseWriter.writeAttribute("selected","true","selected");
        }
      }   
      responseWriter.endElement("listitem");
    }
   
View Full Code Here


  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {   
    super.encodeBegin(facesContext, component);
    ResponseWriter responseWriter = facesContext.getResponseWriter();
        responseWriter.startElement("checkbox",component);
        responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");
        renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));
   
    String strValue = getAsString(facesContext, component,component.getAttributes().get("value"));
    if(strValue != null){
View Full Code Here

        .getAttributes().get("annotatedAttributes"));
   
    String strValue = getAsString(facesContext, component,component.getAttributes().get("value"));
    if(strValue != null){
          if("true".equals(strValue)){
            responseWriter.writeAttribute("checked",strValue, "true")
          }
          else {         
            responseWriter.writeAttribute("checked",strValue, "false");
          }     
    }
View Full Code Here

    if(strValue != null){
          if("true".equals(strValue)){
            responseWriter.writeAttribute("checked",strValue, "true")
          }
          else {         
            responseWriter.writeAttribute("checked",strValue, "false");
          }     
    }
  }

  public void encodeEnd(FacesContext facesContext, UIComponent component)
View Full Code Here

  public void encodeBegin(FacesContext facesContext, UIComponent component)
      throws IOException {
    super.encodeBegin(facesContext,component);
    ResponseWriter responseWriter = facesContext.getResponseWriter();
    responseWriter.startElement("menulist",component);
    responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");   
    renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));
  }

  public void encodeChildren(FacesContext context, UIComponent component)
View Full Code Here

    responseWriter.startElement("menupopup",null);
    Iterator iterator = getSelectItems(context,selectOne);
    while(iterator.hasNext()){
      SelectItem selectItem = (SelectItem) iterator.next();
      responseWriter.startElement("menuitem",null);     
      responseWriter.writeAttribute("label",selectItem.getLabel(),"label");
      responseWriter.writeAttribute("value",getFormattedValue(context,component,selectItem.getValue()),"value");
      Object itemValue = selectItem.getValue();     
      if(itemValue!=null){
        if(itemValue.equals(object)){
          responseWriter.writeAttribute("selected","true","selected");
View Full Code Here

    Iterator iterator = getSelectItems(context,selectOne);
    while(iterator.hasNext()){
      SelectItem selectItem = (SelectItem) iterator.next();
      responseWriter.startElement("menuitem",null);     
      responseWriter.writeAttribute("label",selectItem.getLabel(),"label");
      responseWriter.writeAttribute("value",getFormattedValue(context,component,selectItem.getValue()),"value");
      Object itemValue = selectItem.getValue();     
      if(itemValue!=null){
        if(itemValue.equals(object)){
          responseWriter.writeAttribute("selected","true","selected");
       
View Full Code Here

      responseWriter.writeAttribute("label",selectItem.getLabel(),"label");
      responseWriter.writeAttribute("value",getFormattedValue(context,component,selectItem.getValue()),"value");
      Object itemValue = selectItem.getValue();     
      if(itemValue!=null){
        if(itemValue.equals(object)){
          responseWriter.writeAttribute("selected","true","selected");
       
      }   
      responseWriter.endElement("menuitem");
    }
    responseWriter.endElement("menupopup");
View Full Code Here

      responseWriter.startElement("box", component);
    } else if (component instanceof GroupBoxComponent) {
      responseWriter.startElement("groupbox", component);
    }
   
    responseWriter.writeAttribute("id",
        component.getClientId(facesContext), "id");
   
    renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));
  }
View Full Code Here

  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
    super.encodeBegin(facesContext,component);
    ResponseWriter responseWriter = facesContext.getResponseWriter();
    responseWriter.startElement("progressmeter",component);
    responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");     
    renderAttributes(facesContext,component,(List) component.getAttributes().get("annotatedAttributes"));
  }
 
  public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
        ResponseWriter responseWriter = context.getResponseWriter();       
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.