WebObjects 5.2.3

com.webobjects.woextensions
Class WOMethodInvocation

java.lang.Object
  extended bycom.webobjects.appserver.WOElement
      extended bycom.webobjects.appserver.WODynamicElement
          extended bycom.webobjects.woextensions.WOMethodInvocation

public class WOMethodInvocation
extends WODynamicElement


Constructor Summary
WOMethodInvocation(String aName, NSDictionary associations, WOElement template)
           
 
Method Summary
 void appendToResponse(WOResponse aResponse, WOContext aContext)
          This method is invoked in WOElement objects in the request-handling phase when objects involved in the current transaction append their HTML content to the transaction's WOResponse object.
 WOActionResults invokeAction(WORequest aRequest, WOContext aContext)
          This method is invoked in WOElements in the phase of request handling that results in the triggering of an action method and the return of a response WOComponent.
 void takeValuesFromRequest(WORequest aRequest, WOContext aContext)
          This method is invoked on WOElement objects during the phase of request handling that extracts user-entered data.
 
Methods inherited from class com.webobjects.appserver.WODynamicElement
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WOMethodInvocation

public WOMethodInvocation(String aName,
                          NSDictionary associations,
                          WOElement template)
Method Detail

appendToResponse

public void appendToResponse(WOResponse aResponse,
                             WOContext aContext)
Description copied from class: WOElement
This method is invoked in WOElement objects in the request-handling phase when objects involved in the current transaction append their HTML content to the transaction's WOResponse object. If the WOElement has children WOElements, it should invoke this method on them in turn. WOElement's default implementation of this method does nothing.

Overrides:
appendToResponse in class WOElement
Parameters:
aResponse - the input HTTP request to trigger the append action
aContext - the context of the transaction
See Also:
WOResponse

invokeAction

public WOActionResults invokeAction(WORequest aRequest,
                                    WOContext aContext)
Description copied from class: WOElement
This method is invoked in WOElements in the phase of request handling that results in the triggering of an action method and the return of a response WOComponent. In this phase, the method is propagated through the element objects of the template until the dynamic element for the activated HTML control (for instance, a custom button) responds to the method by invoking the method in the request component that is bound to the action.

To see if it has been activated, the dynamic element should check the current element ID (obtained from the WOContext) against the sender ID in the request. Because each of the three phases of the request-response loop is traversing the same graph of objects in the same maner, the WOContext-incremented element IDs are assured to always match between phases. Therefore a dynamic element's ID generated in appendToResponse will be reached again for the same dynamic element in the two other phases.

Note: invokeAction is the only phase where it is safe to bypass children or subsequent elements. It is not necessary to call super.invokeAction. after invoking the action, the dynamic element should just return the value of the action.

Overrides:
invokeAction in class WOElement
Parameters:
aRequest - the incoming HTTP request to trigger the action
aContext - the context of the transaction
Returns:
returns a response action object; the default implementation returns null. If the last element of the page returns null, WebObjects just redisplays the page.
See Also:
WOContext

takeValuesFromRequest

public void takeValuesFromRequest(WORequest aRequest,
                                  WOContext aContext)
Description copied from class: WOElement
This method is invoked on WOElement objects during the phase of request handling that extracts user-entered data. Non-WODynamicElement subclasses either do not implement this method, or forward it to their own subgraph of WOElement objects (WOComponents).

Any WODynamicElement implementing this method can acquire incoming data (such as HTML form data from the WORequest) or changed state (such as a check in a check box) associated with one of their attributes and assigns the value to the WOComponent variable bound to the attribute. The current WOComponent is always accessible through the passed WOContext. In this way, back-end business objects are updated. The default WOElement implementation of this method does nothing.

Overrides:
takeValuesFromRequest in class WOElement
Parameters:
aRequest - the HTTP request
aContext - a WOContext object that represents the context of the transaction
See Also:
WORequest

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.