easyui

本文介绍了如何使用jQuery EasyUI更新Tab面板,并展示了如何通过AJAX请求格式化表格中的数据,包括位置信息和日期格式化的方法。此外还讨论了@responsebody注解在Spring MVC中的作用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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




















评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值