<sqlMap namespace="PersonnelRegist">
<typeAlias alias="ID" type="com.xindeco.core.pojo.IDEntity"/>
</select>
<select id="GraAppInfo.searchUpApply" parameterClass="com.xindeco.business.dto.GraAppInfoDTO" resultClass="ID" cacheModel="userCache">
select distinct a.ID AS id
from TGraAppInfo a left join TEMPLOYUNITBASEINFO b on a.unit=b.MEMBERID
where appstatus = '1'
<dynamic>
<isNotEmpty prepend="AND" property="name">(a.name like '%' + #name# + '%')</isNotEmpty>
<isNotEmpty prepend="AND" property="unit">(b.UNITNAME like '%' + #unit# + '%')</isNotEmpty>
</dynamic>
</select>
</sqlMap>
注意sqlmapGraAppInfoDTO的name,unit只能是基本数据类型,不能是复杂数据类型.
2、<script>的位置
<script>
form1.srchEdit.value='<%=srchEdit%>';
form1.srchType.value='<%=srchType%>';
</script>
<form>
<input type="text" name="srchEdit"/>
<input type="text" name="srchType"/></form>
与<form>
<input type="text" name="srchEdit"/>
<input type="text" name="srchType"/>
</form>
<script>
form1.srchEdit.value='<%=srchEdit%>';
form1.srchType.value='<%=srchType%>';
</script>
的差别,必须在form加载完对它赋值,否则srchEdit又重新加载,为null
3、hibernate属性设置出现错误:
如果pojo类取fSUnit属性名,系统将无法识别。get和set将取不到值。
posted on 2006-05-11 10:06
aimy 阅读(308)
评论(0) 编辑 收藏