public void encodeBegin(FacesContext context, UIComponent component) throws IOException { if ((context == null) || (component == null)) { throw new NullPointerException(); } super.encodeBegin(context, component); Div div = (Div) component; if (div.isRendered()) { ResponseWriter writer = context.getResponseWriter(); //Previously, style and styleClass was rendered, //so on div renderer we need to add event and universal //attributes only HtmlRendererUtils.renderHTMLAttributes(writer, div, HTML.COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_STYLE); } }
public void encodeBegin(FacesContext context, UIComponent component) throws IOException { Fieldset fieldset = (Fieldset) component; if (fieldset.isRendered()) { super.encodeBegin(context, component); String legend = fieldset.getLegend(); if( legend == null || legend.trim().length() == 0 ) // Don't render the legend return; ResponseWriter writer = context.getResponseWriter(); writer.startElement("legend", fieldset); writer.write( legend ); writer.endElement( "legend" ); } }
public void encodeBegin(FacesContext context, UIComponent component) throws IOException { Fieldset fieldset = (Fieldset) component; if (fieldset.isRendered()) { super.encodeBegin(context, component); String legend = fieldset.getLegend(); if( legend == null || legend.trim().length() == 0 ) // Don't render the legend return; ResponseWriter writer = context.getResponseWriter(); writer.startElement("legend", fieldset); if (fieldset.isEscape()) { writer.writeText(legend , "legend"); } else { writer.write(legend); } writer.endElement( "legend" ); } }