Last modified by Pascal Robert on 2012/07/19 21:09

From version 19.1
edited by Pascal Robert
on 2012/07/19 21:09
Change comment: There is no comment for this version
To version 18.1
edited by Pascal Robert
on 2012/02/11 08:39
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -34,7 +34,7 @@
34 34  * invokeAction
35 35  * appendToResponse
36 36  
37 -For more information on the execution order of these methods at runtime, read the [[Request-Response Loop>>WO:Programming__WebObjects-Web Applications-Development-Request-Response Loop]] section.
37 +For more information on the execution order of these methods at runtime, read the [[Request-Response Loop>>Programming__WebObjects-Web Applications-Development-Request-Response Loop]] section.
38 38  
39 39  To receive values from the request (for instance, form data), implement the takeValuesFromRequest method. If your WODynamicElement responds to user actions, you must implement the invokeAction method. And if your WODynamicElement generates output, you must implement the appendToResponse method. At runtime, your WODynamicElement will be wired up to a WOComponent that you can access via the WOContext that is passed into each of the three methods above, which can be used to resolve bindings in a particular appearance on a page. For example, to retrieve the value of a binding, it might look like:
40 40  
... ... @@ -118,7 +118,7 @@
118 118  
119 119  {{/code}}
120 120  
121 -which would bind the zipcode of the address of the person in your sesson to value. Even more interesting are the NSArray operations that Foundation provides. For instance, if your session had a ##public NSArray purchaseAmounts()## that returned an array of ##BigDecimal##s, you could refer to the binding ##value = session.purchaseAmounts.@sum##, which would return the sum of the values of the array. There are several other Array operations available in the Foundation classes, and Project Wonder provides even more in its [[ERXArrayUtilities>>WOnder-ERXArrayUtilities]] class. For even more advanced KVC capabilities, read the [[WOOgnl>>WOOgnl Framework]] section of Project Wonder.
121 +which would bind the zipcode of the address of the person in your sesson to value. Even more interesting are the NSArray operations that Foundation provides. For instance, if your session had a ##public NSArray purchaseAmounts()## that returned an array of ##BigDecimal##s, you could refer to the binding ##value = session.purchaseAmounts.@sum##, which would return the sum of the values of the array. There are several other Array operations available in the Foundation classes, and Project Wonder provides even more in its [[ERXArrayUtilities>>WOnder-ERXArrayUtilities]] class. For even more advanced KVC capabilities, read the [[WOOgnl>>documentation:Project WONDER-Frameworks-WOOgnl]] section of Project Wonder.
122 122  
123 123  A single WOD entry can contain several binding declarations, and a WOD file can contain many entries. For example, here is an excerpt from a real WOD file:
124 124