In this chapter, we've chiefly examined the validation of the users' input with JSF. There were some miscellaneous concepts regarding navigation that we glossed over. Let's now talk about handling views and navigation.
There are several ways to invoke the controller from a page view with parameters. For many situations in the digital e-commerce applications, developers need to retrieve a particular data record, trigger a server-side action, or save a certain state from the client-side at the backend.
JSF allows the developer to pass parameters to methods in the page view using the Expression Language . The first feature given in Chapter 3, Building JSF Forms is called Method Expression Invocation, which was introduced in JSF 2.0.
The following is an extract from the page view /jsf-miscellany/examplar-methods.xhtml
:
<h:form id="methodExampler" styleClass="form-horizontal" p:role="form"> ... <...