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