本文档描述“Struts 嵌套标记”抽屉中可用的 HTML 元素。
嵌套标记和支持类继承各基本 Struts 标记以让它们在嵌套关系中彼此相关。除了所有对 bean 和 bean 属性的引用是在嵌套上下文中管理的之外,原始标记的基本逻辑并无更改。
当在 Page Designer 中编辑 Struts JSP 页时,可以打开选用板上的“Struts 嵌套标记”抽屉并将下表中列示的任何元素都添加至该页。缺省情况下,“嵌套标记”抽屉是隐藏起来的。要使其可视,右键单击选用板并定制它。
元素是按字母顺序列示的。某些元素可能隐藏于选用板上。要显示选用板中隐藏的元素,右键单击“Struts HTML 标记”抽屉并选择定制。对想要显示在选用板上的每个组件,除去隐藏旁边的框中的选中标记。
每个元素都有一定数目的属性,可使用元素的“属性”视图来设置这些属性。有关所有属性的按字母顺序的列表和描述,参阅 Struts bean 元素的属性。要查找您想要了解其更多详细信息的属性,请在使用组件的“属性”视图时使用“属性”列表。
表中的每个元素的标记都有一个 nested 前缀。例如,checkbox 即为 nested:checkbox。
元素 | 描述 |
---|---|
checkbox | 继承 html:checkbox 标记。 |
define | 继承 bean:define 标记。 |
empty | 继承 logic:empty 标记。 |
equal | 继承 logic:equal 标记。 |
errors | 继承 html:errors 标记。 |
file | 继承 html:file 标记。 |
form | 继承 html:form 标记。 |
greaterEqual | 继承 logic:greaterEqual 标记。 |
greaterThan | 继承 logic:greaterThan 标记。 |
hidden | 继承 html:hidden 标记。 |
image | 继承 html:image 标记。 |
img | 继承 html:img 标记。 |
iterate | 继承 logic:iterate 标记。 |
lessEqual | 继承 logic:lessEqual 标记。 |
lessThan | 继承 logic:lessThan 标记。 |
link | 继承 html:link 标记。 |
match | 继承 logic:match 标记。 |
message | 继承 bean:message 标记。 |
messages | 继承 html:messages 标记。 |
messagesNotPresent | 继承 logic:messagesNotPresent 标记。 |
messagesPresent | 继承 logic:messagesPresent 标记。 |
multibox | 继承 html:multibox 标记。 |
nest | 定义新的嵌套级别供子标记引用。 |
notEmpty | 继承 logic:notEmpty 标记。 |
notEqual | 继承 logic:notEqual 标记。 |
notMatch | 继承 logic:notMatch 标记。 |
notPresent | 继承 logic:notPresent 标记。 |
options | 继承 html:options 标记。 |
optionsCollection | 继承 html:optionsCollection 标记。 |
password | 继承 html:password 标记。 |
present | 继承 logic:present 标记。 |
radio | 继承 html:radio 标记。 |
root | 启动嵌套层次结构而不需要表单。 |
select | 继承 html:select 标记。 |
size | 继承 bean:size 标记。 |
submit | 继承 html:submit 标记。 |
text | 继承 html:text 标记。 |
textarea | 继承 html:textarea 标记。 |
write | 继承 bean:write 标记。 |
writeNesting | 编写或建立当前嵌套级别的脚本变量。 |