All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.richfaces.renderkit.html.SubTableToggleControlRenderer Maven / Gradle / Ivy

There is a newer version: 4.3.7.Final
Show newest version
package org.richfaces.renderkit.html;

import java.io.IOException;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import org.richfaces.renderkit.RenderKitUtils;
import org.richfaces.renderkit.RenderKitUtils.Attributes;
import org.richfaces.renderkit.SubTableToggleControlRendererBase;
import static org.richfaces.renderkit.RenderKitUtils.*;


public class SubTableToggleControlRenderer extends SubTableToggleControlRendererBase {
	
	
@Override
public void encodeEnd(FacesContext facesContext, UIComponent component) 
		throws IOException
	 {
		ResponseWriter responseWriter = facesContext.getResponseWriter(); 
String clientId = component.getClientId(facesContext);
responseWriter.startElement("span", component); 
   {
      Object value = component.getAttributes().get("styleClass");
      if(null != value &&
      shouldRenderAttribute(value)
      ) {
        responseWriter.writeAttribute("class",value,null);
      }
      
   }

   {
      String value = clientId;
      if(null != value &&
         value.length()>0
      ) {
        responseWriter.writeAttribute("id",value,null);
      }
      
   }


encodeControl(facesContext, component);;
responseWriter.endElement("span"); 

	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy