Changes between Version 3 and Version 4 of ReferenceMaterials/EventApi
- Timestamp:
- 07/07/09 21:56:24 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ReferenceMaterials/EventApi
v3 v4 121 121 ==== Description: ==== 122 122 123 Returns a value from the viewstate, such as a form or url variable.123 Returns a value from the event context, such as a form or url variable. 124 124 125 125 ==== Returns: ==== … … 131 131 Name (required) - The name of the value to retrieve 132 132 133 Default (optional) - If the value does not exist, a default value to set into the viewstateand then return133 Default (optional) - If the value does not exist, a default value to set into the event context and then return 134 134 135 135 == !GetView(name:string) == … … 147 147 Name (required) - The name of the view to retrieve 148 148 149 == !LinkTo(eventName:string, [append:list], [anchor:string]) == 150 151 ==== Description: ==== 152 153 Creates 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 157 A 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 165 EventName (Required) - Name of the event to forward to. 166 167 Append (Optional) A list of values to append to the link. 168 169 Anchor (Optional) Any anchor text for the link. 170 171 ==== Example: ==== 172 173 For a given URL: 174 {{{ 175 model-glue.com?event=EntryDisplay&entryID=75 176 }}} 177 and a given linking statement: 178 {{{ 179 <cfset handleEntryClicked = event.linkTo( "Entry.Form", "entryID" )/> 180 }}} 181 182 The value of handleEntryClicked after processing will be: 183 184 http://model-glue.com/index.cfm?event=Entry.Form&EntryID=75 185 149 186 == !MakeEventBean(type:any, [fields:list]) == 150 187 151 188 ==== Description: ==== 152 189 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.190 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. 154 191 155 192 ==== Returns: ==== … … 159 196 ==== Arguments: ==== 160 197 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.198 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. 162 199 163 200 Fields (Optional) - If a list of fields is passed, it will only attempt to set the properties listed.
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)