JSF Showcase
h:commandButton
HtmlCommandButton is a UICommand component that renders a styleable HTML<input>
element. The default type is submit
. The component must be a child of h:form in order to trigger the action or actionListener.
General Usage
Children such as h:icon, h:outputText, and h:graphicImage can be specified for styling purposes. Alternatively, the image and value attributes can be specified for styling purposes.Source Code
- <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
- <!-- Example 1: Styling via image attribute -->
- <h:form>
- <h:commandButton image="#{resource['images:jsf-logo-small.png']}"
- value="1234" />
- </h:form>
- <!-- Example#2: Styling via value attribute -->
- <h:form>
- <h:commandButton value="1234" />
- </h:form>
- </ui:composition>
Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20