Ticket #401 (new enhancement) — at Initial Version
Enhance event.linkTo() to use variables from another scope
| Reported by: | cfgrok | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 Maintenance Final |
| Version: | 3.1.261 | Severity: | normal |
| Keywords: | Cc: |
Description
Proposed Method Signature:
Event.linkTo( eventName:String, listOfKeysToAppend:string [, anchor:string] [, preferredContext:struct] )
Proposed Argument Descriptions:
- eventName: The name of the Model Glue event to use, this will be the value of whatever is defined for EventValue in the modelglue.modelGlueConfiguration bean definition.
- listOfKeysToAppend: A comma delimited list of keys that will be used as ordered URL parameters
- anchor: An anchor to append to the URL string
- preferredContext: a struct or something with public properties to use as a context for the items in listOfKeysToAppend. If a list item is not defined in preferredContext, or if preferredContext is not passed as an argument, the EventContext ( event.getValue() ) will be used to find the value. Note: Usage of the preferredContext argument will ensure not to alter the state of EventContext.
Proposed Usage:
event.setValue("WhiskeyPreference", 1)
event.setValue("CigarPreference", 1)
Event.linkTo("CashMoney", "AccountNumber,WhiskeyPreference,CigarPreference", "profilePic", { AccountNumber=123456789, CigarPreference=0 } )
The resulting link would be:
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)