<html:form action="/department.do?method=addDep" method="post">
<html:select property="dep_id" >
<html:options collection="list" labelProperty="depName" property="dep_id" />
</html:select>
<input type="submit" value="submit">
</html:form>
public class DepartmentForm extends ActionForm {
private static final long serialVersionUID = -7999273122578907163L;
private Integer dep_id;
private String depName;
private Integer depState;
public Integer getDep_id() {
return dep_id;
}
public void setDep_id(Integer dep_id) {
this.dep_id = dep_id;
}
public String getDepName() {
return depName;
}
public void setDepName(String depName) {
this.depName = depName;
}
public Integer getDepState() {
return depState;
}
public void setDepState(Integer depState) {
this.depState = depState;
}
@Override
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
super.reset(mapping, request);
}
@Override
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
return super.validate(mapping, request);
}
}
分享到:
相关推荐
<html:select>: 选择默认值
html:select>标签的用法 <html:select property="theChoice"> <html:options collection="choiceLists" property="value" labelProperty="description" /> </html:select>
这是一个对struts一个标签(html:select)的操作,主要为了操作下拉列表控制的数据读取,适合于初学者。。
通过html元素层覆盖,实现一个可以输入,可以选择的一个select框,实际使用取值可以从text框中取值,如需从select框取值,请修改select的selectIndex以达到要求。
<html:select>生成HTML<select>元素 <html:option>:生成HTML<option>元素 <html:options>:生成一组HTML<options>元素 <html:optionsCollection>生成一组HTML<options>元素
select 元素 select 元素 select 元素 01 select 元素 select控件提供下拉列表选项,供用户进行选择。下拉框通过select标记和option标记来定义。例如,在用户注册表单中,职业的选择项就使用下拉列表实现。 描述 ...
html:radio,html:checkbox,html:multibox,html:select 与actionform结合使用数组或集合,有多种实现方式
html:select 12 html:checkbox 14 html:radio 15 html:multibox 15 html:link 16 html:errors 18 html:javascript 20 html:xhtml 21 logic:iterate 21 logic:present 23 logic:messagesPresent 23 logic:empty 24 ...
<html:checkbox <html:multibox <html:select <html:optionCollections 学习这些还是有好处的,有需要的请猛击下载
美化HTML的select标签的原始样式,并且不影响原始select的事件方法调用。
* html:select 标签:生成下拉列表。 * html:write 标签:生成 HTML 输出。 Logic Tags Logic Tags 库包含的标签可以用来进行逻辑判断、集合迭代和流程控制。 * logic:equal 标签:判断两个值是否相等。 * logic:...
主要介绍了用JavaScript来美化HTML的select标签的下拉列表效果的方法,而且在多浏览器下的兼容效果也得到提升,需要的朋友可以参考下
由于时间有限,直接将个人实现的JSP上传至...对于JSP里的html:select及其html:option几乎只用直接拷贝,没什么需要修改的(除了修改页面的EL表达式);如果有不懂的,可以直接联系我;电子邮件:zyyceo@gmail.com; QQ:114948587
二级下拉列表联动 select 网页 html5 学院、专业 选择的下拉列表 下载可用!!!
NULL 博文链接:https://lanhuidong.iteye.com/blog/1722586
方法如下: 代码如下:<select onbeforeactivate=”return false” onfocus=”this.blur()” onmouseover=”this.setCapture()” onmouseout=”this.releaseCapture()”> <option>1 </select>
选择2到树 Select2-to-Tree是对Select2(一个流行的选择框库)的扩展... 然后,在HTML文档中,添加Select2库( *.js文件和*.css文件,当前版本为4.0+)和Select2-to-Tree库( *.js文件和*.css “ src ”文件夹中的*.css
Bselect是一个jQuery插件,可构建具有搜索功能的自定义HTML选择框,并将所选值输入到隐藏的输入字段中,以供进一步使用。 要实施,请参阅demo.html页面。 Bselect可以完美地处理10k +个选项(项目),而且没有延迟。...
孙维琴struts1中掌握html标签小程序。有几个比较典型的标签:<html:select> <html:options> <html:link> <html:rewrite> <jsp:useBean> <jsp:setProperty>等的用法
使用函数 $ .select.setValue(idSelect, value) 我们可以从 select 中选择一个选项,统一发送 ID 和我们要选择的值的值。 我们的JS $.select.setValue("idSelect", "febrero); 我们的 HTML <select id="id...