Class TemplateComponent

java.lang.Object
io.mindspice.simplypages.core.TemplateComponent
All Implemented Interfaces:
Component

public class TemplateComponent extends Object implements Component
Component adapter that binds a compiled Template to a fixed RenderContext.

Context contract: render(RenderContext) ignores the parent context and always renders with the bound context.

Mutability/thread-safety: immutable wrapper. Effective thread-safety depends on whether the bound context is mutated concurrently.

  • Constructor Details

    • TemplateComponent

      public TemplateComponent(Template template, RenderContext context)
      Creates a template-backed component with a fixed render context.
      Parameters:
      template - compiled template to render
      context - context used for all renders
  • Method Details