A developer specifies JSF components in JSF pages, combining JSF component tags with HTML and CSS for styling. Components are linked with managed beans—Java classes that contain presentation logic and connect to business logic and persistence backends.
![JSF framework](/storage/rc-covers/14860-thumb.png)
In JSF 2.0, it is recommended that you use the facelets format for your pages:
These common tasks give you a crash course into using JSF.
Text Field
![Code 1](/storage/rc-covers/14862-thumb.png)
page.xhtml
WEB-INF/classes/com/corejsf/SampleBean.java
Button
![Press Button](/storage/rc-covers/14863-thumb.png)
page.xhtml
WEB-INF/classes/com/corejsf/SampleBean.java
The outcomes success and error can be mapped to pages in faces-config.xml. if no mapping is specified, the page /success.xhtml or /error.xhtml is displayed.
Radio Buttons
![Radio Button](/storage/rc-covers/14864-thumb.png)
page.xhtml
WEB-INF/classes/com/corejsf/SampleBean.java
![JBoss Studio2.0_5.jpg](/storage/rc-covers/14865-thumb.png)
Validation and Conversion
Page-level validation and conversion:
The number is displayed with currency symbol and group separator: $1,000.00
Using the Bean Validation Framework (JSR 303) 2.0
Error Messages
![Error Message](/storage/rc-covers/14866-thumb.png)
Resources and Styles
page.xhtml
faces-config.xml
WEB-INF/classes/com/corejsf/messages.properties
WEB-INF/classes/com/corejsf/messages_de.properties
resources/css/styles.css
Table with links
![Table With Links](/storage/rc-covers/14867-thumb.png)
WEB-INF/classes/com/corejsf/SampleBean.java
Ajax 2.0