You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shale.apache.org by Apache Wiki <wi...@apache.org> on 2006/08/10 17:33:45 UTC

[Shale Wiki] Update of "ViewControllerMapper" by Adrian Mitev

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 Adrian Mitev:
http://wiki.apache.org/shale/ViewControllerMapper

------------------------------------------------------------------------------
  
  == Custom Implementation ==
  
+ 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/browser 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());}}}
- To modify the mapping between view ids and managed bean names you can replace the !DefaultViewControllerMapper with an own implementation. As I stated in my message  [http://www.mail-archive.com/user%40shale.apache.org/msg00158.html here], you have to provide the following context parameter entry in your web.xml:{{{
- <context-param>
-   <param-name>org.apache.shale.view.VIEW_CONTROLLER_MAPPER</param-name>
-   <param-value>foo.MyVerySpecialViewControllerMapper</param-value>
- </context-param>}}}