描述
本标签绘制HTML文件中的HEAD部分内容. 因为有些主题需要包含特定的CSS和JavaScript, 因此使用head标签很有用(由于WebWork的标签支持模版, 因此, 不同的主题可以通过修改模版可以很容易的进行调整, 译注).
例如: 如果页面中集成了ajax组件, 那么不需要将缺省主题设置为ajax, 使用一个theme="ajax"的head标签就可以将标准ajax头信息包含在页面中.
本标签也包含用于设置定制的日期选取器主题的选项. 详细描述参见参数calendarcss.
使用ajax主题时可以将debug参数设置为true来打开调试标志.
(摘自snippet:id=javadoc|javadoc=true|url=com.opensymphony.webwork.components.Head)
属性
| 名称 |
必填 |
缺省值 |
类型 |
描述 |
| calendarcss |
false |
Object/String |
jscalendar使用的css主题, 缺省为"calendar-blue.css" |
| debug |
false |
Object/String |
设置为true将开启AJAX主题的调试模式 |
| maxlength |
false |
|
Integer |
HTML maxlength属性 |
| maxLength |
false |
|
Object/String |
不建议使用. 建议使用maxlength属性替代. |
| readonly |
false |
false |
Boolean |
设置为只读,不允许输入 |
| size |
false |
|
Integer |
HTML size 属性 |
| theme |
false |
|
Object/String |
输出元素时使用的主题(theme)(不使用缺省的) |
| template |
false |
|
Object/String |
输出元素时使用的模板(template)(不使用缺省的) |
| cssClass |
false |
|
Object/String |
输出元素时的class属性 |
| cssStyle |
false |
|
Object/String |
输出元素时的css样式定义(译者注:就是html元素的style属性) |
| title |
false |
|
Object/String |
在输出元素时设置html属性title |
| disabled |
false |
|
Object/String |
在输出元素时设置html属性disabled |
| label |
false |
|
Object/String |
用于输出一个元素对应的label的表达式 |
| labelPosition |
false |
left |
Object/String |
不赞成使用. |
| labelposition |
false |
|
Object/String |
定义元素标签的位置(top/left) |
| requiredposition |
false |
|
Object/String |
定义required属性输出的位置(left|right) |
| name |
false |
|
Object/String |
元素的名字 |
| required |
false |
false |
Boolean |
如果设置为true, 在输出标签时将显示出此字段是必须输入的(译者注:如果使用默认模板,将会标示为"*") |
| tabindex |
false |
|
Object/String |
在输出元素时设置html属性tabindex |
| value |
false |
|
Object/String |
预设input元素的value属性. |
| onclick |
false |
|
Object/String |
在输出元素时设置html属性onclick |
| ondblclick |
false |
|
Object/String |
在输出元素时设置html属性ondblclick |
| onmousedown |
false |
|
Object/String |
在输出元素时设置html属性onmousedown |
| onmouseup |
false |
|
Object/String |
在输出元素时设置html属性onmouseup |
| onmouseover |
false |
|
Object/String |
在输出元素时设置html属性onmouseover |
| onmousemove |
false |
|
Object/String |
在输出元素时设置html属性onmousemove |
| onmouseout |
false |
|
Object/String |
在输出元素时设置html属性onmouseout |
| onfocus |
false |
|
Object/String |
在输出元素时设置html属性onfocus |
| onblur |
false |
|
Object/String |
在输出元素时设置html属性onblur |
| onkeypress |
false |
|
Object/String |
在输出元素时设置html属性onkeypress |
| onkeydown |
false |
|
Object/String |
在输出元素时设置html属性onkeydown |
| onkeyup |
false |
|
Object/String |
在输出元素时设置html属性onkeyup |
| onselect |
false |
|
Object/String |
在输出元素时设置html属性onselect |
| onchange |
false |
|
Object/String |
在输出元素时设置html属性onchange |
| tooltip |
false |
|
String |
设置元素的tooltip属性(译者注:tooltip为工具栏提示) |
| tooltipConfig |
false |
|
String |
设置tooltip属性的配置 |
| id |
false |
|
Object/String |
id是定位元素时使用的. 对于UI和表单标签它会被用作HTML的id属性 |
例子
Content pulled from external source. Click here to refresh. |
<head>
<title>My page</title>
<ww:head/>
</head>
|
Content pulled from external source. Click here to refresh. |
<head>
<title>My page</title>
<ww:head theme="ajax" calendarcss="calendar-green"/>
</head>
|