如何使用Seam-Gen控制包结构
我一直在通过使用 seam-gen 生成并从那里进行调整来添加到现有的应用程序。我一直遇到的一个问题是我必须花费大量时间编辑 xhtml 文件以反映包结构。
例如,seam-gen 认为这会起作用
<s:decorate id="simplePidField" template="layout/edit.xhtml">
,因此在每个 .xhtml 中,我们必须将其更改为
<s:decorate id="simplePidField" template="/layout/edit.xhtml">
This 和其他不一致的情况出现,因为 seam-gen 构建了一个平面目录,其中所有 xhtml 文件都放在一个位置,而我们的应用程序有这些分为并细分为几个目录。
有没有办法在 reveng.xml 文件中定义包结构?
谢谢。
I've been adding to an existing application by generating with seam-gen and adjusting from there. One problem I keep having is that I have to spend a great deal of time editing the xhtml files to reflect package structure.
for example, seam-gen thinks this will work
<s:decorate id="simplePidField" template="layout/edit.xhtml">
and so in every .xhtml, we have to change that to
<s:decorate id="simplePidField" template="/layout/edit.xhtml">
This and other inconsistencies arise because seam-gen builds a flat directory with ALL of the xhtml files in one place, while our app has these divided and sub-divided into several directories.
Is there a way, in the reveng.xml file to define a package structure?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
否,不在 reveng.xml 文件中。您必须查看seam-gen 源代码中的freemarker 代码并在那里进行调整。
查看该
文件并找到
'和
'并分别更改它们。
否则,您只需在视图文件夹中使用搜索/替换功能。这可能更容易
No not in the reveng.xml file. You have to look at the freemarker code in seam-gen source and adjust it there.
Look at the
file and locate
<s:decorate id="${componentProperty.name}Field" template="layout/edit.xhtml">
'and
<s:decorate id="${property.name}Field" template="layout/edit.xhtml">
'and change those respectively.
Otherwise you just have to use search / replace functionality inside your view folder. This is probably just easier