Affects Version/s: 2.0
Fix Version/s: 2.2
Operating System: All
JSF should provide a view metadata component that defines a method expression to
be invoked before the component tree is built (or restored), with support for
navigating to an alternative view afterward using navigation rules. Navigation
may be the result of a constraint violation, a security restriction, or because
the request was for a pseudo-view.
As an example, the developer might use a view action to load a blog entry before
the view is displayed. If the entry cannot be found, the user would be
redirected to another page using a navigation rule.
<f:viewParam name="id" value="#
This feature relates to view parameters, as the example suggests. View
parameters were introduced in JSF 2.0 to provide a declarative value binding
between query string parameters and model properties. They go a long way towards
accommodating the action-oriented scenario in JSF. But view actions are a
necessary part of the equation.
<f:event type="preRenderView"> is similar to <f:viewAction>, but is insuffient
as a front controller. <f:event> gets you by if the purpose is to perform
processing at the start of the request. <f:viewAction> is intended for when you
have to perform logic to verify that the view can even be rendered. View-level
security is one example. Another is verifying that preconditions are met. And
the key is to make navigation away from the view an integrated part when it's
determined that the view cannot and should not be rendered.
|Improve Event Handling||Closed||Unassigned|
|2.||Provide response headers in Event Data Payload||Open||Unassigned|
|Portlet Bridge Issue: Add ability to save the view at the end of an action||Closed|