浏览 2797 次
|
锁定老贴子 主题:DWR 1.1 发布
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
|---|---|
| 作者 | 正文 |
|
时间:2006-03-08
DWR 1.1 今天终于发布。
http://getahead.ltd.uk/dwr/download 在DWRUtil.addRows中增加了期待已久的rowCreator和cellCreator [code:1]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; } });[/code:1] 声明:JavaEye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
|
|
| 返回顶楼 | |
|
时间:2006-03-08
终于等到了,要研究研究它的代码。
|
|
| 返回顶楼 | |
|
时间:2006-03-08
[code:1] 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); }); } [/code:1] |
|
| 返回顶楼 | |
|
时间: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 |
|
| 返回顶楼 | |








