myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Myfaces Wiki] Update of "Execute action on page load" by AndrewRobinson
Date Mon, 05 Nov 2007 23:07:52 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by AndrewRobinson:

The comment on the change is:

New page:
A very FAQ is people that want to be able to run code -- or more specifically actions -- on
the loading of a JSF page. 

There is nothing built into JSF that allows one to do this, but the framework allows something
to be built. Three projects are already implement that give this functionality. They are:

 1. [ jsf-comp on-load] - Simple
component with little dependencies
 2. [ JBoss Seam]
- Robust EJB3 targeted JSF framework from JBoss
 3. [ Shale View Controller] - Medium weight
JSF framework

= JSF Comp =

The [ jsf-comp on-load] is your
best bet if you want a light-weight solution. It comes with no baggage. It uses standard JSF
navigation rules based one outcomes and leverages XML configuration files to specify which
actions to run based on which pages.

{{{Note: If you are using JBoss Seam you cannot use it though due to Seam configuration.}}}

= JBoss Seam =

The [ JBoss Seam]
library uses pages.xml to configure what actions to run when a page is loaded. It is very
similar in implementation to JSF-comp's project. It also comes with a lot of other JSF functionality
that you may find interesting.

= Shale =

The [ Shale View Controller] is not as heavy
as JBoss Seam, but is still much heavier than jsf-comp's on-load. Unlike the other two, it
uses Java class naming conventions to bind java code to a page view. Due to this reason, you
cannot use the same code for two pages without a bit of tweaking. It also does not support
JSF navigation rules, you have to hand code this in the handling bean if you want to navigate
to a new page. It does provide functionality beyond just an "on-load" though.

View raw message