For example, suppose you have to render a dynamic form and hide input fields based on user permissions.
例如,假设您不得不呈现一个动态表单,并隐藏基于用户权限的输入字段。
If so, you use Groovy scripting to generate a structure with the required Atom fields and render it.
如果是,您可以使用groovy脚本生成具有Atom字段的结构,并呈现这个结构。
Both the Struts version and the Rails version handle a validation error in the same way: Render the page again, with error messages marking the form fields that need to be corrected.
Struts和Rails采用了同样的方式来处理验证错误:重新渲染相应的页面,并将需要改正的表单输入域用错误信息标识出来。
应用推荐