JSF <h:commandButton> Tag
It creates a submit button and used to submit a application form. You can create it by using the following syntax.
JSF <h:commandButton> Tag Example:
In the following example, we have created a form which is submitted by using a <h:commandButton>.
JSF renders <h:commandButton> tag as below:
JSF <h:commandButton> Tag Attributes:
||It is an identifier for this component. This id must be unique. You can use it to access HTML element in CSS and JS file.
||It holds current value for the commandbutton and display it as name of submit button.
||It is used to specify action for the form. The commandButton submits the form to the server at the specified action. If you don't provide action, page redirect to the same page after submitting.
||It is used to make a commandButton disabled. You can't click on the button after applying this attribute.
||It is used to set an image on the commandButton. In this case, your image will work as submit button.
||It is used to make localized name for your comandButton.
||It is used to render the component. The default value for this property is true.
||It is used to specify type of button. You can set "reset", "submit" or "button". If don't specify, it is submit by default.
||It is used to specify CSS for the component.
||It is used to access submit-button by using specified key.