er.ajax
Class AjaxSessionPing
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WODynamicElement
com.webobjects.appserver._private.WODynamicGroup
er.ajax.AjaxDynamicElement
er.ajax.AjaxSessionPing
- All Implemented Interfaces:
- IAjaxElement
public class AjaxSessionPing
- extends AjaxDynamicElement
Simple component to ping the session in the background. It can do two things. The first is
to execute JavaScript if the session is no longer valid. The default action is to close the window
that the ping came from. The second thing it can do is to keep the session alive.
This can be useful if you want the session to not time out on particular pages. It should be
used with caution as it can prevent scheduled restarts if the user leaves the browser window open.
- Author:
- chill
Bindings |
frequency | the period between pings of the application (optional, default 60 seconds) |
keepSessionAlive | true if session should be checked out to reset timeout when the
application is pinged (optional, default false) |
parameters | optional URL parameter string appended when application is pinged (optional, no default) |
onFailure | function to execute if the session has expired or other HTTP error code returned from
ping (optional, default "function(response) { window.close();}") |
asynchronous | true if the ping should be made asynchronously (optional, default true) |
evalScripts | true if the ping results may contain JavaScript that should be evaluated (optional, default false) |
method | the HTTP request method to use for the ping (optional, default "get") |
Nested Class Summary |
static class |
AjaxSessionPing.Action
Internal WODirectAction subclass to handle the request from AjaxSessionPing. |
Fields inherited from class com.webobjects.appserver.WODynamicElement |
_ConstructorParameters |
Constructor Summary |
AjaxSessionPing(java.lang.String name,
com.webobjects.foundation.NSDictionary associations,
com.webobjects.appserver.WOElement children)
|
Method Summary |
protected void |
addRequiredWebResources(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
Uses Prototype and Wonder |
void |
appendToResponse(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
Appends script to start Ajax.ActivePeriodicalUpdater to the response. |
com.webobjects.foundation.NSDictionary |
createAjaxOptions(com.webobjects.appserver.WOComponent component)
Gathers the bindings into an AjaxOptions dictionary. |
com.webobjects.appserver.WOActionResults |
handleRequest(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Unused. |
Methods inherited from class er.ajax.AjaxDynamicElement |
_containerID, addScriptResourceInHead, addScriptResourceInHead, addStylesheetResourceInHead, addStylesheetResourceInHead, appendTagAttributeToResponse, associations, bindingNamed, booleanValueForBinding, hasBinding, invokeAction, setValueForBinding, shouldHandleRequest, stringValueForBinding, takeValuesFromRequest, valueForBinding, valueForBinding |
Methods inherited from class com.webobjects.appserver._private.WODynamicGroup |
addChildElement, appendChildrenToResponse, childrenElements, EmptyGroup, hasChildrenElements, invokeChildrenAction, takeChildrenValuesFromRequest, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AjaxSessionPing
public AjaxSessionPing(java.lang.String name,
com.webobjects.foundation.NSDictionary associations,
com.webobjects.appserver.WOElement children)
appendToResponse
public void appendToResponse(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
- Appends script to start Ajax.ActivePeriodicalUpdater to the response.
- Overrides:
appendToResponse
in class AjaxDynamicElement
createAjaxOptions
public com.webobjects.foundation.NSDictionary createAjaxOptions(com.webobjects.appserver.WOComponent component)
- Gathers the bindings into an AjaxOptions dictionary.
- Parameters:
component
- the component to evaluate the bindings in
- Returns:
- the bindings in the form of an AjaxOptions dictionary
handleRequest
public com.webobjects.appserver.WOActionResults handleRequest(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
- Unused.
- Specified by:
handleRequest
in interface IAjaxElement
- Specified by:
handleRequest
in class AjaxDynamicElement
addRequiredWebResources
protected void addRequiredWebResources(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
- Uses Prototype and Wonder
- Specified by:
addRequiredWebResources
in class AjaxDynamicElement
Copyright © 2002 – 2007 Project Wonder.