我正在使用SpringRoo构建一个应用程序,我已经生成了存储库、服务以及模型类的脚手架。
现在我想定制我的用户界面(例如create.jspx表单),我无法理解这部分中的一些行为:
<field:textarea field="cocFile" id="c_com_project_name_domain_ObjectModel_file" z="Wo9RZ7vKscJS74aMwIMY1mqfCsU="/>
我看不到z
属性的用途,也无法在生成的vues中集成自己的html模板。因此,在本例中,z
代表什么,是否可以使用自定义jsp视图覆盖springRoo生成的所有视图。
发布于 2014-08-28 02:35:48
正如Anton响应的那样,z属性指示该项目是否已被用户修改。若要指示项目已经个性化,则必须通过“用户管理”更改属性z的值,而Roo则检测用户所做的更改。
您有三个选项可以自定义视图jspx:
1-定制"textarea.tagx“。
2-创建新的tagx:
<field:textarea2 field = "cocFile" id = "c_com_project_name_domain_ObjectModel_file" z = "user-managed" />
3-修改“呈现”和"z“属性:
<field:textarea field="cocFile" id="c_com_project_name_domain_ObjectModel_file" render="false" z="user-managed"/>
此项目不再显示在页面上,Roo将不会生成。现在,您可以在jspx页面中生成自定义代码。
发布于 2014-08-15 06:32:32
春季文档中的描述是-
The z attribute represents a hash key for a given element.
The hash key attribute is important for Roo because it helps determining if a user has altered a Roo managed element.
This is the secret to round-trip support for JSPX files, as you can edit anything at any time yet Roo will be able to merge in changes to the JSPX successfully.
The hash key shown in the "z" attribute is calculated
读spring文档。
https://stackoverflow.com/questions/25328009
复制