const mixinafEfanXtra::EfanComponent
afEfanXtra::EfanComponent
Extend to define an efanXtra
component.
Whereas efan
has EfanRenderer
instances, efanXtra
has EfanComponent
instances.
- render
Str render(Obj?[]? initArgs := null, |->Void? bodyFunc := null)
The main render method.
initArgs
are passed to the@InitRender
lifecycle method.In normal use,
bodyFunc
is only passed from within a template. It is executed whenrenderBody()
is called. Use it for enclosing content in Layout templates. Example:... <%= app.rednerLayout() { %> ... my body content ... <% } %> ...
- renderBody
Str renderBody()
Call from within your template to render the body of the enclosing efan template. Example, a simple
layout
efan template may look like:<html> <body> <%= renderBody() %> </body> </html>
- renderTemplate
virtual Str renderTemplate()
Renders the efan template. Not meant to be invoked by you, the user!
Override to bypass template rendering and return your own generated content. Useful for simple components.
- templateMeta
abstract EfanTemplateMeta templateMeta
Meta data about the compiled efan templates