Java Reference
In-Depth Information
<f:validator validatorId="emailValidator"/>
<h:message for="email" />
<h:commandButton id="register" value="Register"
action="confirmation" />
As we can see in this example, we need to add the xmlns:jsf= "http://xmlns." namespace to our JSF page in order to use pass-
through attributes. We can then use any arbitrary attributes with our JSF-specific tags
by simply prefixing it with the prefix we defined for the namespace (in our case, p ).
In this chapter, we saw how NetBeans can help us easily create new JSF projects by
automatically adding all the required libraries.
We saw how we can quickly create JSF pages by taking advantage of NetBeans' code
completion feature. Additionally, we saw how we can significantly save time and
effort by allowing NetBeans to generate JSF 2 templates, including the necessary
CSS to easily create fairly elegant pages. We also saw how NetBeans can help us
develop JSF 2 custom components.
We also covered some new JSF 2.2 features such as resource library contracts,
which allow us to easily develop "themable" applications, as well as the outstanding
HTML5 support provided by JSF 2.2—specifically the ability to develop JSF views
using HTML5 markup and the ability to use arbitrary HTML5 attributes in JSF
markup by employing pass-through attributes.
Search WWH ::

Custom Search