net.wotonomy.web
Class WODynamicElement

java.lang.Object
  extended by net.wotonomy.web.WOElement
      extended by net.wotonomy.web.WODynamicElement
All Implemented Interfaces:
java.io.Serializable, WOActionResults
Direct Known Subclasses:
WOActiveImage, WOComponentContent, WOConditional, WOForm, WOFrame, WOGenericElement, WOHyperlink, WOImage, WOInput, WORepetition, WOResourceURL, WOString, WOSwitchComponent

public abstract class WODynamicElement
extends WOElement

The base class for dynamic WOElements. Dynamic elements are expected to do something useful with user-entered data in the request and with any binding associations with the context's current WOComponent.

Version:
$Revision: 905 $
Author:
michael@mpowers.net, $Author: cgruber $
See Also:
Serialized Form

Field Summary
protected  net.wotonomy.foundation.NSDictionary associations
           
protected  java.lang.String name
           
protected  WOElement rootElement
           
 
Constructor Summary
protected WODynamicElement()
          The default constructor.
  WODynamicElement(java.lang.String aName, net.wotonomy.foundation.NSDictionary anAssociationMap, WOElement aRootElement)
          Required constructor specifying the class name of the component, a map of associations, and the root element of the tree that contains this element (which may be null).
 
Method Summary
 void appendToResponse(WOResponse aResponse, WOContext aContext)
          This method is called on all elements of the content tree to build a response to a user request.
 WOResponse generateResponse()
          Returns a response object as appropriate for the target.
 WOActionResults invokeAction(WORequest aRequest, WOContext aContext)
          This method is called on all objects and elements of the application until a non-null value is returned.
 void takeValuesFromRequest(WORequest aRequest, WOContext aContext)
          This method is called to retrieve user-entered data from the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

rootElement

protected WOElement rootElement

associations

protected net.wotonomy.foundation.NSDictionary associations
Constructor Detail

WODynamicElement

protected WODynamicElement()
The default constructor.


WODynamicElement

public WODynamicElement(java.lang.String aName,
                        net.wotonomy.foundation.NSDictionary anAssociationMap,
                        WOElement aRootElement)
Required constructor specifying the class name of the component, a map of associations, and the root element of the tree that contains this element (which may be null). The map keys correspond to properties of this element, and the values are associations to be applied to the context's current component.

Method Detail

takeValuesFromRequest

public void takeValuesFromRequest(WORequest aRequest,
                                  WOContext aContext)
This method is called to retrieve user-entered data from the request. WOElements should retrieve data from the request based on their elementID and set values in the context's current WOComponent, typically those values that are associated with the element in the binding. This implementation does nothing.

Overrides:
takeValuesFromRequest in class WOElement

invokeAction

public WOActionResults invokeAction(WORequest aRequest,
                                    WOContext aContext)
This method is called on all objects and elements of the application until a non-null value is returned. WOElements should first check to see if they are the target of an action by checking the WOContext's senderID to see if it matches this element's elementID. If this element is the target, it should perform an appropriate action on the context's current WOComponent, usually the action specified in the binding, and return the result of that action. This implementation returns null.

Overrides:
invokeAction in class WOElement

appendToResponse

public void appendToResponse(WOResponse aResponse,
                             WOContext aContext)
This method is called on all elements of the content tree to build a response to a user request. The message should be forwarded to any child elements so that the entire tree is traversed. This implementation does nothing.

Overrides:
appendToResponse in class WOElement

generateResponse

public WOResponse generateResponse()
Description copied from interface: WOActionResults
Returns a response object as appropriate for the target.



Copyright © 2006 null. All Rights Reserved.