Author: abelevich
Date: 2007-06-06 08:56:06 -0400 (Wed, 06 Jun 2007)
New Revision: 1042
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-06
12:55:57 UTC (rev 1041)
+++
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-06
12:56:06 UTC (rev 1042)
@@ -228,48 +228,25 @@
Event.observe(grid.eventOnSort, "on sort", onSorted);
},
- onCompleteGridInvalidation : function(request, event, data){
- var theDoc = document;
- var getEl = theDoc.getElementById;
- var options = dataModel.getCurrentOptions();
- var rowCount = grid.getBody().templFrozen.getElement().rows.length;
- var startRow = options.startRow;
- var count = options.count;
- var row, id, rowindex, i, el;
- for(i=0; i<count; i++) {
- rowindex = startRow + i;
- if(rowindex >= rowCount) rowindex -= rowCount;
- id = '#{clientId}' + ":f:row_" + rowindex;
- row = request.getElementById(id);
+ onSortComplete : function(request, event, data){
+ var options = request.getJSON("options");
+ var clientid = '#{clientId}';
+ AjaxUpdater.updateRows(options,request,grid, clientid);
- if(ClientUILib.isIE) {
- el = getEl(id);
- AjaxUpdater.updateTr(el,row.xml);
- }
- else {
- el = theDoc.getElementById(id);
- AjaxUpdater.updateTr(el,row.innerHTML);
- }
-
- id = '#{clientId}' + ":n:row_" + rowindex;
- row = request.getElementById(id);
- if(ClientUILib.isIE) {
- el = getEl(id);
- AjaxUpdater.updateTr(el,row.xml);
- }
- else {
- el = theDoc.getElementById(id);
- AjaxUpdater.updateTr(el,row.innerHTML);
- }
- }
-
- dataModel.eventDataReady.fire(options);
- }
+ },
+
+ onScrollComplete : function(request, event, data,clientid){
+ var options = dataModel.getCurrentOptions();
+ var clientid = '#{clientId}';
+ AjaxUpdater.updateRows(options,request,grid,clientid);
+ }
}
+
}();
+
+
#{this:getScriptContributions(context, component)};
Event.observe(window, 'load', #{this:getJavaScriptVarName(context,
component)}.init);
-
// ]]>
</script>
Show replies by date