GWT CellTable 和编辑器框架
为了不重复代码,我不久前决定重构我对编辑器框架使用的看法。目前,每个视图都是编辑器,其中包含一组其他编辑器。例如“人物详细信息”视图包含“人物地址”、“人物图像”、“人物描述”等编辑器。每个编辑器都包含一组标准 GWT 小部件以及实例化和显示这些小部件所需的逻辑。
现在,我想在“人员列表”视图中重用其中一些组件。所以,我想要一张表,其中的行代表人 - 一行 - 一个人。每行应包含例如:人名、姓氏、图像(编辑者)、简短描述(编辑者)。
是否可以使用 GWT CellTable 来做到这一点?当我浏览官方和非官方文档时,很容易注意到它主要设计用于使用 HTML 代码,而不是小部件。
提前致谢
In order to do not duplicate code, I've decided some time ago, to refactor my views towards usage of editors framework. Currently, each view is editor which contains set of other editors. For example "Person details" view contains editors such as "person address", "person image", "person description" and so on. Each of these editors contains some set of standard GWT widgets along with logic required to instantiate and display these widgets.
Now, I'd like to reuse some of these components in "persons list" view. So, I'd like to have a table with rows representing persons - one row - one person. Each row should contain for example: person name, surname, image (editor), short description (editor).
Is it possible to do so using GWT CellTable? As I browsed official and non-official documentation, it is easy to notice that it is mainly designed to work with HTML code, rather than widgets.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能在
CellTable
内使用Editor
(或任何小部件)。使用
CellTable
时重用视图的一些选项是:SafeHtmlTemplates
SafeHtmlTemplates Java 文档
You can not use an
Editor
(or any widget) inside aCellTable
.Some options for reusing views when using
CellTable
are to:SafeHtmlTemplates
SafeHtmlTemplates Java Doc