struggling to access coldmvc components

3 views
Skip to first unread message

Joe

unread,
Aug 2, 2010, 12:28:58 PM8/2/10
to ColdMVC
I have a requestStart event interception function and I am trying to
change the view by doing this:

$.event.view(path);

,but the view doesn't render.

So then I was thinking it's the lazyGenerate() on Renderer.cfc in
ColdMVC, so I decided to try call the function that renders the view
to make sure it's there by doing this:

_Renderer.renderView(path);


I think have to two issues here.

First I can't access a Renderer.cfc in ColdMVC in my controller by
doing this:

_Renderer

...here's what the top of my controller looks like.

/**
* @accessors true
* @extends coldmvc.Controller
* @controller cmsview
* @layout cms_public
*/
component {

property _CMSPage;
property _Renderer;

Second changing the event's view key "$.event.view(path)" doesn't
generate the template if it's not in the .generated folder.

My use case is for a cms app, i am checking to see the file exists in
the path provided or if it's in the db. If the file exists I want to
generate the view else I want to get the html from the db.

Any ideas?

Tony Nelson

unread,
Aug 2, 2010, 8:40:47 PM8/2/10
to col...@googlegroups.com
You shouldn't put an underscore in front of the renderer property. You only need to use underscores in front of your models. If you change your code to "property renderer;", I believe it should work.


-Tony
Reply all
Reply to author
Forward
0 new messages