|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.getsnappy.snappyj.Context
public abstract class Context
Context's are html element which will be given web 2.0 loading/reloading capabilites.
Our library is designed to preserve state so that forward/back browser buttons work
as well as page reloads.
StaticContext can be used for most cases. More complex application may desire the
functionality of DynamicContexts
StaticContext
,
DynamicContext
Field Summary | |
---|---|
java.util.Hashtable<java.lang.String,Context> |
subContexts
|
Constructor Summary | |
---|---|
Context()
|
Method Summary | |
---|---|
abstract java.lang.String |
getClassName()
|
abstract java.lang.String |
getContextId()
|
protected abstract JavaScriptLoadingIndicator |
getJavaScriptLoadingIndicator()
|
void |
include(java.io.Writer out,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method will output a empty placeholder div of the specified width and height, followed by issueing a jsReload inside a JavaScript block, causing the contents of this context to be loaded asynchronously |
void |
includeAsync(java.io.Writer out,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int width,
int height)
This method will output a empty placeholder div of the specified width and height, followed by issueing a jsReload inside a JavaScript block, causing the contents of this context to be loaded asynchronously |
void |
jsDeclareObject(java.io.Writer out)
Generate a JavaScript function that returns a JavaScript object representing this context. |
java.lang.String |
jsReload()
This method returns inline JavaScript that will reload the context. |
protected void |
output(java.io.Writer out,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
outputs content for the ApplicationInstance or HttpServlet defined by getClassName() This function basically loads and calls the corresponding method in the |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.Hashtable<java.lang.String,Context> subContexts
Constructor Detail |
---|
public Context()
Method Detail |
---|
public abstract java.lang.String getContextId()
public abstract java.lang.String getClassName()
protected abstract JavaScriptLoadingIndicator getJavaScriptLoadingIndicator()
protected void output(java.io.Writer out, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
out
- request
- response
- out
-
java.io.IOException
- In the case of an IOException trying to print an appropriate error message.
javax.servlet.ServletException
public void include(java.io.Writer out, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
out
- request
- response
- width
- height
-
java.io.IOException
javax.servlet.ServletException
public void includeAsync(java.io.Writer out, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int width, int height) throws java.io.IOException, javax.servlet.ServletException
out
- request
- response
- width
- height
-
java.io.IOException
javax.servlet.ServletException
public void jsDeclareObject(java.io.Writer out) throws java.io.IOException