const mixinafEfanXtra::EfanComponent

afEfanXtra::EfanComponent

Extend to define an efanXtra component.

Whereas efan has EfanRenderer instances, efanXtra has EfanComponent instances.

render

Source

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 when renderBody() is called. Use it for enclosing content in Layout templates. Example:

...
<%= app.rednerLayout() { %>
  ... my body content ...
<% } %>
...
renderBody

Source

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

Source

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

Source

abstract EfanTemplateMeta templateMeta

Meta data about the compiled efan templates