org.apache.wicket.ajax
Class AbstractAjaxResponse

java.lang.Object
  extended by org.apache.wicket.ajax.AbstractAjaxResponse
Direct Known Subclasses:
XmlAjaxResponse

public abstract class AbstractAjaxResponse
extends Object

A POJO-like that collects the data for the Ajax response written to the client and serializes it to specific String-based format (XML, JSON, ...).


Nested Class Summary
protected static class AbstractAjaxResponse.AjaxResponse
          Response that uses an encoder to encode its contents
 
Field Summary
protected  List<CharSequence> appendJavaScripts
          A list of scripts (JavaScript) which should be executed on the client side after the components' replacement
protected  boolean componentsFrozen
          A flag that indicates that components cannot be added to AjaxRequestTarget anymore.
protected  List<CharSequence> domReadyJavaScripts
          A list of scripts (JavaScript) which should be executed on the client side after the components' replacement.
protected  AbstractAjaxResponse.AjaxResponse encodingBodyResponse
          Create a response for component body and javascript that will escape output to make it safe to use inside a CDATA block
protected  AbstractAjaxResponse.AjaxResponse encodingHeaderResponse
          Response for header contribution that will escape output to make it safe to use inside a CDATA block
protected  HtmlHeaderContainer header
           
protected  Map<String,Component> markupIdToComponent
          The component instances that will be rendered/replaced.
protected  List<CharSequence> prependJavaScripts
          A list of scripts (JavaScript) which should be executed on the client side before the components' replacement
 
Constructor Summary
AbstractAjaxResponse(Page page)
          Constructor.
 
Method Summary
 void add(Component component, String markupId)
          Adds a component to be updated at the client side with its current markup
 void appendJavaScript(CharSequence javascript)
          Adds script to the ones which are executed after the component replacement.
protected  boolean containsAncestorFor(Component component)
          Checks if the target contains an ancestor for the given component
 void detach(IRequestCycle requestCycle)
          Detaches the page if at least one of its components was updated.
 boolean equals(Object o)
           
protected abstract  void fireOnAfterRespondListeners(Response response)
           
protected abstract  void fireOnBeforeRespondListeners()
           
 Collection<? extends Component> getComponents()
           
protected  String getEncodingName()
           
 IHeaderResponse getHeaderResponse()
          Gets or creates an IHeaderResponse instance to use for the header contributions.
 int hashCode()
           
 void prependJavaScript(CharSequence javascript)
          Adds script to the ones which are executed before the component replacement.
protected abstract  void setContentType(WebResponse response, String encoding)
          Sets the Content-Type header to indicate the type of the Ajax response.
protected abstract  void writeComponent(Response response, String markupId, Component component, String encoding)
          Writes a single component
protected abstract  void writeFooter(Response response, String encoding)
           
protected abstract  void writeHeader(Response response, String encoding)
          Writes the head part of the response.
protected abstract  void writeHeaderContribution(Response response)
          Writes header contribution ( or

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.