org.richfaces.renderkit.html.SubTableToggleControlRenderer Maven / Gradle / Ivy
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