Differences between revisions 7 and 8
Revision 7 as of 2009-02-16 02:50:12
Size: 3263
Editor: cpe-075-176-012-178
Comment:
Revision 8 as of 2009-09-20 23:00:38
Size: 3283
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 1. [http://jsf-comp.sourceforge.net/components/on-load/index.html jsf-comp on-load] - Simple component with little dependencies
 2. [http://docs.jboss.org/seam/1.2.1.GA/reference/en/html/events.html#d0e3776 JBoss Seam] - Robust EJB3 targeted JSF framework from JBoss
 3. [http://shale.apache.org/shale-view/index.html Shale View Controller] - Medium weight JSF framework
 4. [http://myfaces.apache.org/orchestra Apache MyFaces Orchestra] - Robust framework which helps dealing with JPA/conversations
 5. [http://ocpsoft.com/prettyfaces PrettyFaces URL rewriter] - Lightweight URL rewriting framework
 1. [[http://jsf-comp.sourceforge.net/components/on-load/index.html|jsf-comp on-load]] - Simple component with little dependencies
 2. [[http://docs.jboss.org/seam/1.2.1.GA/reference/en/html/events.html#d0e3776|JBoss Seam]] - Robust EJB3 targeted JSF framework from JBoss
 3. [[http://shale.apache.org/shale-view/index.html|Shale View Controller]] - Medium weight JSF framework
 4. [[http://myfaces.apache.org/orchestra|Apache MyFaces Orchestra]] - Robust framework which helps dealing with JPA/conversations
 5. [[http://ocpsoft.com/prettyfaces|PrettyFaces URL rewriter]] - Lightweight URL rewriting framework
Line 13: Line 13:
The [http://jsf-comp.sourceforge.net/components/on-load/index.html 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. The [[http://jsf-comp.sourceforge.net/components/on-load/index.html|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.
Line 19: Line 19:
The [http://docs.jboss.org/seam/1.2.1.GA/reference/en/html/events.html#d0e3776 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. The [[http://docs.jboss.org/seam/1.2.1.GA/reference/en/html/events.html#d0e3776|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.
Line 23: Line 23:
The [http://shale.apache.org/shale-view/index.html 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. The [[http://shale.apache.org/shale-view/index.html|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.
Line 27: Line 27:
The [http://myfaces.apache.org/orchestra/myfaces-orchestra-core/viewController.html Orchestra View Controller] seamlessly integrates in many JSF environments. Beside the naming convention which is similar to Shale it supports also configuring the viewIds a bean is responsible for using annotations. The [[http://myfaces.apache.org/orchestra/myfaces-orchestra-core/viewController.html|Orchestra View Controller]] seamlessly integrates in many JSF environments. Beside the naming convention which is similar to Shale it supports also configuring the viewIds a bean is responsible for using annotations.
Line 34: Line 34:
The [http://ocpsoft.com/prettyfaces PrettyFaces] extension is a lightweight URL mapping tool which has the ability to execute multiple actions on page request, dynamically render a view based on runtime conditions, handle query parameters, as well as create bookmarkable URLs for your JSF views. It enhances and integrates into JSF navigation without changing standard behavior. Configuration takes place in a straight-forward XML file. The [[http://ocpsoft.com/prettyfaces|PrettyFaces]] extension is a lightweight URL mapping tool which has the ability to execute multiple actions on page request, dynamically render a view based on runtime conditions, handle query parameters, as well as create bookmarkable URLs for your JSF views. It enhances and integrates into JSF navigation without changing standard behavior. Configuration takes place in a straight-forward XML file.

A very FAQ is people that want to be able to run code -- or more specifically JSF actions -- on the loading of a JSF page (on the server -- not JavaScript).

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

  4. Apache MyFaces Orchestra - Robust framework which helps dealing with JPA/conversations

  5. PrettyFaces URL rewriter - Lightweight URL rewriting 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 due to Seam configuration conflicts.

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.

Orchestra

The Orchestra View Controller seamlessly integrates in many JSF environments. Beside the naming convention which is similar to Shale it supports also configuring the viewIds a bean is responsible for using annotations. Compared to Shale only the most important events (InitView, PreProcess, PreRenderView) are supported. It requires Spring and you have to configure your managed-beans there, which is a VERY good idea anyway.

PrettyFaces

The PrettyFaces extension is a lightweight URL mapping tool which has the ability to execute multiple actions on page request, dynamically render a view based on runtime conditions, handle query parameters, as well as create bookmarkable URLs for your JSF views. It enhances and integrates into JSF navigation without changing standard behavior. Configuration takes place in a straight-forward XML file.

Execute_action_on_page_load (last edited 2009-09-20 23:00:38 by localhost)