Author: bleathem
Date: 2013-07-12 03:48:19 -0400 (Fri, 12 Jul 2013)
New Revision: 23263
Modified:
branches/enterprise/3.3.1.SP3_test_patch/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable2.xhtml
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
BZ#982322: Moved the setScrollPos into the grid updateLayout method (RF-7169)
Modified:
branches/enterprise/3.3.1.SP3_test_patch/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable2.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable2.xhtml 2013-07-12
07:19:12 UTC (rev 23262)
+++
branches/enterprise/3.3.1.SP3_test_patch/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable2.xhtml 2013-07-12
07:48:19 UTC (rev 23263)
@@ -1,24 +1,31 @@
-<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <style>
- .scrolls{
- width:300px;
- height:200px;
- overflow:auto;
- }
- </style>
+<head>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8"/>
+ <title>
+ <ui:insert name="title"/>
+ </title>
+ <style type="text/css">
+ .scrolls{
+ width:300px;
+ height:200px;
+ overflow:auto;
+ }
+ </style>
+</head>
+ <body>
<h:form>
<rich:spacer height="30" />
<rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1"
height="400px"
width="400px" id="carList" rows="40"
columnClasses="col"
value="#{dataTableScrollerBean.allCars}" var="category"
sortMode="single"
binding="#{dataTableScrollerBean.table}"
- sortOrder="#{dataTableScrollerBean.order}"
+ sortOrder="#{dataTableScrollerBean.order}"
selection="#{dataTableScrollerBean.selection}">
<rich:column id="make">
@@ -28,7 +35,7 @@
<rich:column id="model">
<f:facet name="header"><h:outputText
styleClass="headerText" value="Model" /></f:facet>
<h:outputText value="#{category.model}" />
- <h:inputText value=""/>
+ <h:inputText value=""/>
</rich:column>
<rich:column id="price">
<f:facet name="header"><h:outputText
styleClass="headerText" value="Price" /></f:facet>
@@ -45,44 +52,45 @@
<rich:column id="stock">
<f:facet name="header"><h:outputText
styleClass="headerText" value="Stock" /></f:facet>
<h:outputText value="#{category.stock}" />
- <h:inputText value=""/>
+ <h:inputText value=""/>
</rich:column>
- </rich:scrollableDataTable>
- <rich:spacer height="20px"/>
- <a4j:commandButton value="Show Current Selection"
reRender="table"
- action="#{dataTableScrollerBean.takeSelection}"
- oncomplete="javascript:Richfaces.showModalPanel('panel');"/>
+ </rich:scrollableDataTable>
+ <rich:spacer height="20px"/>
+ <a4j:commandButton value="Show Current Selection"
reRender="table"
+ action="#{dataTableScrollerBean.takeSelection}"
+ oncomplete="javascript:Richfaces.showModalPanel('panel');"/>
</h:form>
- <rich:modalPanel id="panel" autosized="false"
keepVisualState="false" width="315" height="230">
- <f:facet name="header">
- <h:outputText value="Selected Rows"/>
- </f:facet>
- <f:facet name="controls">
- <span style="cursor:pointer"
onclick="javascript:Richfaces.hideModalPanel('panel')">X</span>
- </f:facet>
+ <rich:modalPanel id="panel" autosized="false"
keepVisualState="false" width="315" height="230">
+ <f:facet name="header">
+ <h:outputText value="Selected Rows"/>
+ </f:facet>
+ <f:facet name="controls">
+ <span style="cursor:pointer"
onclick="javascript:Richfaces.hideModalPanel('panel')">X</span>
+ </f:facet>
<h:panelGroup layout="block" styleClass="scrolls">
- <rich:dataTable value="#{dataTableScrollerBean.selectedCars}"
var="sel" id="table">
- <rich:column>
- <f:facet name="header"><h:outputText value="Make"
/></f:facet>
- <h:outputText value="#{sel.make}" />
- </rich:column>
- <rich:column id="model">
- <f:facet name="header"><h:outputText value="Model"
/></f:facet>
- <h:inputText value=""/>
- </rich:column>
- <rich:column id="price">
- <f:facet name="header"><h:outputText value="Price"
/></f:facet>
- <h:outputText value="#{sel.price}" />
- </rich:column>
- <rich:column id="mileage">
- <f:facet name="header"><h:outputText value="Mileage"
/></f:facet>
- <h:outputText value="#{sel.mileage}" />
- </rich:column>
- <rich:column id="stock">
- <f:facet name="header"><h:outputText value="Stock"
/></f:facet>
- <h:inputText value=""/>
- </rich:column>
+ <rich:dataTable value="#{dataTableScrollerBean.selectedCars}"
var="sel" id="table">
+ <rich:column>
+ <f:facet name="header"><h:outputText value="Make"
/></f:facet>
+ <h:outputText value="#{sel.make}" />
+ </rich:column>
+ <rich:column id="model">
+ <f:facet name="header"><h:outputText value="Model"
/></f:facet>
+ <h:inputText value=""/>
+ </rich:column>
+ <rich:column id="price">
+ <f:facet name="header"><h:outputText value="Price"
/></f:facet>
+ <h:outputText value="#{sel.price}" />
+ </rich:column>
+ <rich:column id="mileage">
+ <f:facet name="header"><h:outputText value="Mileage"
/></f:facet>
+ <h:outputText value="#{sel.mileage}" />
+ </rich:column>
+ <rich:column id="stock">
+ <f:facet name="header"><h:outputText value="Stock"
/></f:facet>
+ <h:inputText value=""/>
+ </rich:column>
</rich:dataTable>
- </h:panelGroup>
+ </h:panelGroup>
</rich:modalPanel>
-</ui:composition>
+ </body>
+</html>
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2013-07-12
07:19:12 UTC (rev 23262)
+++
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2013-07-12
07:48:19 UTC (rev 23263)
@@ -231,7 +231,6 @@
scrollElement.scrollTop--;
}
scrollElement.scrollTop = scrollTop;
- grid.getBody().setScrollPos(scrollTop);//RF-7169
}, 50);
}
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2013-07-12
07:19:12 UTC (rev 23262)
+++
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2013-07-12
07:48:19 UTC (rev 23263)
@@ -235,7 +235,12 @@
}
var scrollPos = Math.min(totalWidth - viewWidth, scrollLeft);
this.grid.adjustScrollPosition(scrollPos);
- },
+
+ if (ClientUILib.isIE7 || ClientUILib.isIE8) {
+ this.setScrollPos(scrollTop);//RF-7169
+ }
+
+ },
adjustScrollPosition: function(pos) {
this.templNormal.moveToX(-pos);
},