@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		Badge badge = (Badge) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = badge.getClientId();

		if (!component.isRendered()) {
			return;
		}
		String styleClass = badge.getStyleClass();
		String style=badge.getStyle();
		String val = getValue2Render(context, badge);

		generateBadge(context, badge, rw, clientId, styleClass, style, val, null);
	}
@ Override public void encodeBegin ( FacesContext context , UIComponent component ) throws IOException { if ( ! component . isRendered ( ) ) { return ; } Badge badge = ( Badge ) component ; ResponseWriter rw = context . getResponseWriter ( ) ; String clientId = badge . getClientId ( ) ; if ( ! component . isRendered ( ) ) { return ; } String styleClass = badge . getStyleClass ( ) ; String style = badge . getStyle ( ) ; String val = getValue2Render ( context , badge ) ; generateBadge ( context , badge , rw , clientId , styleClass , style , val , null ) ; }
This methods generates the HTML code of the current b:badge.

@param context
the FacesContext.
@param component
the current b:badge.
@throws IOException
thrown if something goes wrong when writing the HTML code.