Package javax.faces.context

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


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

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


    Object object = selectOne.getValue();
    Boolean disabled = (Boolean) selectOne.getAttributes().get("disabled");
    while(iterator.hasNext()){
      SelectItem selectItem  = (SelectItem) iterator.next();
      responseWriter.startElement("radio",null);
      responseWriter.writeAttribute("label",selectItem.getLabel(),"label");
      responseWriter.writeAttribute("value",selectItem.getValue(),"value");
      if(disabled != null){
        if(disabled.booleanValue()){
          responseWriter.writeAttribute("disabled","true","disabled");
        }
View Full Code Here

    Boolean disabled = (Boolean) selectOne.getAttributes().get("disabled");
    while(iterator.hasNext()){
      SelectItem selectItem  = (SelectItem) iterator.next();
      responseWriter.startElement("radio",null);
      responseWriter.writeAttribute("label",selectItem.getLabel(),"label");
      responseWriter.writeAttribute("value",selectItem.getValue(),"value");
      if(disabled != null){
        if(disabled.booleanValue()){
          responseWriter.writeAttribute("disabled","true","disabled");
        }
      }
View Full Code Here

      responseWriter.startElement("radio",null);
      responseWriter.writeAttribute("label",selectItem.getLabel(),"label");
      responseWriter.writeAttribute("value",selectItem.getValue(),"value");
      if(disabled != null){
        if(disabled.booleanValue()){
          responseWriter.writeAttribute("disabled","true","disabled");
        }
      }
      Object itemValue = selectItem.getValue();
      if(itemValue!=null){
        if(itemValue.equals(object)){
View Full Code Here

        }
      }
      Object itemValue = selectItem.getValue();
      if(itemValue!=null){
        if(itemValue.equals(object)){
          responseWriter.writeAttribute("selected","true","selected");
       
      }
      responseWriter.endElement("radio");
    }
  }
View Full Code Here

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

        responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");
        renderAttributes(facesContext, component, (List) component
        .getAttributes().get("annotatedAttributes"));
    Object object = component.getAttributes().get("value");
    if (object != null) {
      responseWriter.writeAttribute("value", "" + getAsString(facesContext,component,object), "value");
    }   
  }


  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("listbox",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

   
    Iterator iterator = getSelectItems(context,component);
    for(int i=0; iterator.hasNext(); i++){
      SelectItem selectItem  = (SelectItem) iterator.next();
      responseWriter.startElement("listitem",null);     
      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");
View Full Code Here

    Iterator iterator = getSelectItems(context,component);
    for(int i=0; iterator.hasNext(); i++){
      SelectItem selectItem  = (SelectItem) iterator.next();
      responseWriter.startElement("listitem",null);     
      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");
        }
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.