com.opensymphony.module.sitemesh.mapper
public class: InlineDecoratorMapper [javadoc |
source]
java.lang.Object
com.opensymphony.module.sitemesh.mapper.AbstractDecoratorMapper
com.opensymphony.module.sitemesh.mapper.InlineDecoratorMapper
All Implemented Interfaces:
RequestConstants, DecoratorMapper
The InlineDecoratorMapper is used to determine the correct Decorator when
using inline decorators.
It will check the request attribute value defined by the key
com.opensymphony.module.sitemesh.RequestConstants#DECORATOR and use the appropriate named
Decorator. This is passed across from the page:applyDecorator tag.
| Method from com.opensymphony.module.sitemesh.mapper.InlineDecoratorMapper Summary: |
|---|
|
getDecorator |
| Method from com.opensymphony.module.sitemesh.mapper.InlineDecoratorMapper Detail: |
public Decorator getDecorator(HttpServletRequest request,
Page page) {
Decorator result = null;
if (request.getAttribute(DECORATOR) != null) {
// Retrieve name of decorator to use from request
String decoratorName = (String)request.getAttribute(DECORATOR);
result = getNamedDecorator(request, decoratorName);
if (result == null) throw new FactoryException("Cannot locate inline Decorator: " + decoratorName);
}
return result == null ? super.getDecorator(request, page) : result;
}
|