com.esri.adf.web.faces.renderkit.xml.ajax
Class AJAXUtil

java.lang.Object
  extended bycom.esri.adf.web.faces.renderkit.xml.ajax.AJAXUtil

public class AJAXUtil
extends java.lang.Object

Utility class.


Constructor Summary
AJAXUtil()
           
 
Method Summary
static void writeResponse(javax.faces.context.FacesContext facesContext, org.w3c.dom.Document doc)
           This method is the preferred way to render AJAX XML responses to be returned to the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AJAXUtil

public AJAXUtil()
Method Detail

writeResponse

public static void writeResponse(javax.faces.context.FacesContext facesContext,
                                 org.w3c.dom.Document doc)
                          throws java.io.IOException

This method is the preferred way to render AJAX XML responses to be returned to the client.

 Document doc = XMLUtil.newDocument();
 ... add content to xml document ...
 AJAXUtil.writeResponse(facesContext, doc);
 facesContext.responseComplete();
 

This method gets the current response object from the external context, writes the response and then closes the response writer.

Parameters:
facesContext - Current FacesContext instance
doc - XML Document with content to be returned to client

Throws:
java.io.IOException