Play framework 可用的隐试对像

xiaoxiao2021-02-28  139

所有添加到renderArgs中的对象会直接映射为模板对象;

例如:从一个控制器中映射一个user bean对象到模板中;

renderArgs.put("user", user );

当你渲染一个模板的时候框架也会添加内置的对象到模板中;

VariableDescriptionAPI documentationSee alsoerrorsValidation errorsplay.data.validation.Validation.errors()Validating HTTP dataflashFlash scopeplay.mvc.Scope.FlashControllers - Session & Flash ScopelangThe current languageplay.i18n.LangSetting up I18N - Define languagesmessagesThe messages mapplay.i18n.MessagesSetting up I18N - Externalize messagesoutThe output stream writerjava.io.PrintWriter paramsCurrent parametersplay.mvc.Scope.ParamsControllers - HTTP parametersplayMain framework classplay.Play requestThe current HTTP requestplay.mvc.Http.Request sessionSession scopeplay.mvc.Scope.SessionControllers - Session & Flash Scope

转载请注明原文地址: https://www.6miu.com/read-22051.html

最新回复(0)