类 GroovyMarkupView

java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
所有已实现的接口:
cn.taketoday.beans.factory.Aware, cn.taketoday.beans.factory.BeanNameAware, cn.taketoday.beans.factory.InitializingBean, cn.taketoday.context.ApplicationContextAware, View

public class GroovyMarkupView extends AbstractTemplateView
An AbstractTemplateView subclass based on Groovy XML/XHTML markup templates.

Framework's Groovy Markup Template support requires Groovy 2.3.1 and higher.

作者:
Brian Clozel, Rossen Stoyanchev
另请参阅:
  • 字段详细资料

    • engine

      @Nullable private groovy.text.markup.MarkupTemplateEngine engine
  • 构造器详细资料

    • GroovyMarkupView

      public GroovyMarkupView()
  • 方法详细资料

    • setTemplateEngine

      public void setTemplateEngine(groovy.text.markup.MarkupTemplateEngine engine)
      Set the MarkupTemplateEngine to use in this view.

      If not set, the engine is auto-detected by looking up a single GroovyMarkupConfig bean in the web application context and using it to obtain the configured MarkupTemplateEngine instance.

      另请参阅:
    • initApplicationContext

      protected void initApplicationContext(cn.taketoday.context.ApplicationContext context)
      Invoked at startup. If no templateEngine has been manually set, this method looks up a GroovyMarkupConfig bean by type and uses it to obtain the Groovy Markup template engine.
      覆盖:
      initApplicationContext 在类中 cn.taketoday.context.support.ApplicationObjectSupport
      另请参阅:
    • autodetectMarkupTemplateEngine

      protected groovy.text.markup.MarkupTemplateEngine autodetectMarkupTemplateEngine() throws cn.taketoday.beans.BeansException
      Autodetect a MarkupTemplateEngine via the ApplicationContext. Called if a MarkupTemplateEngine has not been manually configured.
      抛出:
      cn.taketoday.beans.BeansException
    • checkResource

      public boolean checkResource(Locale locale) throws Exception
      从类复制的说明: AbstractUrlBasedView
      Check whether the underlying resource that the configured URL points to actually exists.
      覆盖:
      checkResource 在类中 AbstractUrlBasedView
      参数:
      locale - the desired Locale that we're looking for
      返回:
      true if the resource exists (or is assumed to exist); false if we know that it does not exist
      抛出:
      Exception - if the resource exists but is invalid (e.g. could not be parsed)
    • renderMergedTemplateModel

      protected void renderMergedTemplateModel(Map<String,Object> model, RequestContext context) throws Exception
      从类复制的说明: AbstractTemplateView
      Subclasses must implement this method to actually render the view.
      指定者:
      renderMergedTemplateModel 在类中 AbstractTemplateView
      参数:
      model - combined output Map, with request attributes and session attributes merged into it if required
      context - current HTTP request
      抛出:
      Exception - if rendering failed
    • getTemplate

      protected groovy.text.Template getTemplate(String viewUrl) throws Exception
      Return a template compiled by the configured Groovy Markup template engine for the given view URL.
      抛出:
      Exception