public class StaticViewFacet extends Facet
Constructor and Description |
---|
StaticViewFacet(Collection<String> allowedExtensions) |
StaticViewFacet(String... allowedExtensions) |
Modifier and Type | Method and Description |
---|---|
void |
addExtension(String ext) |
void |
buildViewDispatchers(MetaClass owner,
List<Dispatcher> dispatchers)
Adds
Dispatcher s that look at one token and binds that
to the views associated with the 'it' object. |
javax.servlet.RequestDispatcher |
createRequestDispatcher(RequestImpl request,
Klass<?> type,
Object it,
String viewName)
Creates a
RequestDispatcher that handles the given view, or
return null if no such view was found. |
protected URL |
findResource(Klass c,
String fileName)
Determines if this resource can be served
|
boolean |
handleIndexRequest(RequestImpl req,
ResponseImpl rsp,
Object node,
MetaClass nodeMetaClass)
Attempts to route the HTTP request to the 'index' page of the 'it' object.
|
buildFallbackDispatchers, createRequestDispatcher, discover, discoverExtensions, getKlass
public StaticViewFacet(String... allowedExtensions)
public StaticViewFacet(Collection<String> allowedExtensions)
public void addExtension(String ext)
public void buildViewDispatchers(MetaClass owner, List<Dispatcher> dispatchers)
Facet
Dispatcher
s that look at one token and binds that
to the views associated with the 'it' object.buildViewDispatchers
in class Facet
protected URL findResource(Klass c, String fileName)
public javax.servlet.RequestDispatcher createRequestDispatcher(RequestImpl request, Klass<?> type, Object it, String viewName) throws IOException
Facet
RequestDispatcher
that handles the given view, or
return null if no such view was found.createRequestDispatcher
in class Facet
type
- If "it" is non-null, it.getClass()
. Otherwise the class
from which the view is searched.IOException
public boolean handleIndexRequest(RequestImpl req, ResponseImpl rsp, Object node, MetaClass nodeMetaClass) throws IOException, javax.servlet.ServletException
Facet
handleIndexRequest
in class Facet
IOException
javax.servlet.ServletException
Copyright © 2017. All rights reserved.