springMVC+MyBatis+oracle+easy ui:
查询条件带日期的 : xml : <if test="machineType != null and machineType != ''">
and PRODUCE_USE_DATE = to_date(#{produceUseDate},'yyyy-mm-dd')
</if>
页面上修改时显示日期:
value="<fmt:formatDate value="${obj.produceUseDate}" pattern="yyyy-MM-dd"/>"
easyui-datagrid 默认选中: $.each(data1.rows,function(index,row){
if('1'==row.TOOLNAME){
$('#table').datagrid("selectRow", index);
}
});
关闭当前窗口并刷新父窗口:
parent.$('#windowDiv').dialog('refresh',url); //windowDiv 父窗口ID
parent.$('#mydiv').dialog('destroy'); //mydiv当前窗口ID
将字符串转json格式:String knife = request.getParameter("knife");
ToolStoreKnife toolKnife = stringToObject(knife);
将json字符串转对象:ToolStoreKnife toolKnife = new ToolStoreKnife();
JSONObject json = JSONObject.fromObject(knife);
if(json.containsKey("字段名")){
toolKnife.setDiameter(json.get("字段名").toString());