Project Wonder 5.0.0.8658

er.ajax
Class AjaxResponse

java.lang.Object
  extended by com.webobjects.appserver.WOMessage
      extended by com.webobjects.appserver.WOResponse
          extended by er.extensions.appserver.ERXResponse
              extended by er.ajax.AjaxResponse
All Implemented Interfaces:
WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, Cloneable

public class AjaxResponse
extends ERXResponse

AjaxResponse provides support for performing an AjaxUpdate in the same response as an ajax action.

Author:
mschrag

Nested Class Summary
static class AjaxResponse.AjaxResponseDelegate
          If you click on, for instance, an AjaxInPlace, that sends a request to the server that you want to be in edit mode.
 
Nested classes/interfaces inherited from class er.extensions.appserver.ERXResponse
ERXResponse.Context
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Field Summary
static String AJAX_UPDATE_PASS
           
 
Fields inherited from class com.webobjects.appserver.WOResponse
_channelCount, _channelPosition, _contentInputStream, _contentInputStreamBufferSize, _contentInputStreamLength, _fileChannel, _lastDitchErrorResponse
 
Fields inherited from class com.webobjects.appserver.WOMessage
_content, _contentData, _contentEncoding, _cookies, _headerEncoding, _httpHeaders, _httpVersion, _storePageInBacktrackCache, _TheCookieKey, _TheSetCookieKey, _userInfo, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_FOUND, HTTP_STATUS_INTERNAL_ERROR, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK, map, TheDefaultResponseEncoding
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Constructor Summary
AjaxResponse(WORequest request, WOContext context)
           
 
Method Summary
static void addAjaxResponseAppender(AjaxResponseAppender responseAppender)
          Add a response appender to the list of response appender.
 WOResponse generateResponse()
           
static boolean isAjaxUpdatePass(WORequest request)
           
 
Methods inherited from class er.extensions.appserver.ERXResponse
__setContent, _appendTagAttributeAndValue, _finalizeInContext, mark, popContent, popPartial, pushContent, pushPartial
 
Methods inherited from class com.webobjects.appserver.WOResponse
_isClientCachingDisabled, _redirectionResponseForAbsoluteURL, _redirectResponse, clone, contentInputStream, contentInputStreamBufferSize, contentInputStreamLength, disableClientCaching, setContentStream, setContentStream, setStatus, status, toString
 
Methods inherited from class com.webobjects.appserver.WOMessage
_appendContentAsciiString, _contentLength, _finalizeCookies, _initCookies, _setHeaders, _stringByEscapingString, addCookie, appendContentCharacter, appendContentData, appendContentDOMDocumentFragment, appendContentHTMLAttributeValue, appendContentHTMLString, appendContentString, appendHeader, appendHeaders, canAccessFieldsDirectly, content, contentAsDOMDocument, contentEncoding, contentString, cookies, defaultEncoding, defaultHeaderEncoding, defaultURLEncoding, equals, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasHeaderForKey, headerForKey, headerForKey, headerKeys, headers, headersForKey, httpVersion, removeCookie, removeHeadersForKey, requiresHTMLEscaping, setContent, setContent, setContent, setContent, setContentDOMDocument, setContentEncoding, setDefaultEncoding, setDefaultHeaderEncoding, setDefaultURLEncoding, setHeader, setHeaders, setHeaders, setHTTPVersion, setStorePageInBacktrackCache, setUserInfo, setUserInfoForKey, storePageInBacktrackCache, stringByEscapingHTMLAttributeValue, stringByEscapingHTMLString, takeValueForKey, takeValueForKeyPath, unableToSetNullForKey, userInfo, userInfoForKey, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AJAX_UPDATE_PASS

public static final String AJAX_UPDATE_PASS
See Also:
Constant Field Values
Constructor Detail

AjaxResponse

public AjaxResponse(WORequest request,
                    WOContext context)
Method Detail

addAjaxResponseAppender

public static void addAjaxResponseAppender(AjaxResponseAppender responseAppender)
Add a response appender to the list of response appender. At the end of every AjaxResponse, the AjaxResponseAppenders are given an opportunity to tag along. For instance, if you have an area at the top of your pages that show errors or notifications, you may want all of your ajax responses to have a chance to trigger an update of this area, so you could register an AjaxResponseAppender that renders a javascript block that calls MyNotificationsUpdate() only if there are notifications to be shown. Without response appenders, you would have to include a check in all of your components to do this.

Parameters:
responseAppender - the appender to add

generateResponse

public WOResponse generateResponse()
Specified by:
generateResponse in interface WOActionResults
Overrides:
generateResponse in class WOResponse

isAjaxUpdatePass

public static boolean isAjaxUpdatePass(WORequest request)

Last updated: Fri, Nov 21, 2008 • 04:36 AM EST

Copyright © 2002 – 2007 Project Wonder.