论坛首页 Web前端技术论坛

DWR 1.1 发布

浏览 4989 次
锁定老帖子 主题:DWR 1.1 发布
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2006-03-08  
DWR
DWR 1.1 今天终于发布。
http://getahead.ltd.uk/dwr/download

在DWRUtil.addRows中增加了期待已久的rowCreator和cellCreator

var cellFuncs = [
  function(data); { return data; },
  function(data); { return data.toUpperCase();; },
  function(data); {
    return "<input type='button' value='Test' onclick='alert(\"Hi\");;'/>";
  },
  function(data); { return count++; }
];

DWRUtil.addRows( "demo2",[ 'Africa', 'America', 'Asia', 'Australasia', 'Europe' ] , cellFuncs, {
  rowCreator:function(options); {
    var row = document.createElement("tr");;
    var index = options.rowIndex * 50;
    row.style.color = "rgb(" + index + ",0,0);";
    return row;
  },
  cellCreator:function(options); {
    var td = document.createElement("td");;
    var index = 255 - (options.rowIndex * 50);;
    td.style.backgroundColor = "rgb(" + index + ",255,255);";
    td.style.fontWeight = "bold";
    return td;
  }
});;
   发表时间:2006-03-08  
终于等到了,要研究研究它的代码。
0 请登录后投票
   发表时间:2006-03-08  
:idea: 爽啊
var count = 1;
var cellFuncs = [
  	function(data); { return count++; },
  	function(data); { return data.name; },
  	function(data); { return data.description ? data.description : ""; }
];

Admin.listCategory = function(); {
	var ele = $("tbody-list-category");;
	sro.remoteCall(categoryList, [], function(reply); {
		var rs = reply.getResult();;
		DWRUtil.removeAllRows(ele);;
		count = 1;
		DWRUtil.addRows(ele, rs, cellFuncs);; 
	});; 
}
0 请登录后投票
   发表时间:2006-03-09  
http://getahead.ltd.uk/dwr/changelog/dwr11

看最底下
What's Next?
DWR 1.1 was slowed down considerably by a nasty Safari bug, so DWR 2.0 (or whatever we call it) is well underway. It has a far broader scope; the major new features are accessibility enhancements, and what now appears to be called 'Comet'.

Comet
更好玩的东西要来了。

http://alex.dojotoolkit.org/?p=545
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics