Author: alexsmirnov
Date: 2008-01-07 19:31:20 -0500 (Mon, 07 Jan 2008)
New Revision: 5166
Added:
trunk/samples/skins/src/main/java/META-INF/MANIFEST.MF
trunk/ui/effect/src/main/java/META-INF/
trunk/ui/effect/src/main/java/META-INF/MANIFEST.MF
trunk/ui/jQuery/src/main/java/META-INF/
trunk/ui/jQuery/src/main/java/META-INF/MANIFEST.MF
trunk/ui/listShuttle/src/main/java/META-INF/
trunk/ui/listShuttle/src/main/java/META-INF/MANIFEST.MF
trunk/ui/orderingList/src/main/java/META-INF/
trunk/ui/orderingList/src/main/java/META-INF/MANIFEST.MF
trunk/ui/panelmenu/src/main/java/META-INF/
trunk/ui/panelmenu/src/main/java/META-INF/MANIFEST.MF
trunk/ui/treeModel/src/main/java/META-INF/
trunk/ui/treeModel/src/main/java/META-INF/MANIFEST.MF
Modified:
trunk/samples/scrollableDataTableDemo/src/main/webapp/WEB-INF/web.xml
trunk/samples/scrollableDataTableDemo/src/main/webapp/pages/grid1.xhtml
trunk/samples/seamPortletEar/seamBooking/pom.xml
trunk/sandbox/ui/pom.xml
trunk/ui/listShuttle/pom.xml
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
Log:
Replace prototype Element.getHeight(Width) to element.offsetHeight(Width), as a attempt to
improve scrollable grid performance
Modified: trunk/samples/scrollableDataTableDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/scrollableDataTableDemo/src/main/webapp/WEB-INF/web.xml 2008-01-07
20:26:43 UTC (rev 5165)
+++ trunk/samples/scrollableDataTableDemo/src/main/webapp/WEB-INF/web.xml 2008-01-08
00:31:20 UTC (rev 5166)
@@ -6,6 +6,10 @@
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
+ <param-value>false</param-value>
+ </context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
Modified: trunk/samples/scrollableDataTableDemo/src/main/webapp/pages/grid1.xhtml
===================================================================
--- trunk/samples/scrollableDataTableDemo/src/main/webapp/pages/grid1.xhtml 2008-01-07
20:26:43 UTC (rev 5165)
+++ trunk/samples/scrollableDataTableDemo/src/main/webapp/pages/grid1.xhtml 2008-01-08
00:31:20 UTC (rev 5166)
@@ -22,7 +22,7 @@
frozenColCount="1" first="0" rows="40"
width="100%" height="500px">
<dt:column width="200px">
<f:facet name="header">
- <h:outputText value="header"></h:outputText>
+ <h:outputText value="issue"></h:outputText>
</f:facet>
<h:outputText value="#{issues.cell2}"></h:outputText>
<f:facet name="footer">
@@ -30,11 +30,17 @@
</f:facet>
</dt:column>
<dt:column width="200px">
+ <f:facet name="header">
+ <h:outputText value="data"></h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
<h:outputText value="data"></h:outputText>
</dt:column>
</sg:scrollableDataTable>
<a4j:commandButton value="reRender" reRender="table"/>
- <img src="q.jpg">
+ <img src="q.jpg"/>
<script type="text/javascript">
<!--
document.observe("grid:initialized", function(event) {
Modified: trunk/samples/seamPortletEar/seamBooking/pom.xml
===================================================================
--- trunk/samples/seamPortletEar/seamBooking/pom.xml 2008-01-07 20:26:43 UTC (rev 5165)
+++ trunk/samples/seamPortletEar/seamBooking/pom.xml 2008-01-08 00:31:20 UTC (rev 5166)
@@ -1,4 +1,5 @@
-<?xml version="1.0"?><project>
+<?xml version="1.0"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>seamPortletEar</artifactId>
<groupId>org.richfaces.samples</groupId>
Added: trunk/samples/skins/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/samples/skins/src/main/java/META-INF/MANIFEST.MF (rev
0)
+++ trunk/samples/skins/src/main/java/META-INF/MANIFEST.MF 2008-01-08 00:31:20 UTC (rev
5166)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/samples/skins/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/sandbox/ui/pom.xml
===================================================================
--- trunk/sandbox/ui/pom.xml 2008-01-07 20:26:43 UTC (rev 5165)
+++ trunk/sandbox/ui/pom.xml 2008-01-08 00:31:20 UTC (rev 5166)
@@ -21,7 +21,7 @@
<module>sortableHeader</module>
<module>fileUpload</module>
<module>combobox</module>
- <module>progressBar</module>
+ <module>progressBAR</module>
<module>pickList</module>
</modules>
</project>
\ No newline at end of file
Added: trunk/ui/effect/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/effect/src/main/java/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ui/effect/src/main/java/META-INF/MANIFEST.MF 2008-01-08 00:31:20 UTC (rev 5166)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/ui/effect/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ui/jQuery/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/jQuery/src/main/java/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ui/jQuery/src/main/java/META-INF/MANIFEST.MF 2008-01-08 00:31:20 UTC (rev 5166)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/ui/jQuery/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/listShuttle/pom.xml
===================================================================
--- trunk/ui/listShuttle/pom.xml 2008-01-07 20:26:43 UTC (rev 5165)
+++ trunk/ui/listShuttle/pom.xml 2008-01-08 00:31:20 UTC (rev 5166)
@@ -32,8 +32,7 @@
</configuration>
</plugin>
</plugins>
- </build>
-
+ </build>
<dependencies>
<dependency>
<artifactId>orderingList</artifactId>
Added: trunk/ui/listShuttle/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/listShuttle/src/main/java/META-INF/MANIFEST.MF (rev
0)
+++ trunk/ui/listShuttle/src/main/java/META-INF/MANIFEST.MF 2008-01-08 00:31:20 UTC (rev
5166)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/ui/listShuttle/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ui/orderingList/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/orderingList/src/main/java/META-INF/MANIFEST.MF (rev
0)
+++ trunk/ui/orderingList/src/main/java/META-INF/MANIFEST.MF 2008-01-08 00:31:20 UTC (rev
5166)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/ui/orderingList/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ui/panelmenu/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/panelmenu/src/main/java/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ui/panelmenu/src/main/java/META-INF/MANIFEST.MF 2008-01-08 00:31:20 UTC (rev
5166)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/ui/panelmenu/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js 2008-01-07
20:26:43 UTC (rev 5165)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js 2008-01-08
00:31:20 UTC (rev 5166)
@@ -69,8 +69,9 @@
return this.element;
},
getHeight: function() {
- if(this.getElement().tagName.toLowerCase() != "body") {
- var h = Element.getHeight(this.element);
+ var el = this.getElement();
+ if(el.tagName.toLowerCase() != "body") {
+ var h = el.offsetHeight;
return h>0 ? h : (this.element.boxHeight ? parseInt(this.element.boxHeight) : 0);
}
@@ -97,8 +98,9 @@
return this;
},
getWidth: function() {
- if(this.getElement().tagName.toLowerCase() != "body") {
- var w = Element.getWidth(this.element);
+ var el = this.getElement();
+ if(el.tagName.toLowerCase() != "body") {
+ var w = el.offsetWidth;
return w>0 ? w : (this.element.boxWidth ? parseInt(this.element.boxWidth) : 0);
}
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-07
20:26:43 UTC (rev 5165)
+++
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-08
00:31:20 UTC (rev 5166)
@@ -184,7 +184,7 @@
var row = this.templNormal.getElement().rows[0];
if(row) {
- this.defaultRowHeight = Element.getHeight(row.cells[0]);
+ this.defaultRowHeight = row.cells[0].offsetHeigh;
}
//if(ClientUILib.isGecko) {
// this.defaultRowHeight -= this.getBorderWidth("tb") +
this.getPadding("tb");
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
---
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2008-01-07
20:26:43 UTC (rev 5165)
+++
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2008-01-08
00:31:20 UTC (rev 5166)
@@ -102,10 +102,11 @@
this.helpObj = new ClientUI.common.box.Box(this.frozenContentBox.getElement(), null,
true);
this.defaultWidth = this.grid.getHeader().defaultWidth;
- this.defaultHeight = Element.getHeight(this.headerRow.getElement().rows[0].cells[0]);
if(ClientUILib.isGecko) {
this.defaultHeight -= this.getBorderWidth("tb") +
this.getPadding("tb");
//this.defaultWidth -= this.getBorderWidth("lr") +
this.getPadding("lr");
+ } else {
+ this.defaultHeight = this.headerRow.getElement().rows[0].cells[0].offsetHeight;
}
this.frozenSubstrate = new ClientUI.common.box.Box(this.grid.getElement().id +
":fs", this.getElement());
@@ -115,10 +116,11 @@
},
updateSize: function() {
this.defaultWidth = this.grid.getHeader().defaultWidth;
- this.defaultHeight = Element.getHeight(this.headerRow.getElement().rows[0].cells[0]);
if(ClientUILib.isGecko) {
this.defaultHeight -= this.getBorderWidth("tb") +
this.getPadding("tb");
//this.defaultWidth -= this.getBorderWidth("lr") +
this.getPadding("lr");
+ } else {
+ this.defaultHeight = this.headerRow.getElement().rows[0].cells[0].offsetHeight;
}
this.setHeight(this.defaultHeight);
this.setWidth(this.defaultWidth);
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
---
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-01-07
20:26:43 UTC (rev 5165)
+++
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-01-08
00:31:20 UTC (rev 5166)
@@ -140,7 +140,7 @@
if(columns[j].sortable)
Event.observe(cell, 'click', eventCellMouseDown);
- h = Element.getHeight(cell);
+ h = cell.offsetHeigh;
if(h > defaultHeight) defaultHeight = h;
defaultWidth += columns[j].width;
columns[j].object = new ClientUI.common.box.InlineBox(cell, null, true);
@@ -187,7 +187,7 @@
if(columns[j].sortable)
Event.observe(cell, 'click', eventCellMouseDown);
- h = Element.getHeight(cell);
+ h = cell.offsetHeight;
if(h > defaultHeight) defaultHeight = h;
defaultWidth += columns[j].width;
columns[j].object = new ClientUI.common.box.InlineBox(cell, null, true);
@@ -259,7 +259,7 @@
cells.each(function(cell) {
if(i<columns.length) {
columns[i].width = parseInt(cols[j].width);
- h = Element.getHeight(cell);
+ h = cell.offsetHeigh;
if(h > defaultHeight) defaultHeight = h;
defaultWidth += columns[i].width;
}
@@ -273,7 +273,7 @@
if(i<columns.length) {
columns[i].width = parseInt(cols[j].width);
- h = Element.getHeight(cell);
+ h = cell.offsetHeigh;
if(h > defaultHeight) defaultHeight = h;
defaultWidth += columns[i].width;
}
Added: trunk/ui/treeModel/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/treeModel/src/main/java/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ui/treeModel/src/main/java/META-INF/MANIFEST.MF 2008-01-08 00:31:20 UTC (rev
5166)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/ui/treeModel/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain