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

java.lang.Object
  extended by com.esri.adf.web.faces.renderkit.xml.ajax.TocRenderer
All Implemented Interfaces:
AJAXRenderer

public class TocRenderer
extends Object
implements AJAXRenderer

A renderer for the TocControl. Generates an XML representation of the control which is processed by the AJAX handler to update the control in the rendered page.

Renders <map> xml tag fragment as part of AJAX response.


Constructor Summary
TocRenderer()
           
 
Method Summary
 Class<TocControl> getControlClass()
           Return the class of the control to be passed for processing
 Object getOriginalState(javax.faces.component.UIComponent component)
           Returns the state of the argument component.
 void renderAjaxResponse(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object origState, boolean isEventSource, Element parentElement)
           Render AJAX xml response for this control.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TocRenderer

public TocRenderer()
Method Detail

getControlClass

public Class<TocControl> getControlClass()
Description copied from interface: AJAXRenderer

Return the class of the control to be passed for processing

 return MyClassName.class
 

Specified by:
getControlClass in interface AJAXRenderer

getOriginalState

public Object getOriginalState(javax.faces.component.UIComponent component)
Description copied from interface: AJAXRenderer

Returns the state of the argument component. The returned state can be null.

Specified by:
getOriginalState in interface AJAXRenderer
Parameters:
component - Component who's class is the same as that returned by getControlClass method


renderAjaxResponse

public void renderAjaxResponse(javax.faces.context.FacesContext context,
                               javax.faces.component.UIComponent component,
                               Object origState,
                               boolean isEventSource,
                               Element parentElement)
Description copied from interface: AJAXRenderer

Render AJAX xml response for this control. The response is contained within the argument Document.

 if (state != null && state.equals(currentState))
   return;
 
 org.w3c.dom.Element myTag = com.esri.adf.web.util.XMLUtil.createElement("my-tag", null, parentElement);
 com.esri.adf.web.util.XMLUtil.createElement("id", component.getId(), myTag);
 ...
 

Specified by:
renderAjaxResponse in interface AJAXRenderer
Parameters:
context - Current FacesContext instance
component - Component who's class is the same as that returned by getControlClass method
origState - Object returned by getOriginalState method. May be null.
isEventSource - True if component handled request from client to perform operation on server
parentElement - Root level XML response node. All content must be rendered within a unique tag which is created as a child for this parentElement