In JSF you can use wildcard in the from-view-id element of a navigation rule, that is the rule applies to all pages that start with the prefix /somePrefix. Only a single (*) is allowed, and it must be at the end of the ID string. If there are multiple matching wildcard rules, the longest match is taken. The using of …
JSF 2 Redirect Navigation Example
You can configure the JSF configuration to redirect to a new view. Then the JSF implementation sends an HTTP redirect to the client. The redirect response tells the client which URL to use for the next page. The client then makes a GET request to that URL. Redirecting could be very slow some times because another round trip …
JSF 2 Navigation using From Action Example
You’ve already seen the navigation using Dynamic Navigation – Action Outcome, but as you’ve noted the using of navigation-case element within a faces-config.xml the from-outcome is provided. The navigation-case element is more complex that we previously discussed, In addition to the from-outcome element, there is also from-action element. That flexibility can be useful if you have two …
JSF 2 Dynamic Navigation using From Outcome Example
In most web applications navigation isn’t static, the page flow doesn’t just depend on which button you click but also on the inputs that you provide. For example, submitting a login page may have two outcomes: success or failure. The outcome depends on a computation-namely, whether the username and password are legitimate. To implement dynamic navigation, …
JSF 2 Static Navigation Example
The navigation is one of the powerful points that makes the development of the web application more easier. From the day one JSF provides a built-in navigation mechanism that allow moving from one view to another. The navigation handler is responsible for selecting the next JSF view, when the user has posted the form back …
JSF 2 Injecting Managed Beans Example
This tutorial intended for providing a complete example of how could wire (connect/inject/reference) a managed beans from/into another managed bean. In our previous tutorial I have explained how to configure a managed bean. Also Read: JSF 2 Tutorials JSF Tutorials Introduction to JSF 1. IndexBean Managed Bean IndexBean.java 2. JPATutorialBean JPATutorialBean.java 3. JSFTutorialBean JSFTutorialBean.java 4. …
JSF 2 Managed Beans Example
The concept of managed bean(s) or backing bean(s) is used intensively by the jsf developers for referring that/those Java Class(es) which are used for handling the presentation business logic. Concept of managed bean(s) are coming from a more general concept that introduced before many years ago and it’s an MVC (Model, View & Controller). In …
JSF 2 Ajax Error Handling Example
Ajax mechanism is identical to those mechanisms that considered as error-prone, as you have experienced when you’re working with a JSF framework. Ajax framework with the JSF 2.0 framework provides you onerror attribute to handle the errors that could be thrown while the JSF framework executes the component(s) that mentioned at f:ajax’s execute attribute Also Read: JSF …