JBoss Rich Faces SVN: r1339 - trunk/sandbox/scrollable-grid/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-27 10:46:57 -0400 (Wed, 27 Jun 2007)
New Revision: 1339
Modified:
trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-06-27 14:44:38 UTC (rev 1338)
+++ trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-06-27 14:46:57 UTC (rev 1339)
@@ -8,6 +8,12 @@
org.richfaces.component.html.HtmlScrollableGrid
</classname>
<superclass>org.richfaces.component.UIScrollableGrid</superclass>
+<!--
+ <test>
+ <classname>org.richfaces.component.html.HtmlScrollableGridTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
+-->
<description>
<![CDATA[ Scrollable Grid ]]>
</description>
@@ -22,7 +28,14 @@
<superclass>
org.ajax4jsf.framework.taglib.HtmlComponentTagBase
</superclass>
+ <!--
+ <test>
+ <classname>org.richfaces.taglib.ScrollableGridTagTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
+ -->
</tag>
+
<property>
<name>frozenColCount</name>
<classname>int</classname>
@@ -112,12 +125,22 @@
org.richfaces.component.html.HtmlScrollableGridColumn
</classname>
<superclass>org.richfaces.component.UIScrollableGridColumn</superclass>
+ <!--
+ <test>
+ <classname> org.richfaces.component.html.HtmlScrollableGridColumnTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test> -->
<tag>
<name>column</name>
<classname>org.richfaces.taglib.ScrollableGridColumnTag</classname>
<superclass>
org.ajax4jsf.framework.taglib.HtmlComponentTagBase
</superclass>
+ <!--
+ <test>
+ <classname>org.richfaces.taglib.ScrollableGridColumnTagTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test> -->
<description>
<![CDATA[ Scrollable Grid custom column impl]]>
</description>
17 years, 6 months
JBoss Rich Faces SVN: r1338 - trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-06-27 10:44:38 -0400 (Wed, 27 Jun 2007)
New Revision: 1338
Modified:
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-378 fixed
Modified: trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-06-27 14:33:09 UTC (rev 1337)
+++ trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-06-27 14:44:38 UTC (rev 1338)
@@ -576,9 +576,17 @@
var options = RichFaces.Menu.Layers.layers[this.layer.id].options;
var dir = 0;
+ var vDir = 0;
if (options.direction) {
- dir = options.direction.toUpperCase().indexOf('LEFT')!=-1?1:dir;
- dir = options.direction.toUpperCase().indexOf('RIGHT')!=-1?2:dir;
+ strDirection = options.direction.toUpperCase();
+ dir = strDirection.indexOf('LEFT')!=-1?1:dir;
+ dir = strDirection.indexOf('RIGHT')!=-1?2:dir;
+ if (dir>0) {
+ if (strDirection.indexOf('LEFT-UP')!=-1 ||
+ strDirection.indexOf('RIGHT-UP')!=-1) vDir = 1;
+ if (strDirection.indexOf('LEFT-DOWN')!=-1 ||
+ strDirection.indexOf('RIGHT-DOWN')!=-1) vDir = 2;
+ }
}
var layerLeft = right;
@@ -600,22 +608,26 @@
layerLeft = left - layerdim.width;
}
- if (layerTop + layerdim.height + labelOffset[1] - windowShift.top >= windowHeight) {
- var invisibleBottom = layerTop + layerdim.height + labelOffset[1] - windowShift.top - windowHeight;
- var items = this.layer.firstChild.childNodes;
- if (items.length > 1) {
- var lastItem = items[items.length-2];
-// var layerOffset = Position.cumulativeOffset(this.layer);
- var itemOffset = Position.positionedOffset(lastItem);
-// layerTop = top -(itemOffset[1]-layerOffset[1]);
- layerTop = top - itemOffset[1];
- if (layerTop < 0) {
- if (Math.abs(layerTop) > invisibleBottom) layerTop = top;
- }
- }
+ if (vDir != 2) {
+ if (layerTop + layerdim.height + labelOffset[1] - windowShift.top >= windowHeight
+ || vDir == 1) {
+ var invisibleBottom = layerTop + layerdim.height + labelOffset[1] - windowShift.top - windowHeight;
+ var items = this.layer.firstChild.childNodes;
+ if (items.length > 1) {
+ var lastItem = items[items.length-2];
+ // var layerOffset = Position.cumulativeOffset(this.layer);
+ var itemOffset = Position.positionedOffset(lastItem);
+ // layerTop = top -(itemOffset[1]-layerOffset[1]);
+ layerTop = top - itemOffset[1];
+ if (vDir == 0) {
+ if (layerTop < 0) {
+ if (Math.abs(layerTop) > invisibleBottom) layerTop = top;
+ }
+ }
+ }
+ }
+ }
- }
-
/* if (layerLeft + layerdim.width >= windowWidth) {
layerLeft = left - layerdim.width + RichFaces.Menu.Layers.shadowWidth;
}
17 years, 6 months
JBoss Rich Faces SVN: r1337 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-27 10:33:09 -0400 (Wed, 27 Jun 2007)
New Revision: 1337
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Add 2 methods:
1. reloadData - reload all data from server
2. updateRowCount - adjust new total count of rows
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-27 13:13:24 UTC (rev 1336)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-27 14:33:09 UTC (rev 1337)
@@ -207,6 +207,16 @@
},
hideColumn: function(column) {
this.adjustColumnWidth(column, 0);
+ },
+ reloadData: function() {
+ this.getBody().reloadData();
+ },
+ updateRowCount: function(newCount) {
+ var rowCount = parseInt(newCount);
+ if(rowCount>=0) {
+ this.dataModel.count = rowCount;
+ this.updateLayout();
+ }
}
});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-27 13:13:24 UTC (rev 1336)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-27 14:33:09 UTC (rev 1337)
@@ -749,6 +749,13 @@
this._onContentVScroll(this.scrollBox.getElement().scrollTop);
}
}
+ },
+ reloadData: function() {
+ this.currentPos = -(this.rowsCount*this.defaultRowHeight);
+ this.scrollBox.getElement().scrollTop = 0;
+ this.currRange.start = -this.rowsCount;
+ this.currRange.end = -1;
+ this._onContentVScroll(0);
},
_getRowIndex: function(rowId) {
return Number(rowId.split(this.grid.getElement().id)[1].split(":")[2]);
17 years, 6 months
JBoss Rich Faces SVN: r1336 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-27 09:13:24 -0400 (Wed, 27 Jun 2007)
New Revision: 1336
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
Log:
added info about Sybase EAServer
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2007-06-27 12:50:12 UTC (rev 1335)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2007-06-27 13:13:24 UTC (rev 1336)
@@ -113,6 +113,8 @@
<listitem>Glassfish (J2EE 5)</listitem>
<listitem>JBoss 3.2 - 4.0.x</listitem>
+
+ <listitem>Sybase EAServer 6.0.1</listitem>
</itemizedlist>
</section>
17 years, 6 months
JBoss Rich Faces SVN: r1335 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-27 08:50:12 -0400 (Wed, 27 Jun 2007)
New Revision: 1335
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
Log:
Add some fail checks
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-27 10:42:57 UTC (rev 1334)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-27 12:50:12 UTC (rev 1335)
@@ -87,8 +87,16 @@
else {
if(!target)
ClientUILib.log(ClientUILogger.ERROR, "DOM Element with id " + id + " not found for update.");
- if(!src)
+ if(!src) {
ClientUILib.log(ClientUILogger.ERROR, "RESPONSE Element with id " + id + " not found for update.");
+
+ // cleanup destination
+ if(target) {
+ for(var i=0; i<target.cells.length; i++) {
+ target.cells[i].innerHTML = "";
+ }
+ }
+ }
}
},
@@ -197,7 +205,8 @@
var dataModel = grid.dataModel;
var baseid = clientid;
- var rowsForUpdate = callbacks ? new Array(count) : null;
+ var countForUpdate = 0;
+ var rowsForUpdate = [];
for(i=0; i<count; i++) {
rowindex = startRow + i;
if(rowindex >= rowCount){
@@ -212,19 +221,22 @@
// just suspend operation for future
if(!rowsForUpdate[i]) rowsForUpdate[i] = {};
rowsForUpdate[i][suffix] = {index : rowindex, row : row};
+ countForUpdate++;
}
}
);
}
- if (callbacks) {
+ if (callbacks && countForUpdate>0) {
// process suspended processing
setTimeout(function(){
for(var i=0; i<count; i++) {
callbacks.unbreakableEach(
function(callback) {
- callback.call(grid, rowsForUpdate[i][":f:"]);
- callback.call(grid, rowsForUpdate[i][":n:"]);
+ if(rowsForUpdate[i]) {
+ if(rowsForUpdate[i][":f:"].row) callback.call(grid, rowsForUpdate[i][":f:"]);
+ if(rowsForUpdate[i][":n:"].row) callback.call(grid, rowsForUpdate[i][":n:"]);
+ }
}
);
}
17 years, 6 months
JBoss Rich Faces SVN: r1334 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-06-27 06:42:57 -0400 (Wed, 27 Jun 2007)
New Revision: 1334
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
Language correction
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-26 20:13:59 UTC (rev 1333)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-27 10:42:57 UTC (rev 1334)
@@ -53,7 +53,7 @@
<section>
<?dbhtml filename="WhatstructureofRichFacesSVNrepositoryis"?>
- <title>What structure of RichFaces SVN repository is?</title>
+ <title>What is the structure of RichFaces SVN repository?</title>
<para>RichFaces repository structure overview can be found <ulink
url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
>here</ulink>.</para>
@@ -70,7 +70,7 @@
<section>
<?dbhtml filename="IstheredemoforRichFacescomponents"?>
- <title>Is there demo for RichFaces 3.0.1 components?</title>
+ <title>Where could I find a demo for RichFaces 3.0.1 components?</title>
<para>Online demo Web applications that show the most important functionality of
RichFaces components are available <ulink
url="http://livedemo.exadel.com/richfaces-demo/">here</ulink>.</para>
@@ -95,8 +95,8 @@
<section>
<?dbhtml filename="WhyRichFaceslibrarycondataTablecomp"?>
- <title>Why RichFaces library contains <rich:dataTable> component if
- the standard <h:dataTable> exists?</title>
+ <title>Why RichFaces library contains <rich:dataTable> component, though there is
+ the standard <h:dataTable></title>
<para>The answer could be found <ulink
url="http://labs.jboss.com/wiki/RichFacesArticleDataTable"
>here</ulink>.</para>
@@ -132,8 +132,8 @@
<section>
<?dbhtml filename="Howtopreventmodalpanelfromclosure"?>
- <title>How to prevent modalPanel from closure if the validation inside fails?</title>
- <para>Simple code is placed below to provide such behavior.</para>
+ <title>How to prevent modalPanel from closing when the validation inside fails?</title>
+ <para>Simple code is placed below to provide such kind of behavior.</para>
<programlisting role="XML"><![CDATA[...
<ui:define name="body">
<f:verbatim>
@@ -220,14 +220,14 @@
<title>Is it possible to create dynamic menu using <rich:dropDownMenu>
component?</title>
<para><emphasis role="bold"><rich:dropDownMenu></emphasis> is a
- standard JSF component. So, creation the menu dynamically from the Java
+ standard JSF component. So, creation of the menu dynamically from the Java
Script code is the same as for any other jsf component.</para>
</section>
<section>
<?dbhtml filename="Isitpossibletocustomizelookofdatascroller"?>
- <title>Is it possible to customize look of dataScroller (the forward/back buttons)
- and replace them with images?</title>
+ <title>Is it possible to customize the look of dataScroller (the forward/back buttons)
+ and replace them with an images?</title>
<para>The answer is yes. Use facets: "first_disabled",
"last_disabled", "next_disabled",
"previous_disabled",
@@ -237,15 +237,15 @@
<section>
<?dbhtml filename="HowtocustomizesimpleTogglePanel"?>
- <title>How to customize simpleTogglePanel? I need to change icon for toggler.</title>
- <para>To customize icon for toggler use "openMarker" and
+ <title>How to customize simpleTogglePanel? I need to change an icon for a toggler.</title>
+ <para>To customize an icon for a toggler, use "openMarker" and
"closeMarker" facets.</para>
</section>
<section>
<?dbhtml filename="Howtoredirecttoanotherpage"?>
<title><rich:dropDown> component: How to redirect to another page?</title>
- <para>If you want to navigate to outside your application using external URL use
+ <para>If you want to navigate outside, when application uses an external URL, you should use the
following approach:</para>
<programlisting role="XML"><![CDATA[...
<rich:dropDownMenu>
@@ -260,7 +260,7 @@
</rich:dropDownMenu>
...
]]></programlisting>
- <para>Also online demo of using <emphasis role="bold"
+ <para>Also see the online demo <emphasis role="bold"
><rich:dropDownMenu></emphasis> component is available
<ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf"
@@ -271,9 +271,9 @@
<?dbhtml filename="CanthedropDownMenubeincludedintreenodes"?>
<title>Can dropDownMenu be included in tree nodes?</title>
<para>The <emphasis role="bold"><rich:dropDownMenu></emphasis> is
- designed keeping in mind that it should not be used for contextMenu purpose.
+ designed keeping in mind that it should not be used for a contextMenu purpose.
We have a <emphasis role="bold"><rich:contextMenu></emphasis>
- component in the TODO list. However, it will not schedule for the nearest
+ component in the TODO list. However, it is not schedule for the nearest
versions.</para>
</section>
@@ -329,7 +329,7 @@
<section>
<?dbhtml filename="Howtoremembercurrentselectedtab"?>
- <title>How to remember current selected tab?</title>
+ <title>How to remember the current selected tab?</title>
<para>To implement this feature use the "action" attribute of
<emphasis role="bold"><rich:tab></emphasis> and
"selectedTab" of the <emphasis role="bold"
@@ -348,7 +348,7 @@
<section>
<?dbhtml filename="Howtoretrievethecurrentvalue"?>
<title>How to retrieve the current value from the inputNumberSlider?</title>
- <para>To catch the value of the inputNumberSlider from the JavaScript you can use
+ <para>To catch the value of the inputNumberSlider from the JavaScrip, use
the following approach:</para>
<programlisting role="XML"><![CDATA[...
<rich:inputNumberSlider width="500" step="20"
17 years, 6 months
JBoss Rich Faces SVN: r1333 - in trunk: richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-26 16:13:59 -0400 (Tue, 26 Jun 2007)
New Revision: 1333
Modified:
trunk/richfaces/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss
trunk/richfaces/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss
trunk/richfaces/toolBar/src/main/resources/org/richfaces/renderkit/html/css/toolBar.xcss
trunk/sandbox/simpleTogglePanel2/src/main/resources/org/richfaces/renderkit/html/css/simpleTogglePanel2.xcss
Log:
Remove hard-coded skin parameters for fonts.
Modified: trunk/richfaces/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
===================================================================
--- trunk/richfaces/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2007-06-26 19:22:29 UTC (rev 1332)
+++ trunk/richfaces/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2007-06-26 20:13:59 UTC (rev 1333)
@@ -63,7 +63,7 @@
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="color" skin="headerTextColor"/> <!--headerTextColor-->
<u:style name="text-align" value="center"/>
- <u:style name="font-weight" value="bold"/>
+ <u:style name="font-weight" value="headerWeightFont"/>
<u:style name="font-size" skin="generalSizeFont"/> <!--generalSizeFont-->
<u:style name="font-family" skin="generalFamilyFont"/> <!--generalFamilyFont-->
</u:selector>
@@ -105,7 +105,7 @@
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="color" skin="generalTextColor"/> <!--headerTextColor-->
<u:style name="text-align" value="left"/>
- <u:style name="font-weight" value="bold"/>
+ <u:style name="font-weight" value="headerWeightFont"/>
<u:style name="font-size" skin="generalSizeFont"/> <!--generalSizeFont-->
<u:style name="font-family" skin="generalFamilyFont"/> <!--generalFamilyFont-->
</u:selector>
Modified: trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss
===================================================================
--- trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss 2007-06-26 19:22:29 UTC (rev 1332)
+++ trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss 2007-06-26 20:13:59 UTC (rev 1333)
@@ -31,9 +31,6 @@
border : 1px solid;
cursor : pointer;
}
-.dr-label-text-decor {
- font-weight : bold;
-}
.dr-menu-list-strut {
font-size : 0px;
@@ -56,6 +53,10 @@
</f:verbatim>
+<u:selector name=".dr-label-text-decor">
+ <u:style name="font-weight" skin="headerWeightFont" />
+</u:selector>
+
<u:selector name=".dr-menu-list-border">
<u:style name="border-color" skin="panelBorderColor" />
<u:style name="background-color" skin="additionalBackgroundColor" />
Modified: trunk/richfaces/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss
===================================================================
--- trunk/richfaces/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss 2007-06-26 19:22:29 UTC (rev 1332)
+++ trunk/richfaces/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss 2007-06-26 20:13:59 UTC (rev 1333)
@@ -61,8 +61,6 @@
.dr-tbpnl-cntnt {
border-width: 1px;
border-style: solid;
- font-size: 11px;
- font-family: verdana;
vertical-align: top;
}
@@ -161,6 +159,8 @@
<u:style name="background-color" skin="generalBackgroundColor"/>
<u:style name="color" skin="generalTextColor"/>
<u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
</u:selector>
<u:selector name=".dr-tbpnl-tb-sel">
Modified: trunk/richfaces/toolBar/src/main/resources/org/richfaces/renderkit/html/css/toolBar.xcss
===================================================================
--- trunk/richfaces/toolBar/src/main/resources/org/richfaces/renderkit/html/css/toolBar.xcss 2007-06-26 19:22:29 UTC (rev 1332)
+++ trunk/richfaces/toolBar/src/main/resources/org/richfaces/renderkit/html/css/toolBar.xcss 2007-06-26 20:13:59 UTC (rev 1333)
@@ -18,7 +18,7 @@
<u:selector name=".dr-toolbar-int">
<u:style name="font-size" skin="headerSizeFont" />
<u:style name="color" skin="headerTextColor" />
- <u:style name="font-weight" value="bold" />
+ <u:style name="font-weight" skin="headerWeightFont" />
<u:style name="font-family" skin="headerFamilyFont" />
<u:style name="padding" value="2px 10px 2px 10px" />
<u:style name="white-space" value="nowrap" />
Modified: trunk/sandbox/simpleTogglePanel2/src/main/resources/org/richfaces/renderkit/html/css/simpleTogglePanel2.xcss
===================================================================
--- trunk/sandbox/simpleTogglePanel2/src/main/resources/org/richfaces/renderkit/html/css/simpleTogglePanel2.xcss 2007-06-26 19:22:29 UTC (rev 1332)
+++ trunk/sandbox/simpleTogglePanel2/src/main/resources/org/richfaces/renderkit/html/css/simpleTogglePanel2.xcss 2007-06-26 20:13:59 UTC (rev 1333)
@@ -17,11 +17,8 @@
border-width: 1px;
border-style: solid;
background-color : #224986;
- font-size : 11px;
color : #ffffff;
cursor: pointer;
- font-weight : bold;
- font-family : verdana;
padding : 2px;
background-image : url(coll_panel_bg.gif);
background-position : top left;
@@ -30,9 +27,7 @@
.dr-stglpnl-b{
- font-size : 11px;
color : #000000;
- font-family : verdana;
padding : 10px;
text-align : left;
vertical-align : top;
@@ -52,6 +47,9 @@
<u:style name="color" skin="headerTextColor" />
<u:style name="font-weight" skin="headerWeightFont" />
<u:style name="font-family" skin="headerFamilyFont" />
+ <u:style name="background-image" >
+ <f:resource f:key="org.richfaces.renderkit.html.GradientA"/>
+ </u:style>
</u:selector>
<u:selector name=".dr-stglpnl-b">
<u:style name="background-color" skin="generalBackgroundColor" />
@@ -59,10 +57,5 @@
<u:style name="color" skin="panelTextColor" />
<u:style name="font-family" skin="generalFamilyFont" />
</u:selector>
-<u:selector name=".dr-stglpnl-h">
- <u:style name="background-image" >
- <f:resource f:key="org.richfaces.renderkit.html.GradientA"/>
- </u:style>
-</u:selector>
</f:template>
17 years, 6 months
JBoss Rich Faces SVN: r1332 - in trunk/richfaces/modal-panel/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-26 15:22:29 -0400 (Tue, 26 Jun 2007)
New Revision: 1332
Modified:
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-46
Modified: trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-06-26 18:32:56 UTC (rev 1331)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-06-26 19:22:29 UTC (rev 1332)
@@ -161,6 +161,9 @@
ModalPanel.panels.push(this);
+
+ this.eventFirstOnfocus = this.firstOnfocus.bindAsEventListener(this);
+ this.eventLastOnfocus = this.lastOnfocus.bindAsEventListener(this);
},
destroy: function() {
@@ -259,8 +262,110 @@
}
},
+ firstOnfocus: function(event) {
+ var firstHref = $(this.markerId.id + "FirstHref");
+ if (firstHref) {
+ firstHref.focus();
+ }
+ },
+
+ lastOnfocus: function(event) {
+ var lastHref = $(this.markerId.id + "LastHref");
+ if (lastHref) {
+ lastHref.focus();
+ }
+ },
+
+ isInModalPanel: function(input) {
+ var element = $(input);
+ if (!element)
+ return false;
+ while (element && element.tagName && element.tagName.toLowerCase != "body") {
+ if (element == this.cdiv)
+ return true;
+ element = element.parentNode;
+ }
+ return false;
+ },
+
+ processTabindexes: function(inputs, tabindex) {
+ if (!inputs || !tabindex || !inputs.length)
+ return tabindex;
+ for (var i = 0; i < inputs.length; i++) {
+ if (!this.isInModalPanel(inputs[i])) {
+ if (!this.firstOutside)
+ this.firstOutside = inputs[i];
+ this.lastOutside = inputs[i];
+ if (inputs[i].tabIndex) {
+ inputs[i].prevTabIndex = inputs[i].tabIndex;
+ inputs[i].tabIndex = tabindex;
+ }
+ if (inputs[i].accesskey) {
+ inputs[i].prevAccesskey = inputs[i].accesskey;
+ inputs[i].accesskey = undefined;
+ }
+ tabindex--;
+ }
+ }
+ return tabindex;
+ },
+
+ restoreTabindexes: function(inputs) {
+ if (!inputs || !inputs.length)
+ return;
+ for (var i = 0; i < inputs.length; i++) {
+ if (!this.isInModalPanel(inputs[i])) {
+ if (inputs[i].prevTabIndex)
+ inputs[i].tabIndex = inputs[i].prevTabIndex;
+ if (inputs[i].prevAccesskey)
+ inputs[i].accesskey = inputs[i].prevAccesskey;
+ }
+ }
+ },
+
+ preventFocus: function() {
+ var tabindex = 32768;
+ var inputs = document.getElementsByTagName("input");
+ tabindex = this.processTabindexes(inputs, tabindex);
+ var selects = document.getElementsByTagName("select");
+ tabindex = this.processTabindexes(selects, tabindex);
+ var buttons = document.getElementsByTagName("button");
+ tabindex = this.processTabindexes(buttons, tabindex);
+ var hrefs = document.getElementsByTagName("a");
+ tabindex = this.processTabindexes(hrefs, tabindex);
+
+ if (this.firstOutside) {
+ Event.observe(this.firstOutside, "focus", this.eventFirstOnfocus);
+ }
+ if (this.lastOutside) {
+ Event.observe(this.lastOutside, "focus", this.eventLastOnfocus);
+ }
+ if (RichFaces.navigatorType() != "MSIE")
+ this.lastOnfocus();
+ },
+
+ restoreFocus: function() {
+ var inputs = document.getElementsByTagName("input");
+ this.restoreTabindexes(inputs);
+ var selects = document.getElementsByTagName("select");
+ this.restoreTabindexes(selects);
+ var buttons = document.getElementsByTagName("button");
+ this.restoreTabindexes(buttons);
+ var hrefs = document.getElementsByTagName("a");
+ this.restoreTabindexes(hrefs);
+
+ if (this.firstOutside) {
+ Event.stopObserving(this.firstOutside, "focus", this.eventFirstOnfocus);
+ this.firstOutside = null;
+ }
+ if (this.lastOutside) {
+ Event.stopObserving(this.lastOutside, "focus", this.eventLastOnfocus);
+ this.lastOutside = null;
+ }
+ },
+
show: function(opts) {
- //this.disableDocumentFocusElements();
+ this.preventFocus();
if (!this.floatedToBody) {
this.parent = this.id.parentNode;
@@ -427,9 +532,9 @@
},
hide: function(opts) {
- //this.enableDocumentFocusElements();
+ this.restoreFocus();
- this.traverseSelects(true);
+ this.traverseSelects(true);
if (this.div.style.removeExpression) {
this.div.style.removeExpression("width");
Modified: trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-06-26 18:32:56 UTC (rev 1331)
+++ trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-06-26 19:22:29 UTC (rev 1332)
@@ -72,8 +72,10 @@
</div>
<div style="position: absolute; overflow: hidden; z-index: 2;"
- class="dr-mpnl-pnl" id="#{clientId}ContentDiv">
- <table style="height: 100%; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+ class="dr-mpnl-pnl" id="#{clientId}ContentDiv">
+
+ <table style="height: 100%; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+ <a href="#" style="position: absolute; left: -32000" id="#{clientId}FirstHref" >_</a>
<jsp:scriptlet>
<![CDATA[if(component.getFacet("header")!=null && component.getFacet("header").isRendered()) {]]>
</jsp:scriptlet>
@@ -99,17 +101,17 @@
</jsp:scriptlet>
<tr>
<td class="dr-mpnl-pnl-b rich-mpnl-body" valign="top">
- <vcp:body>
- <f:call name="renderChildren" />
- </vcp:body>
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
+ <f:clientid var="clientId"/>
+ <a href="#" style="position: absolute; left: -32001" id="#{clientId}LastHref" >_</a>
</td>
</tr>
</table>
</div>
</div>
- <f:clientid var="clientId"/>
-
<script type="text/javascript">
new ModalPanel('#{clientId}',
{
17 years, 6 months
JBoss Rich Faces SVN: r1331 - in trunk/sandbox-samples/scrollable-grid-demo/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-06-26 14:32:56 -0400 (Tue, 26 Jun 2007)
New Revision: 1331
Added:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java 2007-06-26 18:32:56 UTC (rev 1331)
@@ -0,0 +1,70 @@
+package org.richfaces.demo.datagrid.bean;
+
+public class Row {
+ private String cell1;
+ private String cell2;
+ private String cell3;
+ private String cell4;
+ private String cell5;
+ private String cell6;
+ private String cell7;
+ private String cell8;
+ public Row(String name) {
+ cell1 = name + " - cell1";
+ cell2 = name + " - cell2";
+ cell3 = name + " - cell3";
+ cell4 = name + " - cell4";
+ cell5 = name + " - cell5";
+ cell6 = name + " - cell6";
+ cell7 = name + " - cell7";
+ cell8 = name + " - cell8";
+ }
+ public String getCell1() {
+ return cell1;
+ }
+ public void setCell1(String cell1) {
+ this.cell1 = cell1;
+ }
+ public String getCell2() {
+ return cell2;
+ }
+ public void setCell2(String cell2) {
+ this.cell2 = cell2;
+ }
+ public String getCell3() {
+ return cell3;
+ }
+ public void setCell3(String cell3) {
+ this.cell3 = cell3;
+ }
+ public String getCell4() {
+ return cell4;
+ }
+ public void setCell4(String cell4) {
+ this.cell4 = cell4;
+ }
+ public String getCell5() {
+ return cell5;
+ }
+ public void setCell5(String cell5) {
+ this.cell5 = cell5;
+ }
+ public String getCell6() {
+ return cell6;
+ }
+ public void setCell6(String cell6) {
+ this.cell6 = cell6;
+ }
+ public String getCell7() {
+ return cell7;
+ }
+ public void setCell7(String cell7) {
+ this.cell7 = cell7;
+ }
+ public String getCell8() {
+ return cell8;
+ }
+ public void setCell8(String cell8) {
+ this.cell8 = cell8;
+ }
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java 2007-06-26 18:32:56 UTC (rev 1331)
@@ -0,0 +1,41 @@
+package org.richfaces.demo.datagrid.bean;
+
+import java.util.ArrayList;
+
+public class TestGridDataModelBuilder{
+ private ArrayList model1 = new ArrayList();
+ private ArrayList model2 = new ArrayList();
+ private ArrayList model3 = new ArrayList();
+
+ public TestGridDataModelBuilder() {
+ for (int i = 0; i < 1000; i++) {
+ model1.add(new Row("model1 - " + i));
+ model2.add(new Row("model2 - " + i));
+ model3.add(new Row("model3 - " + i));
+ }
+ }
+
+ public ArrayList getModel1() {
+ return model1;
+ }
+
+ public void setModel1(ArrayList model1) {
+ this.model1 = model1;
+ }
+
+ public ArrayList getModel2() {
+ return model2;
+ }
+
+ public void setModel2(ArrayList model2) {
+ this.model2 = model2;
+ }
+
+ public ArrayList getModel3() {
+ return model3;
+ }
+
+ public void setModel3(ArrayList model3) {
+ this.model3 = model3;
+ }
+}
\ No newline at end of file
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-06-26 17:54:39 UTC (rev 1330)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-06-26 18:32:56 UTC (rev 1331)
@@ -255,6 +255,12 @@
</managed-property>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>modelBuilder</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.bean.TestGridDataModelBuilder</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+
<lifecycle>
<phase-listener>org.richfaces.demo.benchmark.PhaseDemarcationNotifier</phase-listener>
</lifecycle>
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml 2007-06-26 18:32:56 UTC (rev 1331)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:sg="http://richfaces.ajax4jsf.org/scrollable-grid">
+
+ <ui:composition>
+ <sg:scrollable-grid value="#{modelBuilder.model1}" var="issues"
+ frozenColCount="3" first="0" rows="40" width="800px" height="500px">
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell1}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell2}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell3}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell4}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell5}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell6}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell7}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell8}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ </sg:scrollable-grid>
+ </ui:composition>
+</jsp:root>
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml 2007-06-26 18:32:56 UTC (rev 1331)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:sg="http://richfaces.ajax4jsf.org/scrollable-grid">
+
+ <ui:composition>
+ <sg:scrollable-grid value="#{modelBuilder.model2}" var="issues"
+ frozenColCount="3" first="0" rows="40" width="800px" height="500px">
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell1}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell2}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell3}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell4}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell5}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell6}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell7}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell8}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ </sg:scrollable-grid>
+ </ui:composition>
+</jsp:root>
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml 2007-06-26 18:32:56 UTC (rev 1331)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:sg="http://richfaces.ajax4jsf.org/scrollable-grid">
+
+ <ui:composition>
+ <sg:scrollable-grid value="#{modelBuilder.model3}" var="issues"
+ frozenColCount="3" first="0" rows="40" width="800px" height="500px">
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell1}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell2}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell3}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell4}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell5}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell6}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell7}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="header"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell8}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </sg:column>
+ </sg:scrollable-grid>
+ </ui:composition>
+</jsp:root>
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml 2007-06-26 18:32:56 UTC (rev 1331)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:sg="http://richfaces.ajax4jsf.org/scrollable-grid"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<body>
+<f:view>
+ <h:form>
+ <h:panelGroup>
+ <ui:include src="grid1.xhtml" />
+ </h:panelGroup>
+ </h:form>
+</f:view>
+</body>
+</html>
17 years, 6 months
JBoss Rich Faces SVN: r1330 - in trunk/sandbox/scrollable-grid/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-26 13:54:39 -0400 (Tue, 26 Jun 2007)
New Revision: 1330
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
Log:
little performance improvement
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-26 17:26:16 UTC (rev 1329)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-26 17:54:39 UTC (rev 1330)
@@ -157,7 +157,7 @@
defaultWidth += columns[j].width;
columns[j].object = new ClientUI.common.box.InlineBox(cell, null, true);
- var details = this._getCellElements(cell);
+ var details = this._getCellElements(j);
// separator
columns[j].sep = new ClientUI.common.box.InlineBox(details[0], null, true);
columns[j].sep.getElement().columnIndex = j;
@@ -207,7 +207,7 @@
defaultWidth += columns[j].width;
columns[j].object = new ClientUI.common.box.InlineBox(cell, null, true);
- var details = this._getCellElements(cell);
+ var details = this._getCellElements(j);
// separator
columns[j].sep = new ClientUI.common.box.InlineBox(details[0], null, true);
columns[j].sep.getElement().columnIndex = j;
@@ -247,26 +247,12 @@
return true;
},
- _getCellElements: function(cell) {
+ _getCellElements: function(column) {
var details = new Array(3);
- var spans = cell.getElementsByTagName("span");
- var count = spans ? spans.length : 0;
- var el, className;
- for(var i=0; i<count; i++) {
- el = spans[i];
- className = el.className;
- if(className && className.length>0) {
- if(className.indexOf("ClientUI_Grid_HSep")>=0) {
- details[0] = el;
- }
- else if(className.indexOf("sort-desc")>=0) {
- details[1] = el;
- }
- else if(className.indexOf("sort-asc")>=0) {
- details[2] = el;
- }
- }
- }
+ var clientId = this.grid.getElement().id;
+ details[0] = document.getElementById(clientId + ":hsep_" + column);
+ details[1] = document.getElementById(clientId + ":hsortd_" + column);
+ details[2] = document.getElementById(clientId + ":hsorta_" + column);
return details;
},
agjustSeparators: function() {
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-26 17:26:16 UTC (rev 1329)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-06-26 17:54:39 UTC (rev 1330)
@@ -25,8 +25,8 @@
</span>
</td>
<td>
- <span class="sort-desc" />
- <span class="sort-asc" />
+ <span id="#{client_id}:hsortd_#{cell_index}" class="sort-desc" />
+ <span id="#{client_id}:hsorta_#{cell_index}" class="sort-asc" />
</td>
</tr>
</tbody>
17 years, 6 months