Author: konstantin.mishin
Date: 2007-10-10 10:47:38 -0400 (Wed, 10 Oct 2007)
New Revision: 3313
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
Log:
RF-1076
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
---
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-10-10
14:20:50 UTC (rev 3312)
+++
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-10-10
14:47:38 UTC (rev 3313)
@@ -64,7 +64,7 @@
},
createControl: function() {
var grid = this;
- this.layout = new ClientUI.layouts.GridLayoutManager(this.getElement(), null);
+ this.layout = new ClientUI.layouts.GridLayoutManager(this.getElement().id +
":c", null);
var pagePart, item;
for(var i=0; i<this.templates.length; i++) {
Modified:
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
===================================================================
---
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2007-10-10
14:20:50 UTC (rev 3312)
+++
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2007-10-10
14:47:38 UTC (rev 3313)
@@ -65,174 +65,213 @@
variables.setVariable("hStyle", hStyle);
]]>
</jsp:scriptlet>
-
-
- <div id="#{clientId}" style="width:
#{component.attributes['width']};height:
#{component.attributes['height']};" class="dr-sdt rich-sdt
#{component.attributes['styleClass']}" >
- <div id="#{clientId}:cs" class="dr-sdt-hsplit"
style="display: none;"/>
- <div id="#{clientId}_GridHeaderTemplate"
class="dr-sdt-inlinebox" style="#{hStyle}; width:
#{component.attributes['width']};">
- <iframe id="#{clientId}:hs" class="dr-sdt-substrate"
src="" scrolling="no" frameborder="0" > <br/>
</iframe>
- <div style="display: block; left: 0px; top: 0px; width:
#{sumWidth}px;">
- <span class="dr-sdt-tmplbox dr-sdt-fb"
id="#{clientId}:header:FrozenBox">
- <table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
+
+ <table id="#{clientId}" cellpadding="0" cellspacing="0"
style="width: #{component.attributes['width']};height:
#{component.attributes['height']};" class="dr-sdt rich-sdt
#{component.attributes['styleClass']}" >
+ <tbody>
+ <jsp:scriptlet>
+ <![CDATA[
+ UIComponent facet = component.getFacet("header");
+ if (null != facet && facet .isRendered()) {
+ ]]>
+ </jsp:scriptlet>
+ <tr>
+ <td>
+ <u:insertFacet name="header" />
+ </td>
+ </tr>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
+ <tr>
+ <td style="height: 100%;">
+ <div id="#{clientId}:c" style="height: 100%;">
+ <div id="#{clientId}:cs" class="dr-sdt-hsplit"
style="display: none;"/>
+ <div id="#{clientId}_GridHeaderTemplate"
class="dr-sdt-inlinebox" style="#{hStyle}; width:
#{component.attributes['width']};">
+ <iframe id="#{clientId}:hs" class="dr-sdt-substrate"
src="" scrolling="no" frameborder="0" > <br/>
</iframe>
+ <div style="display: block; left: 0px; top: 0px; width:
#{sumWidth}px;">
+ <span class="dr-sdt-tmplbox dr-sdt-fb"
id="#{clientId}:header:FrozenBox">
+ <table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+
+ <thead>
+ <tr class="dr-sdt-hr rich-std-header-row
#{component.attributes['headerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderHeaders(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+ </tr>
+ </thead>
+ </table>
+ </span>
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, true);
- ]]>
- </jsp:scriptlet>
-
- <thead>
- <tr class="dr-sdt-hr rich-std-header-row
#{component.attributes['headerClass']}">
- <jsp:scriptlet>
- <![CDATA[
- renderHeaders(context, component, true);
- ]]>
- </jsp:scriptlet>
- </tr>
- </thead>
- </table>
- </span>
-
- <span class="dr-sdt-tmplbox dr-sdt-nb"
id="#{clientId}:header:NormalBox">
- <table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
-
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, false);
- ]]>
- </jsp:scriptlet>
- <col width="1"/>
- <thead>
- <tr class="dr-sdt-hr rich-std-header-row
#{component.attributes['headerClass']}">
- <jsp:scriptlet>
- <![CDATA[
- renderHeaders(context, component, false);
- ]]>
- </jsp:scriptlet>
- <th></th>
- </tr>
- </thead>
- </table>
- </span>
- </div>
- </div>
-
-
-
- <div id="#{clientId}_GridBodyTemplate" class="dr-sdt-inlinebox"
style="overflow: auto; width: #{component.attributes['width']}; height:
#{component.attributes['height']};">
- <div id="#{clientId}:scb" style="position: absolute; z-index:
0;">
- <div id="#{clientId}:sb" style="position: absolute;"
><br/> </div>
- </div>
- <div id="#{clientId}:bc" style="display: block; width:
#{sumWidth}px;">
- <span class="dr-sdt-tmplbox dr-sdt-fb"
id="#{clientId}:body:FrozenBox">
- <table id="#{clientId}:f" cellpadding="0"
cellspacing="0" style="border-collapse:collapse;
table-layout:fixed">
+ <span class="dr-sdt-tmplbox dr-sdt-nb"
id="#{clientId}:header:NormalBox">
+ <table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <col width="1"/>
+ <thead>
+ <tr class="dr-sdt-hr rich-std-header-row
#{component.attributes['headerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderHeaders(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <th></th>
+ </tr>
+ </thead>
+ </table>
+ </span>
+ </div>
+ </div>
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, true);
- ]]>
- </jsp:scriptlet>
- <tbody>
- <jsp:scriptlet>
- <![CDATA[
- renderGridBody(context, component, true);
- ]]>
- </jsp:scriptlet>
- </tbody>
- </table>
- <span class="dr-sdt-ho" id="#{clientId}:fho"
><br/></span>
- </span>
- <span class="dr-sdt-tmplbox dr-sdt-nb"
id="#{clientId}:body:NormalBox">
- <table id="#{clientId}:n" cellpadding="0"
cellspacing="0" style="border-collapse:collapse;
table-layout:fixed">
+
+ <div id="#{clientId}_GridBodyTemplate"
class="dr-sdt-inlinebox" style="overflow: auto; width:
#{component.attributes['width']}; height:
#{component.attributes['height']};">
+ <div id="#{clientId}:scb" style="position: absolute; z-index:
0;">
+ <div id="#{clientId}:sb" style="position: absolute;"
><br/> </div>
+ </div>
+ <div id="#{clientId}:bc" style="display: block; width:
#{sumWidth}px;">
+ <span class="dr-sdt-tmplbox dr-sdt-fb"
id="#{clientId}:body:FrozenBox">
+ <table id="#{clientId}:f" cellpadding="0"
cellspacing="0" style="border-collapse:collapse;
table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+ <tbody>
+ <jsp:scriptlet>
+ <![CDATA[
+ renderGridBody(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+ </tbody>
+ </table>
+ <span class="dr-sdt-ho" id="#{clientId}:fho"
><br/></span>
+ </span>
+ <span class="dr-sdt-tmplbox dr-sdt-nb"
id="#{clientId}:body:NormalBox">
+ <table id="#{clientId}:n" cellpadding="0"
cellspacing="0" style="border-collapse:collapse;
table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <col width="1"/>
+ <tbody>
+ <jsp:scriptlet>
+ <![CDATA[
+ renderGridBody(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ </tbody>
+ </table>
+ <span class="dr-sdt-ho" id="#{clientId}:nho"
><br/></span>
+ </span>
+ </div>
+ </div>
+
+ <div id="#{clientId}_GridFooterTemplate"
class="dr-sdt-inlinebox" style="#{fStyle}; width:
#{component.attributes['width']};">
+ <iframe id="#{clientId}:fs" class="dr-sdt-substrate"
src="" scrolling="no" frameborder="0" >
<br/></iframe>
+ <div style="display: block; width: width: #{sumWidth}px;">
+ <span class="dr-sdt-tmplbox dr-sdt-fb"
id="#{clientId}:footer:FrozenBox">
+ <table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+ <tfoot>
+ <tr class="dr-sdt-fr rich-std-footer-row
#{component.attributes['footerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderFooters(context, component,true);
+ ]]>
+ </jsp:scriptlet>
+ </tr>
+ </tfoot>
+ </table>
+ </span>
+
+ <span class="dr-sdt-tmplbox dr-sdt-nb"
id="#{clientId}:footer:NormalBox">
+ <table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <col width="1"/>
+ <tfoot>
+ <tr class="dr-sdt-fr rich-std-footer-row
#{component.attributes['footerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderFooters(context, component,false);
+ ]]>
+ </jsp:scriptlet>
+ <th></th>
+ </tr>
+ </tfoot>
+ </table>
+ </span>
+ </div>
+ </div>
+
+ <input type="hidden" name="#{clientId}_hc"
id="#{clientId}_hc"/>
+ <input type="hidden" name="#{clientId}_state_input"
id="#{clientId}_state_input"/>
+ <input type="hidden" name="#{clientId}_options_input"
id="#{clientId}_options_input"/>
+ <input type="hidden" name="#{clienId}_rows_input"
id="#{clientId}_rows_input" value="#{rows_count}"/>
+ <input type="button" name="#{clientId}_submit_input"
id="#{clientId}_submit_input"
onclick="#{this:getRowsAjaxUpdate(context,component)}"
style="display:none"/>
<jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, false);
+ <![CDATA[
+ renderHiddenScrollInput(context, component);
]]>
- </jsp:scriptlet>
- <col width="1"/>
- <tbody>
- <jsp:scriptlet>
- <![CDATA[
- renderGridBody(context, component, false);
- ]]>
- </jsp:scriptlet>
- </tbody>
- </table>
- <span class="dr-sdt-ho" id="#{clientId}:nho"
><br/></span>
- </span>
- </div>
- </div>
-
- <div id="#{clientId}_GridFooterTemplate"
class="dr-sdt-inlinebox" style="#{fStyle}; width:
#{component.attributes['width']};">
- <iframe id="#{clientId}:fs" class="dr-sdt-substrate"
src="" scrolling="no" frameborder="0" >
<br/></iframe>
- <div style="display: block; width: width: #{sumWidth}px;">
- <span class="dr-sdt-tmplbox dr-sdt-fb"
id="#{clientId}:footer:FrozenBox">
- <table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
+ </jsp:scriptlet>
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, true);
- ]]>
- </jsp:scriptlet>
- <tfoot>
- <tr class="dr-sdt-fr rich-std-footer-row
#{component.attributes['footerClass']}">
- <jsp:scriptlet>
- <![CDATA[
- renderFooters(context, component,true);
- ]]>
- </jsp:scriptlet>
- </tr>
- </tfoot>
- </table>
- </span>
+ <f:call name="contributorsEncodeHere"/>
+ <script id="#{clientId}_grid_create_scripts"
type="text/javascript">
+ //<![CDATA[
+
+ #{this:getJavaScriptVarName(context, component)} =
#{this:createClientScrollableGrid(context, component)};
+ #{this:getScriptContributions(context, component)};
- <span class="dr-sdt-tmplbox dr-sdt-nb"
id="#{clientId}:footer:NormalBox">
- <table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
-
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, false);
- ]]>
- </jsp:scriptlet>
- <col width="1"/>
- <tfoot>
- <tr class="dr-sdt-fr rich-std-footer-row
#{component.attributes['footerClass']}">
- <jsp:scriptlet>
- <![CDATA[
- renderFooters(context, component,false);
- ]]>
- </jsp:scriptlet>
- <th></th>
- </tr>
- </tfoot>
- </table>
- </span>
- </div>
- </div>
-
- <input type="hidden" name="#{clientId}_hc"
id="#{clientId}_hc"/>
- <input type="hidden" name="#{clientId}_state_input"
id="#{clientId}_state_input"/>
- <input type="hidden" name="#{clientId}_options_input"
id="#{clientId}_options_input"/>
- <input type="hidden" name="#{clienId}_rows_input"
id="#{clientId}_rows_input" value="#{rows_count}"/>
- <input type="button" name="#{clientId}_submit_input"
id="#{clientId}_submit_input"
onclick="#{this:getRowsAjaxUpdate(context,component)}"
style="display:none"/>
- <jsp:scriptlet>
- <![CDATA[
- renderHiddenScrollInput(context, component);
- ]]>
- </jsp:scriptlet>
-
- <f:call name="contributorsEncodeHere"/>
- <script id="#{clientId}_grid_create_scripts"
type="text/javascript">
- //<![CDATA[
-
- #{this:getJavaScriptVarName(context, component)} =
#{this:createClientScrollableGrid(context, component)};
- #{this:getScriptContributions(context, component)};
-
- // ]]>
- </script>
- <f:call name="tearDownState"/>
- </div>
+ // ]]>
+ </script>
+ <f:call name="tearDownState"/>
+ </div>
+ </td>
+ </tr>
+ <jsp:scriptlet>
+ <![CDATA[
+ facet = component.getFacet("footer");
+ if (null != facet && facet .isRendered()) {
+ ]]>
+ </jsp:scriptlet>
+ <tr>
+ <td>
+ <u:insertFacet name="footer" />
+ </td>
+ </tr>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
+ </tbody>
+ </table>
</f:root>