org.apache.shale.view.impl
Class DefaultViewControllerMapper

java.lang.Object
  extended by org.apache.shale.view.impl.DefaultViewControllerMapper
All Implemented Interfaces:
ViewControllerMapper

public class DefaultViewControllerMapper
extends Object
implements ViewControllerMapper

DefaultViewControllerMapper is a default implementation of ViewControllerMapper. The following algorithm is implemented:

Examples of correct managed bean names for typical JSF view identifiers, when this mapper is used, would include:

Since the managed bean names also need to be valid variable names in the expression language, this mapper implementation imposes certain restrictions on the view identifiers. View identifiers must not contain characters which have reserved meanings in the expression language, such as '-' (minus) or '+' (plus). A best practice while using this mapper is to ensure view identifiers use letters of the English alphabet in upper or lower case, digits from 0 to 9, '$' (dollar signs) and '_' (underscores) only.

$Id: DefaultViewControllerMapper.java 464373 2006-10-16 04:21:54Z rahul $


Constructor Summary
DefaultViewControllerMapper()
           
 
Method Summary
 String mapViewId(String viewId)
          

Return the name of the managed bean that serves as the backing bean for the specified view identifier.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultViewControllerMapper

public DefaultViewControllerMapper()
Method Detail

mapViewId

public String mapViewId(String viewId)

Return the name of the managed bean that serves as the backing bean for the specified view identifier. If no such managed bean name can be determined, return null.

Specified by:
mapViewId in interface ViewControllerMapper
Parameters:
viewId - View identifier for which to identify a backing bean


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.