org.kohsuke.stapler.jelly
Class JellyFacet

java.lang.Object
  extended by org.kohsuke.stapler.Facet
      extended by org.kohsuke.stapler.jelly.JellyFacet

@MetaInfServices
public class JellyFacet
extends org.kohsuke.stapler.Facet

Facet that adds Jelly as the view.

Author:
Kohsuke Kawaguchi

Field Summary
 ResourceBundleFactory resourceBundleFactory
          Used to load ResourceBundles.
 ScriptInvoker scriptInvoker
          Used to invoke Jelly script.
static boolean TRACE
          This flag will activate the Jelly evaluation trace.
 
Fields inherited from class org.kohsuke.stapler.Facet
LOGGER
 
Constructor Summary
JellyFacet()
           
 
Method Summary
 void buildViewDispatchers(org.kohsuke.stapler.MetaClass owner, List<org.kohsuke.stapler.Dispatcher> dispatchers)
           
 javax.servlet.RequestDispatcher createRequestDispatcher(org.kohsuke.stapler.RequestImpl request, Class type, Object it, String viewName)
           
 boolean handleIndexRequest(org.kohsuke.stapler.RequestImpl req, org.kohsuke.stapler.ResponseImpl rsp, Object node, org.kohsuke.stapler.MetaClass nodeMetaClass)
           
static void setExpressionFactory(javax.servlet.ServletContextEvent event, org.apache.commons.jelly.expression.ExpressionFactory factory)
          Sets the Jelly ExpressionFactory to be used to parse views.
 
Methods inherited from class org.kohsuke.stapler.Facet
discover, discoverExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scriptInvoker

public volatile ScriptInvoker scriptInvoker
Used to invoke Jelly script. Can be replaced to the custom object.


resourceBundleFactory

public volatile ResourceBundleFactory resourceBundleFactory
Used to load ResourceBundles.


TRACE

public static boolean TRACE
This flag will activate the Jelly evaluation trace. It generates extra comments into HTML, indicating where the fragment was rendered.

Constructor Detail

JellyFacet

public JellyFacet()
Method Detail

buildViewDispatchers

public void buildViewDispatchers(org.kohsuke.stapler.MetaClass owner,
                                 List<org.kohsuke.stapler.Dispatcher> dispatchers)
Specified by:
buildViewDispatchers in class org.kohsuke.stapler.Facet

createRequestDispatcher

public javax.servlet.RequestDispatcher createRequestDispatcher(org.kohsuke.stapler.RequestImpl request,
                                                               Class type,
                                                               Object it,
                                                               String viewName)
                                                        throws IOException
Specified by:
createRequestDispatcher in class org.kohsuke.stapler.Facet
Throws:
IOException

handleIndexRequest

public boolean handleIndexRequest(org.kohsuke.stapler.RequestImpl req,
                                  org.kohsuke.stapler.ResponseImpl rsp,
                                  Object node,
                                  org.kohsuke.stapler.MetaClass nodeMetaClass)
                           throws IOException,
                                  javax.servlet.ServletException
Specified by:
handleIndexRequest in class org.kohsuke.stapler.Facet
Throws:
IOException
javax.servlet.ServletException

setExpressionFactory

public static void setExpressionFactory(javax.servlet.ServletContextEvent event,
                                        org.apache.commons.jelly.expression.ExpressionFactory factory)
Sets the Jelly ExpressionFactory to be used to parse views.

This method should be invoked from your implementation of ServletContextListener.contextInitialized(ServletContextEvent).

Once views are parsed, they won't be re-parsed just because you called this method to override the expression factory.

The primary use case of this feature is to customize the behavior of JEXL evaluation.



Copyright © 2011. All Rights Reserved.