Adam Ness said the following on 06/04/2009 05:44 PM:
> You could also write a custom ViewContext (which inherits the existing
> viewContext) and then use a plugin to assign that ViewContext to the
> event context. A little more complex, but could make your code
> cleaner looking.
I'd recommend *not* taking this approach as the ViewContext subsystem in
not officially designed to be extended and overridden in this manner.
If you do this, I am sure it will break your application in future
versions. The simplest method is to just write a property.cfc and do
this in your views:
#getProperty("formatter").addIcon("edit", otherAttributes, etc.)#
In the future (looking at this for 1.9), we're looking at allowing
programmatic ViewContext mixins so you could specify specific
property.cfc methods to mixin into your views without namespacing them
(or optionally namespacing them. For instance the new
HtmlHelperProperty's methods like addMeta() or addImage() could be mixed
in for you and accessed in your views like this:
addMeta("title", "Title of this Page")
There are some technical items that need to be worked out so this all
works out ok. For more information on this possible new enhancement
we're discussing for 1.9 can be found on this ticket:
https://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ticket/227
Best,
.Peter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to Mach-II for CFML list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets:
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
-~----------~----~----~----~------~----~------~--~---