(有图)各位救命啊!ext问题 我这个showUrl该怎么写呢,救助,小弟不胜感激 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 { header: "财务名称", dataIndex: "reportname", renderer: function (v) { if (v != "") { return "<a href='" + v + "'>" + v + "</a>"; } else { return ""; } }}这样不行吗,你看看renderer中的alert下看执行了没 大哥们,你们没听明白我的意思,像你的那个参数"v"他指的是财务名称 也就是v的值也就是财务名称,可我的超连接的href的值要的是别的列,也就是报表模块路径,哎郁闷了我一整天了 我明白了,当前的v是中文名称。也就是链接显示字符串,还有路径。你要的是路径,可以通过当前data获得的吧。我要下班了,明天给你研究。 晕,在这里又遇到你了,要的是不是这样 function showUrl(value, cellmeta, record, rowIndex, columnIndex, store) { return "<a herf='+ record.data.reportLocation+'>" + value + "</a>"; } 我丢。引号又错了。function showUrl(value, cellmeta, record, rowIndex, columnIndex, store) { return "<a herf='" + record.data.reportLocation + "'>" + value + "</a>";}注意value, cellmeta, record, rowIndex, columnIndex, store六个参数的位置。 改变数据源,将财务名称这个数据。改成财务名称+报表模块路径,报表模块路径不变。这样就可以截取value的值了。java:public void doPost(request, response) { String json = ""; json += "reportid:" + getReportId(); json += ",typename:'" + getTypeName() + "'"; json += ....; json += ",reportname: '" + getReportName() + "@" + getReportLocation() + "'"; json += ....; json += ",reportlocation:'" + getReportLocation() + "'"; json += ....; out.print(json);}{ header: "财务名称", dataIndex: "reportname", renderer: function (value) { if (v != "") { var ary = value.split('@');//现在这里对应的是:json += ",reportname: '" + getReportName() + "@" + getReportLocation() + "'"; //所以用@分割,就是reportname和reportLocation了 return "<a href='" + ary[0] + "'>" + ary[1] + "</a>"; } else { return ""; } }}只需要传递3个参数,因为只用到了record,后面没有用到的可以忽略不传function showUrl(value, cellmeta, record) { return "<a herf='" + record.data.reportLocation + "'>" + value + "</a>";} 这个正则表达式怎么写 js相乘的问题 flv播放器的控制代码 在一个iframe编辑框里如何实现英文字符的自动换行? 怎么查找字符串数组myArray里某一项包含文本“abc”呢?急。。谢谢 javascript提示错误:Automation服务器不能创建对象。 当DropDownList得到焦点的时候,能不能触发它的点击事件,自动下拉? 求JS做的万年历.马上结。 javascript程序如何性能调优? echart 力导图如何实现指定坐标? 怎么避免onkeydown 和 onblur 事件的冲突? javaScript 动态添加元素 添加事件却使用不了THIS
{
header: "财务名称",
dataIndex: "reportname",
renderer: function (v) {
if (v != "") {
return "<a href='" + v + "'>" + v + "</a>";
} else {
return "";
}
}
}
这样不行吗,你看看renderer中的alert下看执行了没
return "<a herf='+ record.data.reportLocation+'>" + value + "</a>";
}
return "<a herf='" + record.data.reportLocation + "'>" + value + "</a>";
}注意value, cellmeta, record, rowIndex, columnIndex, store六个参数的位置。
改变数据源,将财务名称这个数据。改成财务名称+报表模块路径,报表模块路径不变。这样就可以截取value的值了。java:
public void doPost(request, response) {
String json = "";
json += "reportid:" + getReportId();
json += ",typename:'" + getTypeName() + "'";
json += ....;
json += ",reportname: '" + getReportName() + "@" + getReportLocation() + "'";
json += ....;
json += ",reportlocation:'" + getReportLocation() + "'";
json += ....;
out.print(json);
}{
header: "财务名称",
dataIndex: "reportname",
renderer: function (value) {
if (v != "") {
var ary = value.split('@');//现在这里对应的是:json += ",reportname: '" + getReportName() + "@" + getReportLocation() + "'";
//所以用@分割,就是reportname和reportLocation了
return "<a href='" + ary[0] + "'>" + ary[1] + "</a>";
} else {
return "";
}
}
}只需要传递3个参数,因为只用到了record,后面没有用到的可以忽略不传
function showUrl(value, cellmeta, record) {
return "<a herf='" + record.data.reportLocation + "'>" + value + "</a>";
}