Interface MarkupScope

All Known Implementing Classes:
MarkupTemplateContext

public interface MarkupScope
Current-eval scope accessor injected onto a MarkupContext by MarkupTemplateContext at engine-bind time. Backs the context.get(name, default?) accessor that fragments use to read optional names without triggering the strict-ReferenceError path.
  • Method Summary

    Modifier and Type
    Method
    Description
    lookup(String name)
    Look up name in the current eval scope.
    default void
    set(String name, Object value)
    Write-side companion to lookup(String).
  • Method Details

    • lookup

      Object lookup(String name)
      Look up name in the current eval scope. Checks the _ underscore namespace first, then the wrapped Thymeleaf scope (which carries every th:with-bound name, every global, and every level-flushed entry). Returns the bound non-null value, or null when the name is unset or explicitly null.
    • set

      default void set(String name, Object value)
      Write-side companion to lookup(String). Stores value under name in the _ underscore namespace of the current render. Backs context.set(name, value); equivalent to writing _.<name> = value from JS. Default no-op for implementations that don't carry per-render write state.