javascript - Custom checkbox (Use images in place of checkbox) -
i'm looking create custom checkbox.
i display active/inactive image in place of checkbox.
i'm limited using jsf/richfaces , javascript if necessary.
i wanted avoid using javascript thing find openfaces 'o:selectbooleancheckbox' tag.
is aware of way without resorting javascript?
thanks
easier , javascript.
but anyways can using 2 different image tag rendering on boolean condition , changing value of variable bind.
<a4j:outputpanel id="checkbox"> <h:graphicimage value="path/checkedimage" rendered="#{yourbean.value}"> <a4j:support event="onclick" action="#{yourbean.changevalue}" rerender="checkbox"/> </h:graphicimage> <h:graphicimage value="path/uncheckedimage" rendered="#{not yourbean.value}"> <a4j:support event="onclick" action="#{yourbean.changevalue}" rerender="checkbox"/> </h:graphicimage> </a4j:outputpanel>
Comments
Post a Comment