问题:
_1.如何在js里面获取java的request对象中的属性值。
解决方法:var value=${requestScope.value} 或者 var value=<%=request.getAttribute("value")%>
_2.js数组格式问题。
解决方法:如果服务端传给浏览器的字符串为json数组格式,js获取之后会直接转换成js的数组格式。如果不想让js转,就在服务端传送字符串的时候加上两个单引号。双引号也是不行的。
_3.Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.
解决方法:spring aop 配置错误
<aop:config>
<aop:advisor
pointcut="execution(* com.shu.cms.service.collection.*.*(..))"
advice-ref="txAdvice" />
</aop:config>
_4.浏览器的记录提示框和自己的自动匹配提示框产生干扰。
解决方法:添加input属性 autocomplete 设置为off
_5.javax.el.ELException: Cannot convert 1,1 of type class java.lang.String to class java.lang.Long
解决方法:
输入教师姓名,动态查询匹配(像百度搜索的动态匹配关键之差不多)
一个简单功能的实现居然让我纠结了那么多天。上班以后要是也这样的话,那不后腿托大了啊。得好好想想问题出在哪。