问一个涉及<html:select/> <html:options/><html:option/>的问题 <select>只用一个String类型的变量就可以了。String的值就是画面上被显示出来的值。<options>使用的是一个LabelValueBean的类组成的List。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html:select property="dept"> <logic:present name="deptList" scope="request"><html:options name="deptList" property="depts" labelName="deptList" labelProperty="depts"/> </logic:present></html:select>Action中传递一个Arraylist过来. request.setAttribute("deptList",xxxList); 写错了。传递一个bean过来。bean中要有这个数组depts的getter,setter方法。然后最上面的<html:select property="dept"> 是你在页面操作下拉框后,在下一个action中 xxform.getDept()得到你操作的那个数值 FrozenTree谢谢你的答复 不过你写得比较含糊 我还是不太懂。<html:select property="xxx"/>这里的property对应的是actionform里的属性吧。我已经实现了从数据库查出内容放到select里显示,现在我想实现的是用select的onMouseDown这个参数调用方法实现点击相应内容实现查询,查出的内容中又包含用select来显示的内容,并且我希望实现这个所查出的用select来显示的内容能够对应刚才作为查询条件的select内容.也就是说在页面显示上:第一个select是查询条件,第二个select包含所有内容但显示在第一条的是根据第一个select查出的结果 谢谢 能告诉我吗? 可以用logic:iterate来循环插入option,也可以用html:optionCollections标签,这个在struts1.1里面是有的,不过好像要用LabelValueBean才可以 java IE中session丢失问题 高分求教——外企java 笔试答案 (高分悬赏)hibernate连接数据库报错 一个关于弹出新页面的问题 页面加快多表显示速度问题 ejb郁闷了很久的问题 ejb3中:无状态会话bean如何接收自定义javabean和返回自定义javabean 客户端如何一直连接socket? 请教各位高手,一个很简单关于容器的问题, 高分求救!resultset statement的问题。 checkstyle检测代码规范中java.header 问题?
<logic:present name="deptList" scope="request">
<html:options name="deptList" property="depts" labelName="deptList"
labelProperty="depts"/>
</logic:present>
</html:select>
Action中传递一个Arraylist过来. request.setAttribute("deptList",xxxList);
然后最上面的<html:select property="dept"> 是你在页面操作下拉框后,在下一个action中 xxform.getDept()得到你操作的那个数值