类 RenderingContext
java.lang.Object
cn.taketoday.web.view.script.RenderingContext
Context passed to
ScriptTemplateView render function in order to make
the application context, the locale, the template loader and the url available on
scripting side.- 从以下版本开始:
- 4.0
- 作者:
- Sebastien Deleuze
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明cn.taketoday.context.ApplicationContextReturn the application context.Return the locale of the rendered template.Return a function that takes a template path as input and returns the template content as a String.getUrl()Return the URL of the rendered template.
-
字段详细资料
-
applicationContext
private final cn.taketoday.context.ApplicationContext applicationContext -
locale
-
templateLoader
-
url
-
-
构造器详细资料
-
RenderingContext
public RenderingContext(cn.taketoday.context.ApplicationContext applicationContext, Locale locale, Function<String, String> templateLoader, String url) Create a newRenderingContext.- 参数:
applicationContext- the application contextlocale- the locale of the rendered templatetemplateLoader- a function that takes a template path as input and returns the template content as a Stringurl- the URL of the rendered template
-
-
方法详细资料
-
getApplicationContext
public cn.taketoday.context.ApplicationContext getApplicationContext()Return the application context. -
getLocale
Return the locale of the rendered template. -
getTemplateLoader
Return a function that takes a template path as input and returns the template content as a String. -
getUrl
Return the URL of the rendered template.
-