shale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Shale Wiki] Update of "ViewControllerMapper" by CyrilBouteille
Date Tue, 11 Sep 2007 00:53:46 GMT
Dear Wiki user,

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

The following page has been changed by CyrilBouteille:
http://wiki.apache.org/shale/ViewControllerMapper

The comment on the change is:
seems like the VIEW_MAPPER moved up to org.apache.shale.view.Constants in 1.0.4

------------------------------------------------------------------------------
  
  To modify the mapping between view ids and managed bean names you can replace the DefaultViewControllerMapper
with an own implementation. As Craig explained [http://mail-archives.apache.org/mod_mbox/shale-user/200608.mbox/%3cf8b39ace0608082252p6d681871o849f37ee883c0da4@mail.gmail.com%3e
here], you have to add the mapper to the application scope using ServletContextListener. In
the 'contextInitialized' method put the following code:{{{
  ServletContext context = event.getServletContext();
- context.setAttribute(FacesConstants.VIEW_MAPPER, new MyViewControllerMapper());}}}
+ context.setAttribute(org.apache.shale.view.Constants.VIEW_MAPPER, new MyViewControllerMapper());}}}
  

Mime
View raw message