关于struts的select标签回值给formbean的一个问题

问题描述

向大家请教一个关于struts的select标签回值给formbean的一个问题.我通过select标签已将hibernate关联查询出的UserVo封装的userList显示出来了.事例代码:<logic:iterateid="userInfo"name="userInfoForm"property="userInfoList"><html:selectproperty="groupVo.groupid"name="userInfo"styleId="groupid"><html:optionsCollectionname="userInfoForm"property="groupList"label="groupname"value="groupid"/></html:select></logic:iterate>现在我想将从页面获取的数据传回userInfoList,并且里面封装的还是userVo对象.应该怎么办,谢谢大家.

时间: 2024-08-18 09:53:02

关于struts的select标签回值给formbean的一个问题的相关文章

js获取select标签的值且兼容IE与firefox

 本篇文章主要介绍了js获取select标签的值且兼容IE与firefox.需要的朋友可以过来参考下,希望对大家有所帮助 jsp代码: 代码如下: <form id="search">  <select id="jobSelect" style="width: 200px;" name="jobSelect">   <s:if test='jobSelect == null || jobSelec

web 工程中struts 的select标签 如何让其选定其中的一项

问题描述 web 工程中struts 的select标签 如何让其选定其中的一项 下面是原式 headerValue="全部" listKey="key" listValue="value"> </s:select> 如何让他选定其中的一项, 就好比 <select> <option>1</option> <option selected>2</option> <

js获取select标签选中值的两种方式

 获取select标签选中的值有很多方法,下面通过两种方式使用js来进行获取,喜欢的朋友可以参考下 代码如下: var obj = document.getElementByIdx_x("testSelect"); //定位idvar index = obj.selectedIndex; // 选中索引var text = obj.options[index].text; // 选中文本var value = obj.options[index].value; // 选中值jQuery

js获取select标签的值且兼容IE与firefox_javascript技巧

jsp代码: 复制代码 代码如下: <form id="search"> <select id="jobSelect" style="width: 200px;" name="jobSelect">  <s:if test='jobSelect == null || jobSelect == ""'>   <option selected="selecte

JavaScript:Select标签

jQuery获取Select选择的Text和Value: 1. $("#select_id").change(function(){//code...});   //为Select添加事件,当选择其中一项时触发2. var checkText=$("#select_id").find("option:selected").text();  //获取Select选择的Text 3. var checkValue=$("#select_id

jquery如何获取select option的值及对select option的操作

jQuery获取Select元素,并选择的Text和Value: 1. $("#select_id").change(function(){//code...});   //为Select添加事件,当选择其中一项时触发 2. var checkText=$("#select_id").find("option:selected").text();  //获取Select选择的Text 3. var checkValue=$("#sele

显示-struts的radio标签中list属性有多个值怎样回显选中的值

问题描述 struts的radio标签中list属性有多个值怎样回显选中的值 表单代码: <td><s:radio list="#{'0':'AA','1':'BB','2':'CC','3':'DD','4':'EE' }" name="projects.state"/> </td> 页面显示选中的值 代码: <s:property value="state?'AA':'BB':'CC':'DD':'EE'&qu

有关struts2中的表单标签回显查询到对象的某个属性值

问题描述 有关struts2中的表单标签回显查询到对象的某个属性值 action中的方法: public String userEdit() { elecUser=elecUserService.findById(elecUser.getUserId()); // ActionContext.getContext().getValueStack().pop(); ActionContext.getContext().getValueStack().push(elecUser); return "

struts2 select标签获取action的集合属性值 动态生成下拉菜单 报错

问题描述 1.要获取集合list的Action类public class RoleAction extends ActionSupport {private Role role;public RoleService roleService;public String message;public List list;public static ActionContext ac = null;public String getMessage() {return message;}@Resource