Spring Roo 1.1.0.M1 .jspx 重写
我正在尝试在 Roo 1.1.0.M1 中自定义 create.jspx。我正在从 UI 中删除一些我想在控制器中自动设置的字段(例如 dateCreated、createdBy)。
这工作正常,直到我以任何方式编辑实体 java 文件。然后,Roo 继续将我的 create.jspx 重写回原来的方式
。1.1.0.M1 中没有automaticMaintainView=false 选项,所以我的问题是:如何让 Roo 留下我的 .jspxs?我正处于想要完全控制的阶段,并且不想让 Roo 再次改变它们。
I am attempting to customize a create.jspx in Roo 1.1.0.M1. I am removing some fields from the UI that I want to automatically set in the controller (eg. dateCreated, createdBy).
This works ok, UNTIL I edit the entity java file in any way. Roo then proceeds to rewrite my create.jspx back to the way it used to be
There is no automaticallyMaintainView=false option in 1.1.0.M1, so my question is: How do I get Roo to leave my .jspxs alone? I am at the stage where I want full control and don't want Roo changing them any more.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将“z”属性设置为“用户管理”并将“render”属性设置为“false”,这样 Spring Roo 就不管它了。
http://static.springsource.org/spring- roo/reference/html-single/index.html#d4e1544
或在控制器更改
RooWebScaffold(automaticallyMaintainView=false)
Set "z" attribute to "user-managed" and "render" attribute to "false" so Spring Roo leaves it alone.
http://static.springsource.org/spring-roo/reference/html-single/index.html#d4e1544
or in controller change
RooWebScaffold(automaticallyMaintainView=false)
自 Roo 1.1.0.x 起,Roo 提供了 jspx 视图资源的完整往返,这使得automaticMaintainView 标志的需要变得过时。 Roo 不会删除您添加到 jspx 文件中的任何更改。
http://forum.springsource.org/showthread.php?91086-1-1-0-M1-problem-with- generated-controller-automaticallyMaintainView-true&p=310804#post310804
Since Roo 1.1.0.x Roo offers complete round tripping of your jspx view resources which makes the need for automaticallyMaintainView flag obsolete. Roo will not delete any changes you add to your jspx file.
http://forum.springsource.org/showthread.php?91086-1-1-0-M1-problem-with-generated-controller-automaticallyMaintainView-true&p=310804#post310804