atitit.表格的绑定client side 最佳实践
2014-09-11 23:42
330 查看
atitit.表格的绑定client side 最佳实践
1. 框架选型 1
2. #---原理和流程 1
1. 方法1 1
2. Dwr 例子 1
3. 方法2 2
4. Jq例如 2
嘎自的表格只好js jvc 兰,,,angular
Dwr也能了...
遍历表格模板tr获得tds的所有的id(yash obj.propty)数组.
作者:: 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax
dwr.util.cloneNode;/// note id propty yao del...coloneRow
Foreach headList>> 经过column index,get propty name, thend tds[idx]=obj.propty
End for
Add coloneRow2table..
//or }
People.getSmallCrowd(function(people) {
// Delete all the rows except for the "pattern" row
dwr.util.removeAllRows("peoplebody", { filter:function(tr) {
return (tr.id != "pattern");
}});
// Create a new set cloned from the pattern row
var person, id;
people.sort(function(p1, p2) { return p1.name.localeCompare(p2.name); });
for (var i = 0; i < people.length; i++) {
person = people[i];
id = person.id;
dwr.util.cloneNode("pattern", { idSuffix:id });
dwr.util.setValue("tableName" + id, person.name);
dwr.util.setValue("tableAge" + id, person.age);
dwr.util.setValue("tableAddress" + id, person.address);
dwr.util.setValue("tableSuperhero" + id, person.superhero ? "Yes" : "No");
dwr.util.byId("pattern" + id).style.display = ""; // officially we should use table-row, but IE prefers "" for some reason
peopleCache[id] = person;
}
});
}
1. 框架选型 1
2. #---原理和流程 1
1. 方法1 1
2. Dwr 例子 1
3. 方法2 2
4. Jq例如 2
1. 框架选型
Easyui 好..走十难调整???嘎自的表格只好js jvc 兰,,,angular
Dwr也能了...
2. #---原理和流程
1. 方法1
获得所有的行,第一的头行except,第二模板line,..排除,,,在的所有的数据行删除.遍历表格模板tr获得tds的所有的id(yash obj.propty)数组.
作者:: 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax
2. Dwr 例子
Foreach dataList:::z[dwr.util.cloneNode;/// note id propty yao del...coloneRow
Foreach headList>> 经过column index,get propty name, thend tds[idx]=obj.propty
End for
Add coloneRow2table..
//or }
3. 方法2
根据id/id索引来获得绑定的数据源里面的数据字段..绑定到个td上..4. Jq例如
function fillTable() {People.getSmallCrowd(function(people) {
// Delete all the rows except for the "pattern" row
dwr.util.removeAllRows("peoplebody", { filter:function(tr) {
return (tr.id != "pattern");
}});
// Create a new set cloned from the pattern row
var person, id;
people.sort(function(p1, p2) { return p1.name.localeCompare(p2.name); });
for (var i = 0; i < people.length; i++) {
person = people[i];
id = person.id;
dwr.util.cloneNode("pattern", { idSuffix:id });
dwr.util.setValue("tableName" + id, person.name);
dwr.util.setValue("tableAge" + id, person.age);
dwr.util.setValue("tableAddress" + id, person.address);
dwr.util.setValue("tableSuperhero" + id, person.superhero ? "Yes" : "No");
dwr.util.byId("pattern" + id).style.display = ""; // officially we should use table-row, but IE prefers "" for some reason
peopleCache[id] = person;
}
});
}
相关文章推荐
- atitit.表格的绑定client side 最佳实践
- atitit.泛型编程总结最佳实践 vO99 java c++ c#.net php
- atitit.人脸识别的应用场景and使用最佳实践 java .net php
- atitit.标准时间格式 互相转换 秒数 最佳实践
- atitit.文件上传带进度条的实现原理and组件选型and最佳实践总结O7
- atitit.泛型编程总结最佳实践 vO99 java c++ c#.net php
- atitit.人脸识别的应用场景and使用最佳实践 java .net php
- atitit.标准时间格式 互相转换 秒数 最佳实践
- Atitit. 最佳实践 QA----减少cpu占有率--cpu占用太高怎么办
- atitit.避免NullPointerException 总结and 最佳实践 o99
- atitit.人脸识别的应用场景and使用最佳实践 java .net php
- atitit.避免NullPointerException 总结and 最佳实践 o99
- Atitit.guice3 ioc 最佳实践 o9o
- Atitit.guice3 ioc 最佳实践 o9o
- atitit.提升兼容性最佳实践 o9o
- Atitit. 最佳实践 QA----降低cpu占有率--cpu占用太高怎么办
- atitit.提升兼容性最佳实践 o9o
- Atitit. 最佳实践 QA----降低cpu占有率--cpu占用太高怎么办
- atitit.ajax 最佳实践跟框架选型 o99
- atitit.导航的实现最佳实践and声明式编程