-
-
Save stevewithington/6469763 to your computer and use it in GitHub Desktop.
<cfscript> | |
// drop this in your eventHandler.cfc | |
public any function yourMethod() { | |
// you do something here | |
} | |
public any function onApplicationLoad($) { | |
arguments.$.getBean('someBean').injectMethod('someMethod', yourMethod); | |
} | |
</cfscript> |
Hi Steve,
I have followed the example above. Using method injection, I am able to successfully inject my custom function into 'getImageUrl()' in ContentManager:
$.getBean('contentManager').inject('getImageURL', customGetImageUrl);
Now I have been trying to override 'hasImage()' in ContentNavBean similar to above but seems like my changes are not getting recognized at all for this particular method.
$.getBean('contentNavBean').inject('hasImage', customHasImage);
I am not sure why is it that I am able to inject my custom function into contentManager but not into contentNavBean.
Has contentNavBean been exempted from method injection?
Please find the link below to Mura Google Groups for more information:
associated image for content type "File"
Thanks in advance,
Rasleen
How would one use this with the userBean? I'm trying to have transparent encryption/decryption of the user data.