进入toCustList方法..
进入cust无条件查询..
进入custList存值状态..
2011-1-16 16:24:58 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
javax.el.PropertyNotFoundException: Property 'custNo' not found on type com.weiao.crm.entity.CstLost
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170)
at javax.el.BeanELResolver.property(BeanELResolver.java:279)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
at org.apache.el.parser.AstValue.getValue(AstValue.java:123)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935)
at org.apache.jsp.jsp.cust.cust.list_jsp._jspx_meth_c_005fforEach_005f0(list_jsp.java:229)
at org.apache.jsp.jsp.cust.cust.list_jsp._jspService(list_jsp.java:144)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
...虽然主表查询与CstLost有关联,但是我在无条件查询主表时并没有关CstLost任何事,为什么访问该页面就报错?这错误是什么原因?何解?
解决方案 »
- 如何利用${empty }作判断 ,然后像if else 语句一样执行流程操作
- 异常!!!它是怎么引起的呢?
- 关于上传图片跟文本
- tomahawk包用过得来看看
- <html:link page="/yzsql.do?action=before&pageno=<bean:write name="pageno" property="pageno" />" >before</html:link>
- 在大家的帮助下,利用自已的业余时间终于做了一个自己的网站,欢迎大家提提意见。
- 想沾点铜臭味的请进来,斑竹大人手下留情
- 都是oracle9i带来的问题(气死人了)
- 密码加密
- 大家讨论:你们梦想中希望开发个什么系统,有创意者高分!100分!
- Struts2中用到ajax,到底是用直接用struts2中支持的OGNL表达式直接输出好,还是用JSON转换后台换过来的数据好?还有2种方法的优劣?
- hibernate 解析的问题,在线等
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>客户信息管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="/crm/css/style.css" rel="stylesheet" type="text/css">
</head>
<script type="text/javascript">
function to(path){
window.location.href = path;
}
function del(path){
window.location.href = path;
}
function reload(){
document.forms[0].submit();
}
</script>
<body>
<c:if test="${sessionScope.custList==null}">
<script>window.location.href = "cust!toCustList.action"</script>
</c:if>
<div class="page_title">客户信息管理</div>
<div class="button_bar">
<button class="common_button" onclick="help('');">帮助</button>
<button class="common_button" onclick="reload();">查询</button>
</div>
<form action="cust!toCustList.action" method="post">
<table class="query_form_table">
<tr>
<th>客户编号</th>
<td><input type="text" name="cust.custNo"/></td>
<th>名称</th>
<td><input type="text" name="cust.custName"/></td>
<th>地区</th>
<td>
<select name="cust.custRegion">
<option value="NULL">全部</option>
<option value="北京">北京</option>
<option value="华北">华北</option>
<option value="中南">中南</option>
<option value="东北">东北</option>
<option value="西部">西部</option>
</select>
</td>
</tr>
<tr>
<th>客户经理</th>
<td><input type="text" name="cust.custManagerName"/></td>
<th>客户等级</th>
<td>
<select name="cust.custLevelLabel">
<option value="NULL">全部</option>
<option value="战略合作伙伴">战略合作伙伴</option>
<option value="合作伙伴">合作伙伴</option>
<option value="大客户">大客户</option>
<option value="普通客户">普通客户</option>
</select>
</td>
<th> </th>
<td> </td>
</tr>
</table>
</form>
<br />
<table class="data_list_table">
<tr>
<th>序号</th>
<th>客户编号</th>
<th>名称</th>
<th>地区</th>
<th>客户经理</th>
<th>客户等级</th>
<th>操作</th>
</tr>
<c:forEach var="c" varStatus="i" items="${sessionScope.custList}">
<tr>
<td class="list_data_number">${i.index+1 }</td>
<td class="list_data_text">${c.custNo }</td>
<td class="list_data_ltext">${c.custName }</td>
<td class="list_data_text">${c.custRegion }</td>
<td class="list_data_text">${c.custManagerName }</td>
<td class="list_data_text">${c.custLevelLabel }</td>
<td class="list_data_op">
<img onclick="to('/crm/jsp/cust/cust/edit.jsp?custNo=${c.custNo }');" title="编辑" src="/crm/images/bt_edit.gif" class="op_button" />
<img onclick="to('/crm/jsp/cust/cust/linkman.jsp?custNo=${c.custNo }');" title="联系人" src="/crm/images/bt_linkman.gif" class="op_button" />
<img onclick="to('/crm/jsp/cust/cust/activities.jsp?custNo=${c.custNo }');" title="交往记录" src="/crm/images/bt_acti.gif" class="op_button" />
<img onclick="to('/crm/jsp/cust/cust/orders.jsp?custNo=${c.custNo }');" title="历史订单" src="/crm/images/bt_orders.gif" class="op_button" />
<img onclick="del('cust!doCustDel.action?cust.custNo=${c.custNo }&cust.custName=${c.custName }');" title="删除" src="/crm/images/bt_del.gif" class="op_button" />
</td>
</tr>
</c:forEach>
<tr>
<th colspan="100" class="pager">
<div class="pager">
共59条记录 每页<input value="10" size="2" />条
第<input value="1" size="2"/>页/共5页
<a href="#">第一页</a>
<a href="#">上一页</a>
<a href="#">下一页</a>
<a href="#">最后一页</a>
转到<input value="1" size="2" />页
<button width="20" onclick="reload();">GO</button>
</div>
</th>
</tr>
</table>
</body>
</html>
Dept
{
private Integer id;
private Company company'
private String deptName;
}有时候需要显示部门名称,公司名称,VO则是
DeptVo
{
private Integer id;
private String detpName;
private Integer companyId;
private String companyName;
//写上一个全属性的构造函数
}在使用HQL查询的时候,就可以使用new技术了select new 类的路径.DeptVo(dept.id,dept.deptName,dept.company.id,dept.company.companyName)
from Dept
这样在页面上显示的时候就直接可以EL-->x.companyId,x.companyName来显示.f