easyui

来源:互联网 发布:linux系统ping不通 编辑:程序博客网 时间:2024/06/07 03:28

1.更新tab

$('#tts').tabs('update', {                tab:$('#tts').tabs('getTab',1),                options: {                    title:'记录 '+row.id,                    href:root()+'/holds/get?id='+row.id                }            });
2.

@responsebody表示该方法的返回结果直接写入HTTP response body中一般在异步获取数据时使用,在使用@RequestMapping后,返回值通常解析为跳转路径,加上@responsebody后返回结果不会被解析为跳转路径,而是直接写入HTTP response body中。比如异步获取json数据,加上@responsebody后,会直接返回json数据
3. 格式化

{  field:"location",  title:"77",  width:80,sortable:true,formatter:function(value,row,index){if (value){var result=$.ajax({type:'post',url:root()+"/tion.json",async:false});$.each($.parseJSON(result.responseText),function(id,data){if(data.id==value){value = '<span title="'+data.code+' '+data.text+'">'+data.text+'</span>';            }        });return value;}}  }

{  field:"created_date",  title:"日期",  width:50,sortable:true,formatter:dateformatter  }

{field:"item.barcode",title:"条码",width:100,formatter:function(value,row,index){if(row.item.barcode){return row.item.barcode;}}}



4.如果一个对话框中要调用另一个对话框,则要加parent