org.jasig.web.portlet.mvc
Class AbstractAjaxController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.portlet.context.PortletApplicationObjectSupport
          extended by org.springframework.web.portlet.handler.PortletContentGenerator
              extended by org.springframework.web.portlet.mvc.AbstractController
                  extended by org.jasig.web.portlet.mvc.AbstractAjaxController
All Implemented Interfaces:
ApplicationContextAware, PortletContextAware, Controller

public abstract class AbstractAjaxController
extends AbstractController

Base class for AJAX portlet callbacks that handles passing the model to the ajax response servlet via a unique random attribute.

Version:
$Revision$
Author:
Eric Dalquist

Field Summary
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
AbstractAjaxController()
           
 
Method Summary
 String getAjaxHandlerErrorKey()
           
 String getAjaxServletName()
           
 ModelPasser getModelPasser()
           
 SessionKeyGenerator getSessionKeyGenerator()
           
protected  void handleActionRequestInternal(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
           
protected abstract  Map<String,?> handleAjaxRequestInternal(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
          Called by handleActionRequestInternal(ActionRequest, ActionResponse) to handle the ajax callback.
 void setAjaxHandlerErrorKey(String ajaxHandlerErrorKey)
           
 void setAjaxServletName(String ajaxServletName)
          The path to the rendering serlvet do redirect the request to after the model data has been passed.
 void setModelPasser(ModelPasser modelPasser)
           
 void setSessionKeyGenerator(SessionKeyGenerator sessionKeyGenerator)
           
 
Methods inherited from class org.springframework.web.portlet.mvc.AbstractController
handleActionRequest, handleRenderRequest, handleRenderRequestInternal, isRenderWhenMinimized, isSynchronizeOnSession, setRenderWhenMinimized, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.portlet.handler.PortletContentGenerator
applyCacheSeconds, cacheForSeconds, check, checkAndPrepare, checkAndPrepare, getCacheSeconds, isRequireSession, preventCaching, setCacheSeconds, setRequireSession
 
Methods inherited from class org.springframework.web.portlet.context.PortletApplicationObjectSupport
getPortletContext, getTempDir, isContextRequired, setPortletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAjaxController

public AbstractAjaxController()
Method Detail

getSessionKeyGenerator

public SessionKeyGenerator getSessionKeyGenerator()
See Also:
AjaxPortletSupportService.getSessionKeyGenerator()

setSessionKeyGenerator

public void setSessionKeyGenerator(SessionKeyGenerator sessionKeyGenerator)
See Also:
AjaxPortletSupportService.setSessionKeyGenerator(SessionKeyGenerator)

getModelPasser

public ModelPasser getModelPasser()
See Also:
AjaxPortletSupportService.getModelPasser()

setModelPasser

public void setModelPasser(ModelPasser modelPasser)
See Also:
AjaxPortletSupportService.setModelPasser(ModelPasser)

getAjaxHandlerErrorKey

public String getAjaxHandlerErrorKey()
See Also:
AjaxPortletSupportService.getAjaxHandlerErrorKey()

setAjaxHandlerErrorKey

public void setAjaxHandlerErrorKey(String ajaxHandlerErrorKey)
See Also:
AjaxPortletSupportService.setAjaxHandlerErrorKey(String)

getAjaxServletName

public String getAjaxServletName()

setAjaxServletName

public void setAjaxServletName(String ajaxServletName)
The path to the rendering serlvet do redirect the request to after the model data has been passed. Defaults to the value of AjaxPortletSupport.DEFAULT_AJAX_SERVLET_NAME


handleActionRequestInternal

protected final void handleActionRequestInternal(javax.portlet.ActionRequest request,
                                                 javax.portlet.ActionResponse response)
                                          throws Exception
Overrides:
handleActionRequestInternal in class AbstractController
Throws:
Exception

handleAjaxRequestInternal

protected abstract Map<String,?> handleAjaxRequestInternal(javax.portlet.ActionRequest request,
                                                           javax.portlet.ActionResponse response)
                                                    throws Exception
Called by handleActionRequestInternal(ActionRequest, ActionResponse) to handle the ajax callback. The returned model will be passed to the AjaxResponseController via the ModelPasser.passModelToServlet(ActionRequest, ActionResponse, String, Map) method.

Throws:
Exception
See Also:
handleActionRequestInternal(ActionRequest, ActionResponse)


Copyright © 2010 Jasig. All Rights Reserved.