LazyValidatorForm 付值的问题
来源:百度知道 编辑:UC知道 时间:2024/06/03 04:01:21
<html:text name="JspPagePojoForm" property="name" />
<html:text name="JspPagePojoForm" property="chsName" />
<logic:iterate id="myBean" property="fields" indexId="index"
name="JspPagePojoForm">
<html:text name="myBean" property="name" />
<html:text name="myBean" property="text" />
<logic:present name="${myBean.name}">
<html:select multiple="true" name="myBean" property="options">
<html:options collection="${myBean.name}" property="value"
labelProperty="label" />
</html:select>
</logic:present>
tojspAction -> jsp页面 ->doJspAction
JspPagePojoForm 内有一个名为fields的数组对象
我需要在doJspAction 中用LazyValidatorForm.get(&q
<html:text name="JspPagePojoForm" property="chsName" />
<logic:iterate id="myBean" property="fields" indexId="index"
name="JspPagePojoForm">
<html:text name="myBean" property="name" />
<html:text name="myBean" property="text" />
<logic:present name="${myBean.name}">
<html:select multiple="true" name="myBean" property="options">
<html:options collection="${myBean.name}" property="value"
labelProperty="label" />
</html:select>
</logic:present>
tojspAction -> jsp页面 ->doJspAction
JspPagePojoForm 内有一个名为fields的数组对象
我需要在doJspAction 中用LazyValidatorForm.get(&q
<html:text name="myBean" property="name" indexed="true"/>
加入indexed="true"属性即可
ACTION:
LazyValidatorForm.get("fields") 取得的是个org.apache.commons.beanutils.LazyDynaBean 的集合
在从此集合里的各个
LazyDynaBean 对象.GET(属性名)即可
PS。我是楼主。。自行解决