Project Wonder 5.0

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:
com.webobjects.appserver.WOActionResults, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, java.lang.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
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Field Summary
static java.lang.String AJAX_UPDATE_PASS
           
 
Fields inherited from class er.extensions.appserver.ERXResponse
ContentDispositionHeaderKey, ContentTypeHeaderKey, DisablePageCachingKey
 
Fields inherited from class com.webobjects.appserver.WOResponse
_contentInputStream, _contentInputStreamBufferSize, _contentInputStreamLength
 
Fields inherited from class com.webobjects.appserver.WOMessage
_content, _contentData, _contentEncoding, _cookies, _headers, _httpVersion, _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, TheDefaultResponseEncoding
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
AjaxResponse(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
           
 
Method Summary
static void addAjaxResponseAppender(AjaxResponseAppender responseAppender)
          Add a response appender to the list of response appender.
 void appendScriptFooterIfNecessary()
          Convenience method that calls AjaxUtils.appendScriptFooterIfNecessary with this request.
 void appendScriptHeaderIfNecessary()
          Convenience method that calls AjaxUtils.appendScriptHeaderIfNecessary with this request.
 com.webobjects.appserver.WOResponse generateResponse()
           
static boolean isAjaxUpdatePass(com.webobjects.appserver.WORequest request)
           
 void updateDomElement(java.lang.String id, java.lang.Object value)
          Convenience method that calls updateDomElement with no formatters and no valueWhenEmpty string.
 void updateDomElement(java.lang.String id, java.lang.Object value, java.lang.String numberFormat, java.lang.String dateFormat, java.lang.String valueWhenEmpty)
          Convenience method that calls AjaxUtils.updateDomElement with this request.
 
Methods inherited from class er.extensions.appserver.ERXResponse
__setContent, _appendTagAttributeAndValue, _finalizeInContext, contentDisposition, contentType, disableClientCaching, isAttachment, isHTML, isIE, isPageCachingDisabled, isXHTML, mark, popContent, popPartial, pushContent, pushPartial, setUserInfoForKey, setXHTML, userInfoForKey
 
Methods inherited from class com.webobjects.appserver.WOResponse
_isClientCachingDisabled, _redirectionResponseForAbsoluteURL, _redirectResponse, clone, contentInputStream, contentInputStreamBufferSize, contentInputStreamLength, setContentStream, setStatus, status, toString
 
Methods inherited from class com.webobjects.appserver.WOMessage
_appendContentAsciiString, _contentLength, _finalizeCookies, _initCookies, _setHeader, _setHeaders, _stringByEscapingString, addCookie, appendContentCharacter, appendContentData, appendContentDOMDocumentFragment, appendContentHTMLAttributeValue, appendContentHTMLString, appendContentString, appendHeader, appendHeaders, canAccessFieldsDirectly, content, contentAsDOMDocument, contentEncoding, contentString, cookies, defaultEncoding, defaultURLEncoding, equals, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, headerForKey, headerKeys, headers, headersForKey, httpVersion, removeCookie, removeHeadersForKey, requiresHTMLEscaping, setContent, setContent, setContent, setContentDOMDocument, setContentEncoding, setDefaultEncoding, setDefaultURLEncoding, setHeader, setHeaders, setHeaders, setHTTPVersion, setUserInfo, stringByEscapingHTMLAttributeValue, stringByEscapingHTMLString, takeValueForKey, takeValueForKeyPath, unableToSetNullForKey, userInfo, 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 java.lang.String AJAX_UPDATE_PASS
See Also:
Constant Field Values
Constructor Detail

AjaxResponse

public AjaxResponse(com.webobjects.appserver.WORequest request,
                    com.webobjects.appserver.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 com.webobjects.appserver.WOResponse generateResponse()
Specified by:
generateResponse in interface com.webobjects.appserver.WOActionResults
Overrides:
generateResponse in class com.webobjects.appserver.WOResponse

isAjaxUpdatePass

public static boolean isAjaxUpdatePass(com.webobjects.appserver.WORequest request)

appendScriptHeaderIfNecessary

public void appendScriptHeaderIfNecessary()
Convenience method that calls AjaxUtils.appendScriptHeaderIfNecessary with this request.

See Also:
AjaxUtils#appendScriptHeaderIfNecessary

appendScriptFooterIfNecessary

public void appendScriptFooterIfNecessary()
Convenience method that calls AjaxUtils.appendScriptFooterIfNecessary with this request.

See Also:
AjaxUtils#appendScriptFooterIfNecessary

updateDomElement

public void updateDomElement(java.lang.String id,
                             java.lang.Object value,
                             java.lang.String numberFormat,
                             java.lang.String dateFormat,
                             java.lang.String valueWhenEmpty)
Convenience method that calls AjaxUtils.updateDomElement with this request.

See Also:
AjaxUtils#updateDomElement

updateDomElement

public void updateDomElement(java.lang.String id,
                             java.lang.Object value)
Convenience method that calls updateDomElement with no formatters and no valueWhenEmpty string.


Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.