您的位置:首页 > 其它

<s:select>和<s:doubleselect>的一般使用

2013-06-12 13:15 627 查看
<s:select id="sid" name="sid" listKey="sid" listValue="term" value="semester.sid"

list="semesterList" style="margin-left:35px;width:132px;"></s:select>

<s:doubleselect name="department" list="departmentList"

listKey="deptid" listValue="deptname" doubleName="teacherid" disabled="true"

doubleList="teachersMap.get(top.deptid)" doubleListKey="tid"

doubleListValue="tname" formName="updateTacForm"
doubleValue="teacher.tid" value="teacher.department.deptid"

doubleCssStyle="width:132px; margin-top:10px; margin-left:84px" doubleDisabled="true">

</s:doubleselect>

注意,select和doubleselect中的value值表示的是option的value值。之前弄了很久,本来是想显示的select标签为term的值,因为listKey,listValue已经建立了对应关系,sid对应term,所以,如果想要显示的值的话,value直接="semester.sid",自然就可以找到semester.term

doubleSelect也是同样的道理!doubleValue=“teacher.tid”,value="teacher.department.deptid",doubleselect中写了listkey,listValue,doubleListKey,doubleListValue的对应关系了,如果想要显示对象的deptname,当然写value="teacher.department.deptid"即可,想要标签的值显示对象的teacher.tname,当然,doubleValue=“teacher.tid”即可!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: