|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.view.impl.DefaultViewControllerMapper
public class DefaultViewControllerMapper
DefaultViewControllerMapper
is a default implementation of ViewControllerMapper
. The following
algorithm is implemented:
VariableResolver
, prefix it with an
underscore character ("_"), to avoid problems loading managed beans.Examples of correct managed bean names for typical JSF view identifiers, when this mapper is used, would include:
/mainmenu.jsp
, your managed bean
name must be mainmenu
(leading slash and
trailing extension were stripped)./customer/details.jsp
, your managed
bean name must be customer$details
(intermediate
slash character also converted)./header.jsp
, your managed bean
name must be _header
("header" is a magic JSF
variable returning a Map of HTTP headers for the current request, so
you cannot use this name for your own managed beans).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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultViewControllerMapper()
Method Detail |
---|
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
.
mapViewId
in interface ViewControllerMapper
viewId
- View identifier for which to identify a backing bean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |