Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在 GWT 中将 ui:msg 与 Dictionary 或自定义 HashMap 一起使用?如果有怎么办?
谢谢
不知道这是否可能,但你可以做的是使用 POJO。
喜欢:
<ui:with type="org.mypackage.MyMessages" field="messages" /> <g:Label text="{messages.hello}" />
其中 MyMessages 是一个包含方法 getHello() 的类,该方法返回一个字符串。所以你将把字典包装在 MyMessages 类中