com.cc.framework.adapter.struts
Class ConcreteActionContext

java.lang.Object
  extended bycom.cc.framework.adapter.struts.ConcreteActionContext
All Implemented Interfaces:
ActionContext, AjaxRequest, HttpContext, RequestContext

public class ConcreteActionContext
extends java.lang.Object
implements ActionContext

This class encapsulate all informations needed when calling a control action method.

Since:
1.0
Version:
$Revision: 1.2 $
Author:
Harald Schulz

Nested Class Summary
protected static class ConcreteActionContext.EmptyIterator
           
 
Field Summary
private  boolean ajax
          This fag indicates that we are currently handling a Request that comes from an client side AJAX call
private  java.util.Map ajaxAttributes
          Optional AJAX Attributes
private  boolean ajaxCanceled
          This fag indicates that an AJAX request has been canceled
private  java.util.List dirtyControls
          List with dirty controls.
private  org.apache.struts.action.ActionMessages errors
          Collection of error messages which was filled during the execution of an action.
private  org.apache.struts.action.ActionForm form
          The ActionForm form
private  org.apache.struts.action.ActionForward forward
          The ActionForward which should be activate by the action
private  org.apache.struts.action.ActionMapping mapping
          The ActionMapping
private  java.util.List menus
          List with menus that need to be rendered to the AJAX response
private  org.apache.struts.action.ActionMessages messages
          Collection of messages which was filled during the execution of an action.
private  boolean noForward
          This flag can be set if the ActionForward should be ignored.
private  javax.servlet.http.HttpServletRequest request
          The HttpServletRequest
private  javax.servlet.http.HttpServletResponse response
          The HttpServletResponse
private  javax.servlet.ServletContext servletContext
          The servlet context
 
Constructor Summary
ConcreteActionContext(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Constructor for ConcreteActionContext
 
Method Summary
 void addError(java.lang.String property, org.apache.struts.action.ActionMessage error)
          Add an new Action error to the Error Collection.
 void addError(java.lang.String key, java.lang.Throwable t)
          Serves to include an exception in the global error collection.
 void addErrors(org.apache.struts.action.ActionMessages errorList)
          Adds an error collection
 void addGlobalError(java.lang.String key)
          Saves a general error (without reference to an input field) and is used to present error messages upon returning from a sub-dialog within the calling dialog.
 void addGlobalError(java.lang.String key, java.lang.Object p1)
          Saves a general error (without reference to an input field)
 void addGlobalError(java.lang.String key, java.lang.Object p1, java.lang.Object p2)
          Saves a general error (without reference to an input field)
 void addGlobalError(java.lang.String key, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          Saves a general error (without reference to an input field)
 void addGlobalError(java.lang.String key, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4)
          Saves a general error (without reference to an input field)
 void addGlobalMessage(java.lang.String key)
          Saves a message without reference to a Property.
 void addGlobalMessage(java.lang.String key, java.lang.Object p1)
          Saves a message without reference to a Property.
 void addGlobalMessage(java.lang.String key, java.lang.Object p1, java.lang.Object p2)
          Saves a message without reference to a Property.
 void addGlobalMessage(java.lang.String key, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          Saves a message without reference to a Property.
 void addGlobalMessage(java.lang.String key, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4)
          Saves a message without reference to a Property.
 void addMenu(MenuItem menu)
          Adds the given Menu to the AJAX response for this action.
 void addMessage(java.lang.String property, org.apache.struts.action.ActionMessage message)
          Method addMessage
 void addMessages(org.apache.struts.action.ActionMessages messageList)
          Adds an message collection
 void addPropertyError(java.lang.String property, java.lang.String key)
          Saves an error to a Property in the error collection
 void addPropertyError(java.lang.String property, java.lang.String key, java.lang.Object p1)
          Saves an error to a Property in the error collection
 void addPropertyError(java.lang.String property, java.lang.String key, java.lang.Object p1, java.lang.Object p2)
          Saves an error to a Property in the error collection
 void addPropertyError(java.lang.String property, java.lang.String key, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          Saves an error to a Property in the error collection
 void addPropertyError(java.lang.String property, java.lang.String key, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4)
          Saves an error to a Property in the error collection
 void addPropertyMessage(java.lang.String property, java.lang.String key)
          Saves a message for a Property in the Message collection
 void addPropertyMessage(java.lang.String property, java.lang.String key, java.lang.Object p1)
          Saves a message for a Property in the Message collection
 void addPropertyMessage(java.lang.String property, java.lang.String key, java.lang.Object p1, java.lang.Object p2)
          Saves a message for a Property in the Message collection
 void addPropertyMessage(java.lang.String property, java.lang.String key, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          Saves a message for a Property in the Message collection
 void addPropertyMessage(java.lang.String property, java.lang.String key, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4)
          Saves a message for a Property in the Message collection
 void cancelAjaxRequest()
          Cancels the AJAX event processing of the framework.
 void consumeStrutsMessages()
          This method transfers all existing Struts errors and messages into the frameworks message store.
protected  org.apache.struts.action.ActionMessages errorCollection()
          Retrieves or creates the error collection.
 org.apache.struts.action.ActionForm form()
          Gets the ActionForm
 void forward(org.apache.struts.action.ActionForward forward)
          Sets the forward
 void forwardByName(java.lang.String forwardName)
          Forwards to the Action specified by the Name
 void forwardByName(java.lang.String forwardName, java.lang.Object p1)
          Forwards to the Action specified by the Name
 void forwardByName(java.lang.String forwardName, java.lang.Object[] params)
          Forwards to the Action specified by the Name
 void forwardByName(java.lang.String forwardName, java.lang.Object p1, java.lang.Object p2)
          Forwards to the Action specified by the Name
 void forwardByName(java.lang.String forwardName, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          Forwards to the Action specified by the Name
 void forwardToAction(java.lang.String actionName)
          Forwards to the specified Action
 void forwardToAction(java.lang.String actionName, boolean redirect)
          Forwards to the specified Action
 void forwardToAction(java.lang.String actionName, java.util.Map params)
          Forwards to the specified Action
 void forwardToAction(java.lang.String actionName, java.util.Map params, boolean redirect)
          Forwards to the specified Action
 void forwardToInput()
          Forwards the Request to the Input, which is specified for the Action in the struts configuration.
 void forwardToResponse()
          The next Forward should be directly directed to the Response
 java.lang.Object getAjaxAttribute(Control control, java.lang.String attributeName)
          Returns the attribute with the given name from the container
 java.util.Iterator getAjaxAttributeNames(Control control)
          Returns an Iterator that iterates all attribute names
 java.lang.Object getAttribute(java.lang.String name, HttpScope scope)
          Returns the attribute with the given name from the specified scope
 java.util.Iterator getDirtyControls()
          Returns an iterator that iterates all dirty controls that needs to be rendered after an AJAX request.
 org.apache.struts.action.ActionMessages getErrors()
          Gets the error collection
 org.apache.struts.action.ActionForward getForward()
          Gets the forward
 java.util.Locale getLocale()
          Returns the current Locale for this Request
 java.util.Iterator getMenus()
          Returns an Iterator that iterates all menus
 org.apache.struts.action.ActionMessages getMessages()
          Returns the message collection
 RequestContext getNestedContext()
          Gets the nested Action Context
 Principal getPrincipal()
          Returns the Principal Object in the current User session
 javax.servlet.ServletContext getServletContext()
          Returns the Servlet Context
 boolean hasErrors()
          Checks whether there are error messages.
 boolean hasMessages()
          Checks whether there are messages present.
 void invalidDialogContext(java.lang.String messageKey)
          Generates a standardized error message if no DialogContext exists.
 boolean isAjaxCanceled()
          Returns true when this AJAX request has been canceled.
 boolean isAjaxRequest()
          Returns true when this request was sent by an AJAX function call from within the clients browser.
 boolean isHandeled()
          Returns if the request was handeled
 org.apache.struts.action.ActionMapping mapping()
          Gets the ActionMapping
 void markDirty(Control control)
          Adds the given Control to the dirty list.
protected  org.apache.struts.action.ActionMessages messageCollection()
          Retrieves or creates the message collection.
 javax.servlet.http.HttpServletRequest request()
          Returns the HTTP Request
 javax.servlet.http.HttpServletResponse response()
          Returns the HTTP Response
 javax.servlet.http.HttpSession session()
          Gets the session object
 void setAjaxAttribute(Control control, java.lang.String attributeName, java.lang.Object value)
          Adds a new Attribute to the container.
 void setForm(org.apache.struts.action.ActionForm form)
          Associates a new ActionForm with this ActionContext
 java.lang.String toString()
           
 void validateForm()
          Validates the action form and adds the error messages to the internal error collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

forward

private org.apache.struts.action.ActionForward forward
The ActionForward which should be activate by the action


errors

private org.apache.struts.action.ActionMessages errors
Collection of error messages which was filled during the execution of an action.


messages

private org.apache.struts.action.ActionMessages messages
Collection of messages which was filled during the execution of an action.


mapping

private org.apache.struts.action.ActionMapping mapping
The ActionMapping


form

private org.apache.struts.action.ActionForm form
The ActionForm form


request

private javax.servlet.http.HttpServletRequest request
The HttpServletRequest


response

private javax.servlet.http.HttpServletResponse response
The HttpServletResponse


servletContext

private javax.servlet.ServletContext servletContext
The servlet context


noForward

private boolean noForward
This flag can be set if the ActionForward should be ignored.


ajax

private boolean ajax
This fag indicates that we are currently handling a Request that comes from an client side AJAX call


ajaxCanceled

private boolean ajaxCanceled
This fag indicates that an AJAX request has been canceled


ajaxAttributes

private java.util.Map ajaxAttributes
Optional AJAX Attributes


dirtyControls

private java.util.List dirtyControls
List with dirty controls. The framework will render all dirty controls after an AJAX request that has not been canceled


menus

private java.util.List menus
List with menus that need to be rendered to the AJAX response

Constructor Detail

ConcreteActionContext

public ConcreteActionContext(org.apache.struts.action.ActionMapping mapping,
                             org.apache.struts.action.ActionForm form,
                             javax.servlet.ServletContext servletContext,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
Constructor for ConcreteActionContext

Parameters:
mapping - The ActionMapping
form - The ActionForm
servletContext - the servlet context
request - The HttpServletRequest
response - The HttpServletResponse
Method Detail

getNestedContext

public RequestContext getNestedContext()
Description copied from interface: RequestContext
Gets the nested Action Context

Specified by:
getNestedContext in interface RequestContext
Returns:
The nested Action Context
See Also:
RequestContext.getNestedContext()

errorCollection

protected org.apache.struts.action.ActionMessages errorCollection()
Retrieves or creates the error collection. The Error collection is stored in the users session

Returns:
Error Collection

messageCollection

protected org.apache.struts.action.ActionMessages messageCollection()
Retrieves or creates the message collection. The Message collection is stored in the users session

Returns:
Message Collection

mapping

public org.apache.struts.action.ActionMapping mapping()
Gets the ActionMapping

Specified by:
mapping in interface ActionContext
Returns:
Returns the ActionMapping

form

public org.apache.struts.action.ActionForm form()
Gets the ActionForm

Specified by:
form in interface ActionContext
Returns:
Returns the ActionForm

setForm

public void setForm(org.apache.struts.action.ActionForm form)
Description copied from interface: ActionContext
Associates a new ActionForm with this ActionContext

Specified by:
setForm in interface ActionContext
Parameters:
form -
See Also:
ActionContext.setForm(org.apache.struts.action.ActionForm)

validateForm

public void validateForm()
Description copied from interface: ActionContext
Validates the action form and adds the error messages to the internal error collection

Specified by:
validateForm in interface ActionContext
See Also:
ActionContext.validateForm()

isHandeled

public boolean isHandeled()
Returns if the request was handeled

Specified by:
isHandeled in interface ActionContext
Returns:
Returns a boolean

getForward

public org.apache.struts.action.ActionForward getForward()
Description copied from interface: ActionContext
Gets the forward

Specified by:
getForward in interface ActionContext
Returns:
Returns a ActionForward
See Also:
ActionContext.getForward()

forward

public void forward(org.apache.struts.action.ActionForward forward)
Description copied from interface: ActionContext
Sets the forward

Specified by:
forward in interface ActionContext
Parameters:
forward - The forward to set
See Also:
ActionContext.forward(ActionForward)

forwardToResponse

public void forwardToResponse()
Description copied from interface: ActionContext
The next Forward should be directly directed to the Response

Specified by:
forwardToResponse in interface ActionContext
See Also:
ActionContext.forwardToResponse()

forwardToInput

public void forwardToInput()
Description copied from interface: ActionContext
Forwards the Request to the Input, which is specified for the Action in the struts configuration.

Specified by:
forwardToInput in interface ActionContext
See Also:
ActionContext.forwardToInput()

forwardToAction

public void forwardToAction(java.lang.String actionName)
Description copied from interface: ActionContext
Forwards to the specified Action

Specified by:
forwardToAction in interface ActionContext
Parameters:
actionName - Action name
See Also:
ActionContext.forwardToAction(String)

forwardToAction

public void forwardToAction(java.lang.String actionName,
                            boolean redirect)
Description copied from interface: ActionContext
Forwards to the specified Action

Specified by:
forwardToAction in interface ActionContext
Parameters:
actionName - Action name
redirect - when set to true a redirect (HTTP 303) will be sent to the browser
See Also:
ActionContext.forwardToAction(java.lang.String, boolean)

forwardToAction

public void forwardToAction(java.lang.String actionName,
                            java.util.Map params)
Description copied from interface: ActionContext
Forwards to the specified Action

Specified by:
forwardToAction in interface ActionContext
Parameters:
actionName - Action name
params - Additional Parameter map (key - value pairs)
See Also:
ActionContext.forwardToAction(java.lang.String, java.util.Map)

forwardToAction

public void forwardToAction(java.lang.String actionName,
                            java.util.Map params,
                            boolean redirect)
Description copied from interface: ActionContext
Forwards to the specified Action

Specified by:
forwardToAction in interface ActionContext
Parameters:
actionName - Action name
params - Additional Parameter map (key - value pairs)
redirect - when set to true a redirect (HTTP 303) will be sent to the browser
See Also:
ActionContext.forwardToAction(java.lang.String, java.util.Map, boolean)

forwardByName

public void forwardByName(java.lang.String forwardName)
Description copied from interface: ActionContext
Forwards to the Action specified by the Name

Specified by:
forwardByName in interface ActionContext
Parameters:
forwardName - Action name
See Also:
ActionContext.forwardByName(String)

forwardByName

public void forwardByName(java.lang.String forwardName,
                          java.lang.Object p1)
Description copied from interface: ActionContext
Forwards to the Action specified by the Name

Specified by:
forwardByName in interface ActionContext
Parameters:
forwardName - Action name
p1 - Additional Parameter
See Also:
ActionContext.forwardByName(String, Object)

forwardByName

public void forwardByName(java.lang.String forwardName,
                          java.lang.Object p1,
                          java.lang.Object p2)
Description copied from interface: ActionContext
Forwards to the Action specified by the Name

Specified by:
forwardByName in interface ActionContext
Parameters:
forwardName - Action name
p1 - Additional Parameter
p2 - Additional Parameter
See Also:
ActionContext.forwardByName(String, Object, Object)

forwardByName

public void forwardByName(java.lang.String forwardName,
                          java.lang.Object p1,
                          java.lang.Object p2,
                          java.lang.Object p3)
Description copied from interface: ActionContext
Forwards to the Action specified by the Name

Specified by:
forwardByName in interface ActionContext
Parameters:
forwardName - Action name
p1 - Additional Parameter
p2 - Additional Parameter
p3 - Additional Parameter
See Also:
ActionContext.forwardByName(String, Object, Object, Object)

forwardByName

public void forwardByName(java.lang.String forwardName,
                          java.lang.Object[] params)
Description copied from interface: ActionContext
Forwards to the Action specified by the Name

Specified by:
forwardByName in interface ActionContext
Parameters:
forwardName - Action name
params - Object array with additional parameter
See Also:
ActionContext.forwardByName(java.lang.String, java.lang.Object[])

getErrors

public org.apache.struts.action.ActionMessages getErrors()
Description copied from interface: ActionContext
Gets the error collection

Specified by:
getErrors in interface ActionContext
Returns:
ActionErrors
See Also:
ActionContext.getErrors()

invalidDialogContext

public void invalidDialogContext(java.lang.String messageKey)
Description copied from interface: ActionContext
Generates a standardized error message if no DialogContext exists.

Specified by:
invalidDialogContext in interface ActionContext
Parameters:
messageKey - Message Key
See Also:
ActionContext.invalidDialogContext(String)

consumeStrutsMessages

public void consumeStrutsMessages()
This method transfers all existing Struts errors and messages into the frameworks message store. The Struts collections will be cleared.

Specified by:
consumeStrutsMessages in interface ActionContext
See Also:
ActionContext.consumeStrutsMessages()

addError

public void addError(java.lang.String property,
                     org.apache.struts.action.ActionMessage error)
Add an new Action error to the Error Collection.

Parameters:
property - Property Name
error - The Error

addErrors

public void addErrors(org.apache.struts.action.ActionMessages errorList)
Description copied from interface: ActionContext
Adds an error collection

Specified by:
addErrors in interface ActionContext
Parameters:
errorList - ActionErrors
See Also:
ActionContext.addErrors(ActionMessages)

addError

public void addError(java.lang.String key,
                     java.lang.Throwable t)
Description copied from interface: ActionContext
Serves to include an exception in the global error collection. Remark: The Framework, as against Struts, rescues the error and message text collection across several redirects till the next JSP page is called.

Specified by:
addError in interface ActionContext
Parameters:
key - Key
t - Throwable
See Also:
ActionContext.addError(String, Throwable)

addGlobalError

public void addGlobalError(java.lang.String key)
Description copied from interface: ActionContext
Saves a general error (without reference to an input field) and is used to present error messages upon returning from a sub-dialog within the calling dialog.

Specified by:
addGlobalError in interface ActionContext
Parameters:
key - Key
See Also:
ActionContext.addGlobalError(String)

addGlobalError

public void addGlobalError(java.lang.String key,
                           java.lang.Object p1)
Description copied from interface: ActionContext
Saves a general error (without reference to an input field)

Specified by:
addGlobalError in interface ActionContext
Parameters:
key - Key
p1 - Object1
See Also:
ActionContext.addGlobalError(String, Object)

addGlobalError

public void addGlobalError(java.lang.String key,
                           java.lang.Object p1,
                           java.lang.Object p2)
Description copied from interface: ActionContext
Saves a general error (without reference to an input field)

Specified by:
addGlobalError in interface ActionContext
Parameters:
key - Key
p1 - Object1
p2 - Object2
See Also:
ActionContext.addGlobalError(String, Object, Object)

addGlobalError

public void addGlobalError(java.lang.String key,
                           java.lang.Object p1,
                           java.lang.Object p2,
                           java.lang.Object p3)
Description copied from interface: ActionContext
Saves a general error (without reference to an input field)

Specified by:
addGlobalError in interface ActionContext
Parameters:
key - Key
p1 - Object1
p2 - Object2
p3 - Object3
See Also:
ActionContext.addGlobalError(String, Object, Object, Object)

addGlobalError

public void addGlobalError(java.lang.String key,
                           java.lang.Object p1,
                           java.lang.Object p2,
                           java.lang.Object p3,
                           java.lang.Object p4)
Description copied from interface: ActionContext
Saves a general error (without reference to an input field)

Specified by:
addGlobalError in interface ActionContext
Parameters:
key - Key
p1 - Object1
p2 - Object2
p3 - Object3
p4 - Object4
See Also:
ActionContext.addGlobalError(String, Object, Object, Object, Object)

addPropertyError

public void addPropertyError(java.lang.String property,
                             java.lang.String key)
Description copied from interface: ActionContext
Saves an error to a Property in the error collection

Specified by:
addPropertyError in interface ActionContext
Parameters:
property - The property
key - The key
See Also:
ActionContext.addPropertyError(String, String)

addPropertyError

public void addPropertyError(java.lang.String property,
                             java.lang.String key,
                             java.lang.Object p1)
Description copied from interface: ActionContext
Saves an error to a Property in the error collection

Specified by:
addPropertyError in interface ActionContext
Parameters:
property - The property
key - The key
p1 - Additional Parameter
See Also:
ActionContext.addPropertyError(String, String, Object)

addPropertyError

public void addPropertyError(java.lang.String property,
                             java.lang.String key,
                             java.lang.Object p1,
                             java.lang.Object p2)
Description copied from interface: ActionContext
Saves an error to a Property in the error collection

Specified by:
addPropertyError in interface ActionContext
Parameters:
property - The property
key - The key
p1 - Additional Parameter
p2 - Additional Parameter
See Also:
ActionContext.addPropertyError(String, String, Object, Object)

addPropertyError

public void addPropertyError(java.lang.String property,
                             java.lang.String key,
                             java.lang.Object p1,
                             java.lang.Object p2,
                             java.lang.Object p3)
Description copied from interface: ActionContext
Saves an error to a Property in the error collection

Specified by:
addPropertyError in interface ActionContext
Parameters:
property - The property
key - The key
p1 - Additional Parameter
p2 - Additional Parameter
p3 - Additional Parameter
See Also:
ActionContext.addPropertyError(String, String, Object, Object, Object)

addPropertyError

public void addPropertyError(java.lang.String property,
                             java.lang.String key,
                             java.lang.Object p1,
                             java.lang.Object p2,
                             java.lang.Object p3,
                             java.lang.Object p4)
Description copied from interface: ActionContext
Saves an error to a Property in the error collection

Specified by:
addPropertyError in interface ActionContext
Parameters:
property - The property
key - The resource key
p1 - Additional Parameter
p2 - Additional Parameter
p3 - Additional Parameter
p4 - Additional Parameter
See Also:
ActionContext.addPropertyError(String, String, Object, Object, Object, Object)

hasErrors

public boolean hasErrors()
Description copied from interface: ActionContext
Checks whether there are error messages.

Specified by:
hasErrors in interface ActionContext
Returns:
true if there are error messages, false otherwise
See Also:
ActionContext.hasErrors()

getMessages

public org.apache.struts.action.ActionMessages getMessages()
Description copied from interface: ActionContext
Returns the message collection

Specified by:
getMessages in interface ActionContext
Returns:
ActionMessages
See Also:
ActionContext.getMessages()

addMessage

public void addMessage(java.lang.String property,
                       org.apache.struts.action.ActionMessage message)
Method addMessage

Parameters:
property - Property
message - ActionMessage

addMessages

public void addMessages(org.apache.struts.action.ActionMessages messageList)
Description copied from interface: ActionContext
Adds an message collection

Specified by:
addMessages in interface ActionContext
Parameters:
messageList - ActionMessages
See Also:
ActionContext.addMessages(org.apache.struts.action.ActionMessages)

addGlobalMessage

public void addGlobalMessage(java.lang.String key)
Description copied from interface: ActionContext
Saves a message without reference to a Property. Is used to present messages upon returning from a sub-dialog within the calling dialog.

Specified by:
addGlobalMessage in interface ActionContext
Parameters:
key - Message resource Key
See Also:
ActionContext.addGlobalMessage(String)

addGlobalMessage

public void addGlobalMessage(java.lang.String key,
                             java.lang.Object p1)
Description copied from interface: ActionContext
Saves a message without reference to a Property.

Specified by:
addGlobalMessage in interface ActionContext
Parameters:
key - Message resource Key
p1 - Additional Parameter
See Also:
ActionContext.addGlobalMessage(String, Object)

addGlobalMessage

public void addGlobalMessage(java.lang.String key,
                             java.lang.Object p1,
                             java.lang.Object p2)
Description copied from interface: ActionContext
Saves a message without reference to a Property.

Specified by:
addGlobalMessage in interface ActionContext
Parameters:
key - Message resource Key
p1 - Additional Parameter
p2 - Additional Parameter
See Also:
ActionContext.addGlobalMessage(String, Object, Object)

addGlobalMessage

public void addGlobalMessage(java.lang.String key,
                             java.lang.Object p1,
                             java.lang.Object p2,
                             java.lang.Object p3)
Description copied from interface: ActionContext
Saves a message without reference to a Property.

Specified by:
addGlobalMessage in interface ActionContext
Parameters:
key - Message resource Key
p1 - Additional Parameter
p2 - Additional Parameter
p3 - Additional Parameter
See Also:
ActionContext.addGlobalMessage(String, Object, Object, Object)

addGlobalMessage

public void addGlobalMessage(java.lang.String key,
                             java.lang.Object p1,
                             java.lang.Object p2,
                             java.lang.Object p3,
                             java.lang.Object p4)
Description copied from interface: ActionContext
Saves a message without reference to a Property.

Specified by:
addGlobalMessage in interface ActionContext
Parameters:
key - Message resource Key
p1 - Additional Parameter
p2 - Additional Parameter
p3 - Additional Parameter
p4 - Additional Parameter
See Also:
ActionContext.addGlobalMessage(String, Object, Object, Object, Object)

addPropertyMessage

public void addPropertyMessage(java.lang.String property,
                               java.lang.String key)
Description copied from interface: ActionContext
Saves a message for a Property in the Message collection

Specified by:
addPropertyMessage in interface ActionContext
Parameters:
property - The property
key - Message resource Key
See Also:
ActionContext.addPropertyMessage(String, String)

addPropertyMessage

public void addPropertyMessage(java.lang.String property,
                               java.lang.String key,
                               java.lang.Object p1)
Description copied from interface: ActionContext
Saves a message for a Property in the Message collection

Specified by:
addPropertyMessage in interface ActionContext
Parameters:
property - The property
key - Message resource Key
p1 - Additional Parameter
See Also:
ActionContext.addPropertyMessage(String, String, Object)

addPropertyMessage

public void addPropertyMessage(java.lang.String property,
                               java.lang.String key,
                               java.lang.Object p1,
                               java.lang.Object p2)
Description copied from interface: ActionContext
Saves a message for a Property in the Message collection

Specified by:
addPropertyMessage in interface ActionContext
Parameters:
property - The property
key - Message resource Key
p1 - Additional Parameter
p2 - Additional Parameter
See Also:
ActionContext.addPropertyMessage(String, String, Object, Object)

addPropertyMessage

public void addPropertyMessage(java.lang.String property,
                               java.lang.String key,
                               java.lang.Object p1,
                               java.lang.Object p2,
                               java.lang.Object p3)
Description copied from interface: ActionContext
Saves a message for a Property in the Message collection

Specified by:
addPropertyMessage in interface ActionContext
Parameters:
property - The property
key - Message resource Key
p1 - Additional Parameter
p2 - Additional Parameter
p3 - Additional Parameter
See Also:
ActionContext.addPropertyMessage(String, String, Object, Object, Object)

addPropertyMessage

public void addPropertyMessage(java.lang.String property,
                               java.lang.String key,
                               java.lang.Object p1,
                               java.lang.Object p2,
                               java.lang.Object p3,
                               java.lang.Object p4)
Description copied from interface: ActionContext
Saves a message for a Property in the Message collection

Specified by:
addPropertyMessage in interface ActionContext
Parameters:
property - The property
key - Message resource Key
p1 - Additional Parameter
p2 - Additional Parameter
p3 - Additional Parameter
p4 - Additional Parameter
See Also:
ActionContext.addPropertyMessage(String, String, Object, Object, Object, Object)

hasMessages

public boolean hasMessages()
Description copied from interface: ActionContext
Checks whether there are messages present.

Specified by:
hasMessages in interface ActionContext
Returns:
true if there are messages, false otherwise
See Also:
ActionContext.hasMessages()

getPrincipal

public Principal getPrincipal()
Description copied from interface: RequestContext
Returns the Principal Object in the current User session

Specified by:
getPrincipal in interface RequestContext
Returns:
The object which implements the principal interface
See Also:
RequestContext.getPrincipal()

getLocale

public java.util.Locale getLocale()
Description copied from interface: RequestContext
Returns the current Locale for this Request

Specified by:
getLocale in interface RequestContext
Returns:
Locale
See Also:
RequestContext.getLocale()

toString

public java.lang.String toString()
See Also:
Object.toString()

isAjaxRequest

public boolean isAjaxRequest()
Description copied from interface: AjaxRequest
Returns true when this request was sent by an AJAX function call from within the clients browser.

Specified by:
isAjaxRequest in interface AjaxRequest
Returns:
boolean
See Also:
AjaxRequest.isAjaxRequest()

cancelAjaxRequest

public void cancelAjaxRequest()
Description copied from interface: AjaxRequest
Cancels the AJAX event processing of the framework. So the framework will not send a AJAX delta response but will forward to a normal Struts ActionForward.

Specified by:
cancelAjaxRequest in interface AjaxRequest
See Also:
AjaxRequest.cancelAjaxRequest()

isAjaxCanceled

public boolean isAjaxCanceled()
Description copied from interface: AjaxRequest
Returns true when this AJAX request has been canceled.

Specified by:
isAjaxCanceled in interface AjaxRequest
Returns:
boolean
See Also:
AjaxRequest.isAjaxCanceled()

getDirtyControls

public java.util.Iterator getDirtyControls()
Description copied from interface: AjaxRequest
Returns an iterator that iterates all dirty controls that needs to be rendered after an AJAX request.

Specified by:
getDirtyControls in interface AjaxRequest
Returns:
Iterator>Control<
See Also:
AjaxRequest.getDirtyControls()

markDirty

public void markDirty(Control control)
Description copied from interface: AjaxRequest
Adds the given Control to the dirty list. The context needs to be an AJAX request

Specified by:
markDirty in interface AjaxRequest
Parameters:
control - the control that needs to be redrawn
See Also:
AjaxRequest.markDirty(com.cc.framework.ui.control.Control)

addMenu

public void addMenu(MenuItem menu)
Description copied from interface: AjaxRequest
Adds the given Menu to the AJAX response for this action. The context needs to be an AJAX request

Specified by:
addMenu in interface AjaxRequest
Parameters:
menu - the menu to add to the response
See Also:
AjaxRequest.addMenu(com.cc.framework.ui.model.MenuItem)

getMenus

public java.util.Iterator getMenus()
Description copied from interface: AjaxRequest
Returns an Iterator that iterates all menus

Specified by:
getMenus in interface AjaxRequest
Returns:
menu iterator<MenuItem>
See Also:
AjaxRequest.getMenus()

getAjaxAttribute

public java.lang.Object getAjaxAttribute(Control control,
                                         java.lang.String attributeName)
Description copied from interface: AjaxRequest
Returns the attribute with the given name from the container

Specified by:
getAjaxAttribute in interface AjaxRequest
Parameters:
control - the control or null
attributeName - The attributes name
Returns:
Attribute value or null
See Also:
AjaxRequest.getAjaxAttribute(com.cc.framework.ui.control.Control, java.lang.String)

getAjaxAttributeNames

public java.util.Iterator getAjaxAttributeNames(Control control)
Description copied from interface: AjaxRequest
Returns an Iterator that iterates all attribute names

Specified by:
getAjaxAttributeNames in interface AjaxRequest
Parameters:
control - the control or null
Returns:
attribute names
See Also:
AjaxRequest.getAjaxAttributeNames(com.cc.framework.ui.control.Control)

setAjaxAttribute

public void setAjaxAttribute(Control control,
                             java.lang.String attributeName,
                             java.lang.Object value)
Description copied from interface: AjaxRequest
Adds a new Attribute to the container. Any previous existing attribute with the same name will be discarded.

Specified by:
setAjaxAttribute in interface AjaxRequest
Parameters:
control - the control or null
attributeName - The attributes name
value - The attribute value
See Also:
AjaxRequest.setAjaxAttribute(com.cc.framework.ui.control.Control, java.lang.String, java.lang.Object)

getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     HttpScope scope)
Description copied from interface: HttpContext
Returns the attribute with the given name from the specified scope

Specified by:
getAttribute in interface HttpContext
Parameters:
name - the attribute name
scope - the scope to search
Returns:
attribute value or null
See Also:
HttpContext.getAttribute(java.lang.String, com.cc.framework.http.HttpScope)

getServletContext

public javax.servlet.ServletContext getServletContext()
Description copied from interface: HttpContext
Returns the Servlet Context

Specified by:
getServletContext in interface HttpContext
Returns:
ServletContext
See Also:
HttpContext.getServletContext()

request

public javax.servlet.http.HttpServletRequest request()
Description copied from interface: HttpContext
Returns the HTTP Request

Specified by:
request in interface HttpContext
Returns:
the HttpServletRequest
See Also:
HttpContext.request()

response

public javax.servlet.http.HttpServletResponse response()
Description copied from interface: HttpContext
Returns the HTTP Response

Specified by:
response in interface HttpContext
Returns:
the HttpServletResponse
See Also:
HttpContext.response()

session

public javax.servlet.http.HttpSession session()
Description copied from interface: HttpContext
Gets the session object

Specified by:
session in interface HttpContext
Returns:
HttpSession
See Also:
HttpContext.session()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.