com.cc.framework.adapter
Interface AjaxRequest

All Known Subinterfaces:
ActionContext, ControlActionContext, ControlRequestContext, FormActionContext
All Known Implementing Classes:
ActionContextWrapper, ConcreteActionContext, ConcreteControlActionContext, ConcreteFormActionContext

public interface AjaxRequest

AJAX Request

Author:
P001002

Method Summary
 void addMenu(MenuItem menu)
          Adds the given Menu to the AJAX response for this action.
 void cancelAjaxRequest()
          Cancels the AJAX event processing of the framework.
 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.util.Iterator getDirtyControls()
          Returns an iterator that iterates all dirty controls that needs to be rendered after an AJAX request.
 java.util.Iterator getMenus()
          Returns an Iterator that iterates all menus
 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.
 void markDirty(Control control)
          Adds the given Control to the dirty list.
 void setAjaxAttribute(Control control, java.lang.String attributeName, java.lang.Object value)
          Adds a new Attribute to the container.
 

Method Detail

isAjaxRequest

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

Returns:
boolean

cancelAjaxRequest

public void cancelAjaxRequest()
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.


isAjaxCanceled

public boolean isAjaxCanceled()
Returns true when this AJAX request has been canceled.

Returns:
boolean

getDirtyControls

public java.util.Iterator getDirtyControls()
Returns an iterator that iterates all dirty controls that needs to be rendered after an AJAX request.

Returns:
Iterator>Control<

markDirty

public void markDirty(Control control)
Adds the given Control to the dirty list. The context needs to be an AJAX request

Parameters:
control - the control that needs to be redrawn

getAjaxAttribute

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

Parameters:
control - the control or null
attributeName - The attributes name
Returns:
Attribute value or null

getAjaxAttributeNames

public java.util.Iterator getAjaxAttributeNames(Control control)
Returns an Iterator that iterates all attribute names

Parameters:
control - the control or null
Returns:
attribute names

setAjaxAttribute

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

Parameters:
control - the control or null
attributeName - The attributes name
value - The attribute value

addMenu

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

Parameters:
menu - the menu to add to the response

getMenus

public java.util.Iterator getMenus()
Returns an Iterator that iterates all menus

Returns:
menu iterator<MenuItem>


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