HTML and CSS Reference
In-Depth Information
<h:form>
Your e-mail address:
<h:inputText value="#{newsletterSubscription.email}" />
<h:commandButton action="#{newsletterSubscription.subscribe}"
value="Subscribe" />
<h:commandButton action="#{newsletterSubscription.unsubscribe}"
value="Unsubscribe" />
</h:form>
</ui:define>
</ui:composition>
</f:view>
</html>
With stateless views being a brand-new feature, not all components have been thoroughly tested and in
some situations this may result in unpredictable behaviors. You should be particularly careful when using stateless views
with third-party JSF component libraries.
Caution
Other Significant Changes
On top of the big-ticket features there were also many smaller enhancements. The following is a summary of the most
significant smaller changes.
UIData supports the Collection Interface rather than List
Components deriving from UIData now support java.util.Collections as the internal data model. Prior to JSF 2.2
java.util.List was the only supported collection. This change is a recognition that ORM typically uses the
java.util.Set collection for mapping associated data.
WAI-ARIA support
JSF 2.2 has implemented the role attribute on HTML components to support the Web Accessibility Initiative—Accessible
Rich Internet Application Suite (WAI-ARIA). The role attribute is used to describe the purpose of an HTML tag. More
information about WAI-ARIA can be found at http://www.w3.org/WAI/intro/aria . Listing 5-24 shows an example
of how the role attribute can be used to add meaning to a panel grid.
Listing 5-24. Indicating that the panelGrid (Table) Is a Menu Containing Options
<h:panelGrid role="menu" >
<h:commandLink role="menuitem" value="Home" action="/home" />
<h:commandLink role="menuitem" value="Registration" action="/registration" />
...
</h:panelGrid>
 
 
Search WWH ::




Custom Search