进入页面 分页查询 直接报错
表单:
<li><label>城市:</label>
<form:select path="fcity.fcityid" class="input-medium" id="city" onchange="loadYsArea()">
<form:option value="">请选择</form:option>
<c:forEach items="${cities }" var="cityList">
<form:option value="${cityList.fcityid }">${cityList.fname }</form:option>
</c:forEach>
</form:select>
</li>
实体
private YsCity fcity; // 城市
private YsArea farea; // 区域
private YsGarden fgarden; // 社区
get/set...
sql:
<where>
<if test="fhouseid != null and fhouseid != ''">
AND a.fhouseid = #{fhouseid}
</if>
<if test="fcity.fcityid != null and fcity.fcityid != ''">
AND a.fcity = #{fcity.fcityid}
</if>
<if test="farea.fareaid != null and farea.fareaid != ''">
AND a.farea = #{farea.fareaid}
</if>
<if test="fgarden.fgardenid != null and fgarden.fgardenid != ''">
AND a.fgarden = #{fgarden.fgardenid}
</if>
错误信息
2016-12-12 10:23:37,210 ERROR [500.jsp] - nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'fcity.fcityid != null and fcity.fcityid != '''. Cause: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "fcityid")
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'fcity.fcityid != null and fcity.fcityid != '''. Cause: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "fcityid")
不知道我贴的信息全不全 希望大神帮忙看看