12 total views, 12 views today
JSF selectbooleancheckbox Example
The JSF selectBooleanCheckBox renders an HTML component of type checkbox. Here below is the JSF and its corresponding HTML tag
JSF =>
HTML =>
JSF h:selectBooleanCheckBox Example
The below form has a h:selectBooleanCheckBox bound to the backing bean property ‘human’. The backing bean prints the status of checkbox when the users hits the submits button
Below is the backing bean class. The boolean property bound to the selectBooleanCheckbox
import javax.faces.bean.ManagedBean; @ManagedBean public class User { private boolean Human; public boolean isHuman() { return Human; } public void setHuman(boolean Human) { this.Human = Human; } public void submit(){ System.out.println(isHuman()); } }
The h:selectBooleanCheckBox renders like below in the browser
Download the JSF Project
JSF_Selectbooleancheckbox_Example
This post first appeared on Oracle ADF, BPM, BI And Primavera P6 Tutorials, please read the originial post: here