public void addDisabledAttribute(FacesContext facesContext, UIComponent component) throws IOException { AbstractInput input = (AbstractInput) component; if (input.isDisabled()) { ResponseWriter responseWriter = facesContext.getResponseWriter(); responseWriter.writeAttribute("disabled", "", null); } }
public void encodeBeginWrapper(FacesContext facesContext, UIComponent component) throws IOException { AbstractInput input = (AbstractInput) component; wrapperClass = ""; if (input.hasFacet(FACET_PREPEND_NAME)) { wrapperClass += "input-prepend "; } if (input.hasFacet(FACET_APPEND_NAME)) { wrapperClass += "input-append "; } if (wrapperClass.length() > 0) { ResponseWriter responseWriter = facesContext.getResponseWriter(); responseWriter.startElement("div", component); responseWriter.writeAttribute("class", wrapperClass, null); } }