Class RockerViewsRenderer<T,R>

java.lang.Object
io.micronaut.views.rocker.RockerViewsRenderer<T,R>
Type Parameters:
T - The model type
R - The request type
All Implemented Interfaces:
io.micronaut.core.order.Ordered, ViewsRenderer<T,R>

@Singleton public class RockerViewsRenderer<T,R> extends Object implements ViewsRenderer<T,R>
Renders templates with Rocker.
Since:
1.3.2
Author:
Sam Adams
  • Field Details

  • Constructor Details

  • Method Details

    • render

      @NonNull public @NonNull io.micronaut.core.io.Writable render(@NonNull @NonNull String view, @Nullable T data, @Nullable R request)
      Specified by:
      render in interface ViewsRenderer<T,R>
      Parameters:
      view - view name to be rendered
      data - response body to render it with a view
      request - HTTP request
      Returns:
      A writable where the view will be written to.
    • exists

      public boolean exists(@NonNull @NonNull String viewName)
      Specified by:
      exists in interface ViewsRenderer<T,R>
      Parameters:
      viewName - view name to be rendered
      Returns:
      true if a template can be found for the supplied view name.