Ticket #227 (new enhancement)
Provide mixins for views
| Reported by: | peterfarrell | Owned by: | peterfarrell |
|---|---|---|---|
| Priority: | minor | Milestone: | Uncategorized |
| Component: | framework - core | Version: | Uncategorized - Framework |
| Keywords: | mixin mixins view views ViewManager ViewContext | Cc: | kurtwiersma, mattwoodward, brianfitzgerald, adrianscott, mikerogers |
| Blocking: | Blocked By: |
Description
Provide a way to mixin for views in helper style CFCs into the view context. These helpers might be the HtmlHelperProperty, UdfHelperProperty or other CFC defined by a developer. We'll also need a mixin helper cfc that can pull into the request functions from a target CFC by explicit list or by reading CFC metadata.
Mixins shouldn't be mixed into the ViewContext as the mixins need to be hierarchical in nature (meaning parent modules are loaded first with mixins from the module second) and if we mix them into the ViewContext it will pollute the other methods in the context. We should use a ViewRender.cfm in which we can pass the mixin structure in by calling the ViewRender.cfm using cfmodule. The ViewRender.cfm is the file that actually uses cfinclude to execute the request view .cfm file.
Mixins should be a last one loaded wins when a namespace conflict occurs.
