Rendering Views
renderIt()
You can set your component's template by defining a renderIt()
method on your component.
variables.view
You can also set your component template using variables.view
as an alternative to renderIt().
Implicit Lookup
If you haven't set your component's view using renderIt()
or variables.view
, cbwire will look for a file that matches your component's file name.
For the Counter.cfc
example above, cbwire will attempt to render a view located under ./views/wires/counter.cfm
File names should be lowercase when using Implicit Lookups. This is to avoid issues on case-sensitive file systems.
View Example
Be sure that cbwire can bind onto your component's view by including an outer element such as<div>
. If an outer element is not detected, cbwire will throw an OuterElementNotFound
exception.
Last updated