<html:select property="property">//property是ActionForm中的一个属性名称
<html:options collection="list" property="id" labelProperty="name"/>
</html:select>
<html:options collection="list" property="id" labelProperty="name"/>
</html:select>
解决方案 »
- 谁有SSH 框架的源码
- 求解—一单例模式运行顺序
- jsf怎么看一个tag绑定的对象
- MyFaces 2.0.4 java.lang.NullPointerException at javax.faces.component.UIViewRoot
- 贴代码求救。。sos
- jsp中的问题向各位高手请教一下谢谢
- eWebEditor上传到服务器出现NullPointerException
- spring用JSP方式怎样读取ModelAndView返回的数据,而不用JSTL?
- 问一个关于内部网群发通知的问题??????
- sax2大数据优化方案,分不够在加
- 我用weblogic8部署实体bean(cmp)的时候出现了下面的错误,请教怎么解决呢?
- 关于RMI的一个问题.
<html:options collection="COL" property="id" labelProperty="name"/>
</html:select>
selectproperty你的这个对应的form里的属性
COL是你要放的集合数据,id ,name不说了
我的form里三个属性 sysid,id,name对应一个下拉矿,两个文本矿
<html:select property="property">//property是ActionForm中的一个属性名称
<html:options collection="list" property="id" labelProperty="name"/>
</html:select>
上述开发中的property="property" 里用sysid取代"property"
出现错误:
org.apache.jasper.JasperException: No getter method available for property sysid for bean under name org.apache.struts.taglib.html.BEAN
楼上的帖子中的sysid,id,name 分别是long,String,String
在list中的bean也有id,name
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/app.tld" prefix="app" %>
<%@ page contentType="text/html; charset=GBK" %>
<html:html>
<head>
<title>
index
</title>
</head>
<body>
<%
CSystemHBM test1=new CSystemHBM();
CSystemHBM test2=new CSystemHBM();
test1.setSysid(1);
test2.setSysid(2);
test1.setName("name1");
test2.setName("name2");
Set list = new HashSet();
list.add(test1);
list.add(test2);
pageContext.setAttribute("group",list);%>
<html:form action="/loginAction.do" method="POST">
<html:select property="sysid">
<html:options collection="group" property="sysid" labelProperty="name"/>
</html:select>
</html:form>
</body>
</html:html>出现异常:org.apache.jasper.JasperException: No getter method available for property sysid for bean under name org.apache.struts.taglib.html.BEAN