Author: konstantin.mishin
Date: 2009-11-24 12:03:02 -0500 (Tue, 24 Nov 2009)
New Revision: 15988
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.css
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.js
Log:
RF-7871
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2009-11-24
16:36:33 UTC (rev 15987)
+++
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2009-11-24
17:03:02 UTC (rev 15988)
@@ -226,8 +226,9 @@
writer.writeAttribute(HTML.ID_ATTRIBUTE, table.getClientId(context) + ":b",
null);
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rich-extable-body", null);
writer.startElement(HTML.DIV_ELEM, table);
- writer.startElement(HTML.DIV_ELEM, table);
- writer.endElement(HTML.DIV_ELEM);
+// writer.startElement(HTML.DIV_ELEM, table); TODO
+// writer.write(" ");
+// writer.endElement(HTML.DIV_ELEM);
writer.startElement(HTML.TABLE_ELEMENT, table);
writer.writeAttribute(HTML.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HTML.CELLSPACING_ATTRIBUTE, "0", null);
@@ -287,7 +288,6 @@
RendererState state = (RendererState)rowHolder;
UIDataTableBase table = state.getRow();
writer.startElement(HTML.TR_ELEMENT, table);
- writer.writeAttribute(HTML.ID_ATTRIBUTE, table.getClientId(context), null);
Iterator<UIComponent> columns = null;
if (state.isFrozen()) {
columns = state.getFrozenColumns().iterator();
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.css
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.css 2009-11-24
16:36:33 UTC (rev 15987)
+++
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.css 2009-11-24
17:03:02 UTC (rev 15988)
@@ -20,9 +20,10 @@
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
.rich-extable{
+ overflow: hidden;
background-color: #FFFFFF;
border: 1px solid #C4C0C9;
- height: 100%;
+ /*height: 100%;*/
}
.rich-extable-header {
@@ -33,7 +34,6 @@
overflow-x: hidden;
overflow-y: scroll;
width: 100%;
- height: 0px;
}
.rich-extable-footer {
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.js
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.js 2009-11-24
16:36:33 UTC (rev 15987)
+++
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/extendedDataTable.js 2009-11-24
17:03:02 UTC (rev 15988)
@@ -38,7 +38,7 @@
var element = document.getElementById(id);
var bodyElement = document.getElementById(id + ":b");
var contentElement = bodyElement.firstChild;//TODO Richfaces.firstDescendant;
- var marginElement = contentElement.firstChild;//TODO this.marginElement =
Richfaces.firstDescendant(this.contentElement);
+ //TODO var marginElement = contentElement.firstChild;this.marginElement =
Richfaces.firstDescendant(this.contentElement);
var dataTableElement = contentElement.lastChild;//TODO this.dataTableElement =
Richfaces.lastDescendant(this.contentElement);
var frozenHeaderPartElement = document.getElementById(id + ":frozenHeader");
@@ -52,6 +52,10 @@
var updateLayout = function() {
var offsetWidth = frozenHeaderPartElement ? frozenHeaderPartElement.offsetWidth : 0;
normalPartStyle.width = element.clientWidth - offsetWidth + "px";
+ var delta = scrollElement.firstChild.offsetHeight - scrollElement.clientHeight;
+ if (delta) {
+ scrollElement.style.height = scrollElement.offsetHeight + delta;
+ }
var height = element.clientHeight;
var el = element.firstChild;
while (el) {