|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.ajax.JavaScriptResolution
public class JavaScriptResolution
Resolution that will convert a Java object web to a web of JavaScript objects and arrays, and
stream the JavaScript back to the client. The output of this resolution can be evaluated in
JavaScript using the eval() function, and will return a reference to the top level JavaScript
object. For more information see JavaScriptBuilder
Constructor Summary | |
---|---|
JavaScriptResolution(Object rootObject,
Object... objectsToExclude)
Constructs a new JavaScriptResolution that will convert the supplied object to JavaScript. |
Method Summary | |
---|---|
JavaScriptResolution |
addClassExclusion(Class<?>... clazz)
Adds one or more classes to the list of types to exclude when translating to JavaScript. |
JavaScriptResolution |
addPropertyExclusion(String... property)
Adds one or more properties to the list of types to exclude when translating to JavaScript. |
void |
execute(HttpServletRequest request,
HttpServletResponse response)
Converts the object passed in to JavaScript and streams it back to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaScriptResolution(Object rootObject, Object... objectsToExclude)
rootObject
- an Object of any type supported by JavaScriptBuilder
. In most cases
this will either be a JavaBean, Map, Collection or Array, but may also be any one of
the basic Java types including String, Date, Number etc.objectsToExclude
- Classes and/or property names to exclude from the output.Method Detail |
---|
public JavaScriptResolution addPropertyExclusion(String... property)
property
- one or more property names to exclude
public JavaScriptResolution addClassExclusion(Class<?>... clazz)
clazz
- one or more classes to exclude
public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception
execute
in interface Resolution
request
- the current HttpServletRequestresponse
- the current HttpServletResponse
Exception
- exceptions of any type may be thrown if the Resolution cannot be
executed as intended
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |