在数据库中读出,然后用一个循环存储在bean里,并且记住bean得相应存储地址。
在从存储地址中读出来。
在从存储地址中读出来。
解决方案 »
- 如何在list中删除我指定的对象
- 下载附件,怎么获得文件的名字
- 谁来说说拦截器与过滤器能一并理解不?
- Strtus中使用DispatchAction类的错误
- struts2 纯注解 怎么老是There is no Action mapped for namespace
- 貌似TOMCAT5.5.17不支持J2EE1.5,还是tomcatPluginV31不支持?
- struts中web.xml中init-param的问题
- <input id="id" type="text" name="textfield">中的id属性在Struts的 html:text 标签中和哪个对应?
- 怎样打印Applet
- springMVC的@RequestMapping里面的路径能否写成动态的
- linux系统tomcat服务器如何识别中文?
- JNDI使用RMI连接数据库
在jsp中用bean:iterator作循环取出所有的值
通过bean传递给页面.
<html:select property="position">
<html:options collection="availablePrivilege" property="position" labelProperty="name"/>
</html:select>
在jsp中用bean:iterator作循环取出所有的值我怎么没有找到bean:iterator??
请问这个是在那儿的标签?
FormBean还是不FormBean没有什么关系,只要你把Bean生成set到Attributes里面(struts的FormBean只是从配置文件里面读取设置自动完成这个过程而以),然后指定给<html:options>标签就可以了。
<html:select property="position">
<html:options collection="availablePrivilege" property="position" labelProperty="name"/>
</html:select>
显示
<tr>
把select写到这里(从id读取数据) </tr>
</logic:iterate>
<html:select property="position">
<html:options collection="availablePrivilege" property="position" labelProperty="name"/>
</html:select>对应的actionForm 里要有
1) collection availablePrivilege //下拉列表里的显示的数据 要在前一个action里先set,collection的每一项是 LabelValueBean 类型的label是显示的值,value是对应的返回值
2) String[] position //选中的value值自动提交到这里,也可以在前一个action里指定预选中的值