code: private static void decorateComponent(UIComponent parent, UIComponent comp, FacesContext ctx, ResponseWriter rw)
  			throws IOException {
  		if (comp instanceof Icon)
  			((Icon) comp).setAddon(true); // modifies the id of the icon
  
  		String classToApply = "input-group-addon";
  		if (comp.getClass().getName().endsWith("Button") || comp.getChildCount() > 0)
  			classToApply = "input-group-btn";
  
  		if (comp instanceof HtmlOutputText) {
  			HtmlOutputText out = (HtmlOutputText)comp;
  			
  			String sc = out.getStyleClass();
  			if (sc == null)
  				sc = classToApply;
  			else
  				sc = sc + " " + classToApply;
  			out.setStyleClass(sc);
  			comp.encodeAll(ctx);
  		}
  		else {
  			rw.startElement("span", parent);
  			rw.writeAttribute("class", classToApply, "class");
  			comp.encodeAll(ctx);
  		 rw.endElement("span");
  		}
  	}
docs: Add the correct class
  
  @param parent
  @param comp
  @param ctx
  @param rw
  @throws IOException