Changes between Version 3 and Version 4 of ReferenceMaterials/EventApi

Show
Ignore:
Timestamp:
07/07/09 21:56:24 (17 years ago)
Author:
DanWilson (IP: 76.182.36.62)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ReferenceMaterials/EventApi

    v3 v4  
    121121==== Description: ==== 
    122122 
    123 Returns a value from the viewstate, such as a form or url variable. 
     123Returns a value from the event context, such as a form or url variable. 
    124124 
    125125==== Returns: ==== 
     
    131131Name (required) - The name of the value to retrieve 
    132132 
    133 Default (optional) - If the value does not exist, a default value to set into the viewstate and then return 
     133Default (optional) - If the value does not exist, a default value to set into the event context and then return 
    134134 
    135135== !GetView(name:string) == 
     
    147147Name (required) - The name of the view to retrieve 
    148148 
     149== !LinkTo(eventName:string, [append:list], [anchor:string]) == 
     150 
     151==== Description: ==== 
     152 
     153Creates a link with information from Model-Glue such as the event name, any desired parameters along with respective values. The Link Manager is designed to abstract URL formatting so that SES URLS and other custom linking strategies can be handled by ModelGlue. You can define your own LinkManager by providing a component definition in your application specific ColdSpring.xml confguration by using the Bean ID: 'modelglue.urlManager'. At a minimum, your component must meet the method definitions of /ModelGlue/gesture/eventrequest/url/UrlManager.cfc. 
     154 
     155==== Returns: ==== 
     156 
     157A link. This replaces the following construct from the Pre-MG:3 application architecture. 
     158{{{ 
     159<cfset someLink = myself & "SomeEvent" />  
     160}}} 
     161 
     162 
     163==== Arguments: ==== 
     164 
     165EventName (Required) - Name of the event to forward to. 
     166 
     167Append (Optional) A list of values to append to the link. 
     168 
     169Anchor (Optional) Any anchor text for the link. 
     170 
     171==== Example: ==== 
     172 
     173For a given URL:  
     174{{{ 
     175model-glue.com?event=EntryDisplay&entryID=75 
     176}}} 
     177and a given linking statement:  
     178{{{ 
     179<cfset handleEntryClicked = event.linkTo( "Entry.Form", "entryID" )/> 
     180}}} 
     181 
     182The value of handleEntryClicked after processing will be: 
     183 
     184http://model-glue.com/index.cfm?event=Entry.Form&EntryID=75 
     185 
    149186== !MakeEventBean(type:any, [fields:list]) == 
    150187 
    151188==== Description: ==== 
    152189 
    153 Loops over a CFC instance, looking for any methods whose names start with set.  For any setter methods where a like-named value exists in the viewstate, the setter will be called, passing this value. 
     190Loops over a CFC instance, looking for any methods whose names start with set.  For any setter methods where a like-named value exists in the viewstate, the setter will be called, passing this value. 
    154191 
    155192==== Returns: ==== 
     
    159196==== Arguments: ==== 
    160197 
    161 Type (Required) - If a string is passed, it will instantiate a CFC of the type passed and attempt to call a function named "init" if one exists.  If a CFC instance is passed, it will use the instance. 
     198Type (Required) - If a string is passed, it will instantiate a CFC of the type passed and attempt to call a function named "init" if one exists.  If a CFC instance is passed, it will use the instance. 
    162199 
    163200Fields (Optional) - If a list of fields is passed, it will only attempt to set the properties listed.