[richfaces-svn-commits] JBoss Rich Faces SVN: r974 - trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Jun 1 10:59:54 EDT 2007
Author: abelevich
Date: 2007-06-01 10:59:53 -0400 (Fri, 01 Jun 2007)
New Revision: 974
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
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-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-06-01 14:46:24 UTC (rev 973)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-06-01 14:59:53 UTC (rev 974)
@@ -12,7 +12,7 @@
>
<td class="ClientUI_Grid_BC" id="#{client_id}:c_#{cell_id}">
- <span style="width: #{component.attributes['width']}" id="#{client_id}:bc_#{cell_index}" class="ClientUI_Grid_BCBody1">
+ <span id="#{client_id}:bc_#{cell_index}" class="ClientUI_Grid_BCBody1">
<span class="ClientUI_Grid_FCBody" id="#{client_id}:bc_#{cell_id}">
<vcp:body/>
</span>
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx 2007-06-01 14:46:24 UTC (rev 973)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx 2007-06-01 14:59:53 UTC (rev 974)
@@ -12,7 +12,7 @@
>
<td class="ClientUI_Grid_FC">
- <span style="width: #{component.attributes['width']}" id="#{client_id}:fc_#{cell_index}" class="ClientUI_Grid_FCBody1">
+ <span id="#{client_id}:fc_#{cell_index}" class="ClientUI_Grid_FCBody1">
<span class="ClientUI_Grid_FCBody">
<vcp:body/>
</span>
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-06-01 14:46:24 UTC (rev 973)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-06-01 14:59:53 UTC (rev 974)
@@ -13,7 +13,7 @@
>
<td class="ClientUI_Grid_HC" id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}" sortable="#{component.attributes['sortable']}">
- <span style="width: #{component.attributes['width']}" id="#{client_id}:hcc_#{cell_index}" class="ClientUI_Grid_HCBody1">
+ <span id="#{client_id}:hcc_#{cell_index}" class="ClientUI_Grid_HCBody1">
<span id="#{clientId}:hcb_#{cell_index}" class="ClientUI_Grid_HCBody">
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
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-01 14:46:24 UTC (rev 973)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-01 14:59:53 UTC (rev 974)
@@ -32,7 +32,14 @@
<div id="#{clientId}_GridHeaderTemplate" class="ClientUI_InlineBox" style="width: #{component.attributes['width']};">
<div style="display: block; left: 0px; top: 0px; width: #{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox" id="#{clientId}:header:FrozenBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<tr class="ClientUI_Grid_HR">
<jsp:scriptlet>
@@ -46,7 +53,14 @@
</span>
<span class="ClientUI_TmplBox ClientUI_NormalBox" id="#{clientId}:header:NormalBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <col width="100px" />
<tbody>
<tr class="ClientUI_Grid_HR">
<jsp:scriptlet>
@@ -54,7 +68,7 @@
renderHeaders(context, component, false);
]]>
</jsp:scriptlet>
- <td style="width: 1000px"></td>
+ <td style="width: 100px"></td>
</tr>
</tbody>
</table>
@@ -65,7 +79,14 @@
<div id="#{clientId}_GridBodyTemplate" class="ClientUI_InlineBox" style="overflow: auto; width: #{component.attributes['width']}; height: #{component.attributes['height']};">
<div style="display: block; width: #{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox" id="#{clientId}:body:FrozenBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<jsp:scriptlet>
<![CDATA[
@@ -76,7 +97,14 @@
</table>
</span>
<span class="ClientUI_TmplBox ClientUI_NormalBox" id="#{clientId}:body:NormalBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<jsp:scriptlet>
<![CDATA[
@@ -92,7 +120,14 @@
<div id="#{clientId}_GridFooterTemplate" class="ClientUI_InlineBox" style="width: #{component.attributes['width']};">
<div style="display: block; width: width: #{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox" id="#{clientId}:footer:FrozenBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<tr class="ClientUI_Grid_FR">
<jsp:scriptlet>
@@ -106,7 +141,14 @@
</span>
<span class="ClientUI_TmplBox ClientUI_NormalBox" id="#{clientId}:footer:NormalBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<tr class="ClientUI_Grid_FR">
<jsp:scriptlet>
@@ -260,36 +302,66 @@
// ClientUILib.log(ClientUILogger.WARNING, "Grid control created over " + ((new Date()).getTime() - currTime) + " miliseconds.");
},
-
- onCompleteGridInvalidation : function(request, event, data){
-
+ /*updatePagePart: function (id) {
+ var newnode = this.getElementById(id);
+ if (!newnode) {
+ LOG.error("New node for ID " + id + " is not present in response");
+ return;
+ }
+ var oldnode = window.document.getElementById(id);
+ if (oldnode) {
+ var anchor = oldnode.parentNode;
+ Sarissa.clearChildNodes(oldnode);
+ if (oldnode.outerHTML) {
+ LOG.debug("Replace content of node by outerHTML()");
+ oldnode.outerHTML = (new XMLSerializer).serializeToString(newnode);
+ } else {
+ var importednode;
+ importednode = window.document.importNode(newnode, true);
+ LOG.debug("Replace content of node by replaceChild()");
+ anchor.replaceChild(importednode, oldnode);
+ }
+ if (!A4J.AJAX._scriptEvaluated) {
+ this.evalScripts(newnode);
+ }
+ LOG.debug("Update part of page for Id: " + id + " successful");
+ } else {
+ LOG.warn("Node for replace by response with id " + id + " not found in document");
+ }
+ },*/
+ 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;
+ var row, id, rowindex, i, el;
for(i=0; i<count; i++) {
rowindex = startRow + i;
if(rowindex >= rowCount) rowindex -= rowCount;
id = "f:row_" + rowindex;
row = request.getElementById(id);
+
if(ClientUILib.isIE) {
- getEl(id).innerText = row.innerHTML;
+ el = getEl(id);
+ el.outerHTML = row.xml;
}
else {
- theDoc.getElementById(id).innerHTML = row.innerHTML;
- }
+ el = theDoc.getElementById(id);
+ el.innerHTML = row.innerHTML;
+ }
id = "n:row_" + rowindex;
row = request.getElementById(id);
if(ClientUILib.isIE) {
- getEl(id).innerText = row.innerHTML;
+ el = getEl(id);
+ el.outerHTML = row.xml;
}
else {
- theDoc.getElementById(id).innerHTML = row.innerHTML;
- }
+ el = theDoc.getElementById(id);
+ el.innerHTML = row.innerHTML;
+ }
}
dataModel.eventDataReady.fire(options);
@@ -297,7 +369,7 @@
}
}();
#{this:getScriptContributions(context, component)};
- Event.observe(window, 'load', #{this:getJavaScriptVarName(context, component)}.init);
+ Event.observe(window, 'load', #{this:getJavaScriptVarName(context, component)}.init);
// ]]>
More information about the richfaces-svn-commits
mailing list