|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.faces.renderkit.xml.ajax.AJAXResponseRenderer
public class AJAXResponseRenderer
The AJAXResponseRenderer class is responsible for iterating through the elements in a form and calling the
appropriate AJAXRenderer
to render its state to XML. This XML is
then returned to the client which is parsed and appropriate updates are made.
Vector eventSources = new Vector();
... add event source id ...
AJAXResponseRenderer renderer = new AJAXResponseRenderer(facesContext, eventSources, form);
... do processing ...
webContext.refresh(); //update application
Document doc = renderer.renderResponse(facesContext);
AJAXUtil.writeResponse(FacesContext, Document)
facesContext.responseComplete();
Constructor Summary | |
---|---|
AJAXResponseRenderer(javax.faces.context.FacesContext facesContext,
Vector<String> eventSourceIds,
javax.faces.component.UIComponent form)
Creates a new instance of AJAXResponseRenderer and store the state of the components within the argument form. |
Method Summary | |
---|---|
Vector<String> |
getEventSourceIds()
Ids of component(s) passed when constructing this object. |
Document |
renderResponse(javax.faces.context.FacesContext facesContext)
Once the updates have been made to the components, calling this method calls all registered AJAXRenderers renderAjaxResponse method to allow these to render the content appropriately. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AJAXResponseRenderer(javax.faces.context.FacesContext facesContext, Vector<String> eventSourceIds, javax.faces.component.UIComponent form) throws Exception
Creates a new instance of AJAXResponseRenderer and store the state of the components within the argument form. The response renderer object must be instantiated before the change of the application is triggered.
During initialization, this object retrieves the AJAXRenderer
s
from the list specified in the WEB-INF/ajax-renderers.xml. The getOriginalState method is called on each of these
renderers.
facesContext
- Current FacesContext instanceeventSourceIds
- Ids of control(s) which are expected to perform actions to trigger updates. Can be empty.form
- HTMLForm element containing controls to update
Exception
Method Detail |
---|
public Document renderResponse(javax.faces.context.FacesContext facesContext) throws Exception
Once the updates have been made to the components, calling this method calls all registered AJAXRenderers
renderAjaxResponse method to allow these to render the content appropriately. This method will add the serialized
view ID to form element. In order to get the latest view id, in your PhaseListener.afterPhase()
,
you should put this method as near the facesContext.responseComplete()
as possible.
facesContext
- Current FacesContext instance
Exception
public Vector<String> getEventSourceIds()
Ids of component(s) passed when constructing this object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |