【问题标题】:equivalant <html:messages> in thymeleaf for displaying messagesthymeleaf 中的等效 <html:messages> 用于显示消息
【发布时间】:2013-12-20 07:17:26
【问题描述】:

我是 thymeleaf 的新手,将一些用 JSP+struts 编写的 ma 代码转换为 Spring3 + thymeleaf。我有这个标签

<html:messages id="mymessage" property="mymessage" message="true" >
  //Some message here
</html:messages>

谁能告诉我在 thymeleaf 中转换此代码的等效标记或方法??

【问题讨论】:

  • html是什么命名空间?

标签: java html spring jakarta-ee thymeleaf


【解决方案1】:

Thymeleaf 指南covers messages in section 4。使用 #{message.key} 作为任何 Thymeleaf HTML 属性的值,使用 #{message.key(param1, param2)} 作为参数化消息。

【讨论】:

    猜你喜欢
    • 2021-06-03
    • 2018-05-13
    • 2015-06-14
    • 1970-01-01
    • 1970-01-01
    • 2016-08-13
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多