JBoss Rich Faces SVN: r8101 - in trunk/test-applications/seleniumTest/src/main/webapp/pages: panelMenu and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-04-23 15:04:14 -0400 (Wed, 23 Apr 2008)
New Revision: 8101
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/panelBar/panelBarDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/panelBar/panelBarTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
Log:
Selenium tests, some descriptions added.
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/panelBar/panelBarDescription.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/panelBar/panelBarDescription.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/panelBar/panelBarDescription.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -1,5 +1,30 @@
-<html>
-<table border="1" style="border-color: #F1EEE9" cellpadding="5" cellspacing="0">
-
-</table>
+<html>
+<table border="1" style="border-color: #F1EEE9" cellpadding="5"
+ cellspacing="0">
+ <tr>
+ <th></th>
+ <th>Action</th>
+ <th>Result</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Click item 2</td>
+ <td>Second item is active, other items are closed</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Click simple button</td>
+ <td>Second item is active, other items are closed</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Click item 3</td>
+ <td>Third item is active, other items are closed</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Click ajax button</td>
+ <td>Third item is active, other items are closed</td>
+ </tr>
+</table>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/panelBar/panelBarTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/panelBar/panelBarTest.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/panelBar/panelBarTest.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -33,8 +33,8 @@
</rich:panelBar>
<br/>
- <h:commandButton id="button_simple" value="Submit" />
- <a4j:commandButton id="button_ajax" value="Submit" reRender="panelBar" />
+ <h:commandButton id="button_simple" value="Simple submit" />
+ <a4j:commandButton id="button_ajax" value="Ajax submit" reRender="panelBar" />
<br/>
</ui:define>
<ui:define name="description">
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuDescription.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuDescription.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuDescription.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -1,5 +1,62 @@
-<html>
-<table border="1" style="border-color: #F1EEE9" cellpadding="5" cellspacing="0">
-
-</table>
+<html>
+<table border="1" style="border-color: #F1EEE9" cellpadding="5"
+ cellspacing="0">
+ <tr>
+ <th></th>
+ <th>Action</th>
+ <th colspan="3">Result</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Click 'Ajax group' for multiple panel</td>
+ <td>Input value == 'pGroup1'</td>
+ <td>Output value == 1</td>
+ <td><b>Item 1</b> is opened</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Click 'Server group' for multiple panel</td>
+ <td>Input value == 'pGroup2'</td>
+ <td>Output value == 2</td>
+ <td><b>Item 1</b> and <b>Item 2</b> are opened</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Click 'Client group' for multiple panel</td>
+ <td></td>
+ <td></td>
+ <td><b>Item 1</b>, <b>Item 2</b> and <b>Item 3</b> are opened</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Click 'Disabled group' for multiple panel</td>
+ <td colspan="3">Nothing happens</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Click 'Ajax group' for single panel</td>
+ <td>Input value == 'pGroup1_single'</td>
+ <td>Output value == 3</td>
+ <td><b>Item 1</b> is opened</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Click 'Server group' for single panel</td>
+ <td>Input value == 'pGroup2_single'</td>
+ <td>Output value == 4</td>
+ <td><b>Item 1</b> opened, other are opened</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Click 'Client group' for single panel</td>
+ <td></td>
+ <td></td>
+ <td><b>Item 3</b> is opened, other are opened</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Click 'Disabled group' for multiple panel</td>
+ <td colspan="3">Nothing happens</td>
+ </tr>
+</table>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -8,68 +8,79 @@
<ui:composition template="../../layout/template.xhtml">
<ui:define name="style">
- .link {margin: 0px 5px}
+ .link {margin: 0px 5px}
+
+ .component_div {
+ border: 1px solid blue;
+ margin: 2px;
+ }
</ui:define>
- <ui:define name="component">
- <rich:panelMenu id="pMenu" >
- <rich:panelMenuGroup id="pGroup1" expandMode="ajax"
- label="Ajax group"
- action="#{panelBean.increment}"
- actionListener="#{panelBean.actionListener}"
- reRender="_value,_value2" >
- <rich:panelMenuItem id="pItem1"
- label="Item 1"
- action="#{panelBean.action1}"
- actionListener="#{panelBean.actionListener}" />
- </rich:panelMenuGroup>
- <rich:panelMenuGroup id="pGroup2" expandMode="server"
- label="Server group"
- action="#{panelBean.increment}"
- actionListener="#{panelBean.actionListener}" >
- <rich:panelMenuItem id="pItem2"
- label="Item 2" />
- </rich:panelMenuGroup>
- <rich:panelMenuGroup id="pGroup3"
- label="Client group">
- <rich:panelMenuItem id="pItem3"
- label="Item 3" />
- </rich:panelMenuGroup>
- <rich:panelMenuGroup id="pGroup4" disabled="true"
- label="Disabled group" >
- <rich:panelMenuItem id="pItem4"
- label="Item 4" />
- </rich:panelMenuGroup>
- </rich:panelMenu>
+ <ui:define name="component">
+ <h:panelGroup layout="block" styleClass="component_div" >
+ <b>Multiple</b>
+ <rich:panelMenu id="pMenu" >
+ <rich:panelMenuGroup id="pGroup1" expandMode="ajax"
+ label="Ajax group"
+ action="#{panelBean.increment}"
+ actionListener="#{panelBean.actionListener}"
+ reRender="_value,_value2" >
+ <rich:panelMenuItem id="pItem1"
+ label="Item 1"
+ action="#{panelBean.action1}"
+ actionListener="#{panelBean.actionListener}" />
+ </rich:panelMenuGroup>
+ <rich:panelMenuGroup id="pGroup2" expandMode="server"
+ label="Server group"
+ action="#{panelBean.increment}"
+ actionListener="#{panelBean.actionListener}" >
+ <rich:panelMenuItem id="pItem2"
+ label="Item 2" />
+ </rich:panelMenuGroup>
+ <rich:panelMenuGroup id="pGroup3"
+ label="Client group">
+ <rich:panelMenuItem id="pItem3"
+ label="Item 3" />
+ </rich:panelMenuGroup>
+ <rich:panelMenuGroup id="pGroup4" disabled="true"
+ label="Disabled group" >
+ <rich:panelMenuItem id="pItem4"
+ label="Item 4" />
+ </rich:panelMenuGroup>
+ </rich:panelMenu>
+ </h:panelGroup>
- <rich:panelMenu id="pMenu_single" expandSingle="true" >
- <rich:panelMenuGroup id="pGroup1_single" expandMode="ajax"
- label="Ajax group"
- action="#{panelBean.increment}"
- actionListener="#{panelBean.actionListener}"
- reRender="_value,_value2" >
- <rich:panelMenuItem id="pItem1_single"
- label="Item 1"
- action="#{panelBean.action2}"
- actionListener="#{panelBean.actionListener}" />
- </rich:panelMenuGroup>
- <rich:panelMenuGroup id="pGroup2_single" expandMode="server"
- label="Server group"
- action="#{panelBean.increment}"
- actionListener="#{panelBean.actionListener}" >
- <rich:panelMenuItem id="pItem2_single"
- label="Item 2" />
- </rich:panelMenuGroup>
- <rich:panelMenuGroup id="pGroup3_single"
- label="Client group">
- <rich:panelMenuItem id="pItem3_single"
- label="Item 3" />
- </rich:panelMenuGroup>
- <rich:panelMenuGroup id="pGroup4_single" disabled="true"
- label="Disabled group" >
- <rich:panelMenuItem id="pItem4_single"
- label="Item 4" />
- </rich:panelMenuGroup>
- </rich:panelMenu>
+ <h:panelGroup layout="block" styleClass="component_div" >
+ <b>Single</b>
+ <rich:panelMenu id="pMenu_single" expandSingle="true" >
+ <rich:panelMenuGroup id="pGroup1_single" expandMode="ajax"
+ label="Ajax group"
+ action="#{panelBean.increment}"
+ actionListener="#{panelBean.actionListener}"
+ reRender="_value,_value2" >
+ <rich:panelMenuItem id="pItem1_single"
+ label="Item 1"
+ action="#{panelBean.action2}"
+ actionListener="#{panelBean.actionListener}" />
+ </rich:panelMenuGroup>
+ <rich:panelMenuGroup id="pGroup2_single" expandMode="server"
+ label="Server group"
+ action="#{panelBean.increment}"
+ actionListener="#{panelBean.actionListener}" >
+ <rich:panelMenuItem id="pItem2_single"
+ label="Item 2" />
+ </rich:panelMenuGroup>
+ <rich:panelMenuGroup id="pGroup3_single"
+ label="Client group">
+ <rich:panelMenuItem id="pItem3_single"
+ label="Item 3" />
+ </rich:panelMenuGroup>
+ <rich:panelMenuGroup id="pGroup4_single" disabled="true"
+ label="Disabled group" >
+ <rich:panelMenuItem id="pItem4_single"
+ label="Item 4" />
+ </rich:panelMenuGroup>
+ </rich:panelMenu>
+ </h:panelGroup>
<br/>
<h:inputText value="#{panelBean.value}" id="_value"></h:inputText>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelDescription.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelDescription.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelDescription.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -1,5 +1,53 @@
-<html>
-<table border="1" style="border-color: #F1EEE9" cellpadding="5" cellspacing="0">
-
-</table>
+<html>
+<table border="1" style="border-color: #F1EEE9" cellpadding="5"
+ cellspacing="0">
+ <tr>
+ <th></th>
+ <th>Action</th>
+ <th colspan="3">Result</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Click client s. toggle panel</td>
+ <td></td>
+ <td></td>
+ <td>Client panel is opened</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Click client s. toggle panel</td>
+ <td></td>
+ <td></td>
+ <td>Client panel is closed</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Click ajax s. toggle panel</td>
+ <td>Input value == 'panel1'</td>
+ <td>Output value == 1</td>
+ <td>Ajax panel is opened</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Click ajax s. toggle panel</td>
+ <td>Input value == 'panel1'</td>
+ <td>Output value == 2</td>
+ <td>Ajax panel is closed</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Click server s. toggle panel</td>
+ <td>Input value == 'panel2'</td>
+ <td>Output value == 3</td>
+ <td>Server panel is opened</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Click server s. toggle panel</td>
+ <td>Input value == 'panel2'</td>
+ <td>Output value == 4</td>
+ <td>Server panel is closed</td>
+ </tr>
+
+</table>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelDescription.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelDescription.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelDescription.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -1,5 +1,36 @@
-<html>
-<table border="1" style="border-color: #F1EEE9" cellpadding="5" cellspacing="0">
-
-</table>
+<html>
+<table border="1" style="border-color: #F1EEE9" cellpadding="5"
+ cellspacing="0">
+ <tr>
+ <th></th>
+ <th>Action</th>
+ <th colspan="3">Result</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Click tab2</td>
+ <td>Input value == 'tab2'</td>
+ <td>Output value == 2</td>
+ <td><b>Tab two</b> is active</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Click tab1</td>
+ <td>Input value == 'tab1'</td>
+ <td>Output value == 1</td>
+ <td><b>Tab one</b> is active</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Click tab3</td>
+ <td colspan="3">Nothing changed</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Click tab4</td>
+ <td></td>
+ <td></td>
+ <td><b>Tab four</b> is active</td>
+ </tr>
+</table>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -13,28 +13,32 @@
<ui:define name="component">
<rich:tabPanel id="panel1" switchType="ajax" >
<rich:tab label="tab1"
- id="tab1"
- action="#{panelBean.action1}"
- actionListener="#{panelBean.actionListener}"
- switchType="server"
- >
+ id="tab1"
+ action="#{panelBean.action1}"
+ actionListener="#{panelBean.actionListener}"
+ switchType="server"
+ >
+ <h:outputText value="Tab one" />
</rich:tab>
<rich:tab label="tab2"
- id="tab2"
- action="#{panelBean.action2}"
- actionListener="#{panelBean.actionListener}"
- reRender="_value,_value2"
- >
+ id="tab2"
+ action="#{panelBean.action2}"
+ actionListener="#{panelBean.actionListener}"
+ reRender="_value,_value2"
+ >
+ <h:outputText value="Tab two" />
</rich:tab>
<rich:tab label="tab3"
- id="tab3"
- disabled="true"
- >
+ id="tab3"
+ disabled="true"
+ >
+ <h:outputText value="Tab three" />
</rich:tab>
<rich:tab label="tab4"
- id="tab4"
- switchType="client"
- >
+ id="tab4"
+ switchType="client"
+ >
+ <h:outputText value="Tab four" />
</rich:tab>
</rich:tabPanel>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelDescription.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelDescription.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelDescription.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -1,5 +1,73 @@
-<html>
-<table border="1" style="border-color: #F1EEE9" cellpadding="5" cellspacing="0">
-
-</table>
+<html>
+<table border="1" style="border-color: #F1EEE9" cellpadding="5"
+ cellspacing="0">
+ <tr>
+ <th></th>
+ <th>Action</th>
+ <th colspan="3">Result</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Click 'Ajax next' link</td>
+ <td>Input value == 'ajax_next'</td>
+ <td>Output value == 1</td>
+ <td><b>State two</b> is active</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Click 'Ajax one' link</td>
+ <td>Input value == 'ajax_one'</td>
+ <td>Output value == 2</td>
+ <td><b>State one</b> is active</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Click 'Ajax two' link</td>
+ <td>Input value == 'ajax_two'</td>
+ <td>Output value == 1</td>
+ <td><b>State two</b> is active</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Click 'Server next' link</td>
+ <td>Input value == 'server_next'</td>
+ <td>Output value == 2</td>
+ <td><b>State two</b> is active</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Click 'Server one' link</td>
+ <td>Input value == 'server_one'</td>
+ <td>Output value == 3</td>
+ <td><b>State one</b> is active</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Click 'Server two' link</td>
+ <td>Input value == 'server_two'</td>
+ <td>Output value == 4</td>
+ <td><b>State two</b> is active</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Click 'Client next' link</td>
+ <td></td>
+ <td></td>
+ <td><b>State two</b> is active</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Click 'Client one' link</td>
+ <td></td>
+ <td></td>
+ <td><b>State one</b> is active</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Click 'Client two' link</td>
+ <td></td>
+ <td></td>
+ <td><b>State two</b> is active</td>
+ </tr>
+</table>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-04-23 18:39:27 UTC (rev 8100)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-04-23 19:04:14 UTC (rev 8101)
@@ -8,71 +8,88 @@
<ui:composition template="../../layout/template.xhtml">
<ui:define name="style">
- .link {margin: 0px 5px}
+ .link {margin: 0px 5px}
+
+ .component_div {
+ border: 1px solid blue;
+ margin: 2px;
+ }
</ui:define>
- <ui:define name="component">
- <rich:togglePanel id="panel_ajax" switchType="ajax" initialState="one"
- stateOrder="one,two">
- <f:facet name="one">
- <h:outputText id="ajax_state_one" value="State One" />
- </f:facet>
- <f:facet name="two">
- <h:outputText id="ajax_state_two" value="State Two" />
- </f:facet>
- </rich:togglePanel>
- <rich:toggleControl id="ajax_next" for="panel_ajax"
- action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
- <h:outputText value="Next" />
- </rich:toggleControl>
- <rich:toggleControl id="ajax_one" for="panel_ajax" switchToState="one"
- action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
- <h:outputText value="One" />
- </rich:toggleControl>
- <rich:toggleControl id="ajax_two" for="panel_ajax" switchToState="two"
- action="#{panelBean.action1}" actionListener="#{panelBean.actionListener}" >
- <h:outputText value="Two" />
- </rich:toggleControl>
+ <ui:define name="component">
+ <h:panelGroup layout="block" styleClass="component_div" >
+ <rich:togglePanel id="panel_ajax" switchType="ajax" initialState="one"
+ stateOrder="one,two">
+ <f:facet name="one">
+ <h:outputText id="ajax_state_one" value="State One" />
+ </f:facet>
+ <f:facet name="two">
+ <h:outputText id="ajax_state_two" value="State Two" />
+ </f:facet>
+ </rich:togglePanel>
+ <rich:toggleControl id="ajax_next" for="panel_ajax"
+ action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
+ <h:outputText value="Ajax next" />
+ </rich:toggleControl>
+ <br />
+ <rich:toggleControl id="ajax_one" for="panel_ajax" switchToState="one"
+ action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
+ <h:outputText value="Ajax one" />
+ </rich:toggleControl>
+ <br />
+ <rich:toggleControl id="ajax_two" for="panel_ajax" switchToState="two"
+ action="#{panelBean.action1}" actionListener="#{panelBean.actionListener}" >
+ <h:outputText value="Ajax two" />
+ </rich:toggleControl>
+ </h:panelGroup>
- <rich:togglePanel id="panel_server" switchType="server" initialState="one"
- stateOrder="one,two">
- <f:facet name="one">
- <h:outputText id="server_state_one" value="State One" />
- </f:facet>
- <f:facet name="two">
- <h:outputText id="server_state_two" value="State Two" />
- </f:facet>
- </rich:togglePanel>
- <rich:toggleControl id="server_next" for="panel_server"
- action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
- <h:outputText value="Next" />
- </rich:toggleControl>
- <rich:toggleControl id="server_one" for="panel_server" switchToState="one"
- action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
- <h:outputText value="One" />
- </rich:toggleControl>
- <rich:toggleControl id="server_two" for="panel_server" switchToState="two"
- action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
- <h:outputText value="Two" />
- </rich:toggleControl>
+ <h:panelGroup layout="block" styleClass="component_div" >
+ <rich:togglePanel id="panel_server" switchType="server" initialState="one"
+ stateOrder="one,two">
+ <f:facet name="one">
+ <h:outputText id="server_state_one" value="State One" />
+ </f:facet>
+ <f:facet name="two">
+ <h:outputText id="server_state_two" value="State Two" />
+ </f:facet>
+ </rich:togglePanel>
+ <rich:toggleControl id="server_next" for="panel_server"
+ action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
+ <h:outputText value="Server next" />
+ </rich:toggleControl>
+ <br />
+ <rich:toggleControl id="server_one" for="panel_server" switchToState="one"
+ action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
+ <h:outputText value="Server one" />
+ </rich:toggleControl>
+ <br />
+ <rich:toggleControl id="server_two" for="panel_server" switchToState="two"
+ action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
+ <h:outputText value="Server two" />
+ </rich:toggleControl>
+ </h:panelGroup>
- <rich:togglePanel id="panel_client" switchType="client" initialState="one"
- stateOrder="one,two">
- <f:facet name="one">
- <h:outputText id="client_state_one" value="State One" />
- </f:facet>
- <f:facet name="two">
- <h:outputText id="client_state_two" value="State Two" />
- </f:facet>
- </rich:togglePanel>
- <rich:toggleControl id="client_next" for="panel_client" >
- <h:outputText value="Next" />
- </rich:toggleControl>
- <rich:toggleControl id="client_one" for="panel_client" switchToState="one" >
- <h:outputText value="One" />
- </rich:toggleControl>
- <rich:toggleControl id="client_two" for="panel_client" switchToState="two" >
- <h:outputText value="Two" />
- </rich:toggleControl>
+ <h:panelGroup layout="block" styleClass="component_div" >
+ <rich:togglePanel id="panel_client" switchType="client" initialState="one"
+ stateOrder="one,two">
+ <f:facet name="one">
+ <h:outputText id="client_state_one" value="State One" />
+ </f:facet>
+ <f:facet name="two">
+ <h:outputText id="client_state_two" value="State Two" />
+ </f:facet>
+ </rich:togglePanel>
+ <rich:toggleControl id="client_next" for="panel_client" >
+ <h:outputText value="Client next" />
+ </rich:toggleControl>
+ <br />
+ <rich:toggleControl id="client_one" for="panel_client" switchToState="one" >
+ <h:outputText value="Client one" />
+ </rich:toggleControl>
+ <br />
+ <rich:toggleControl id="client_two" for="panel_client" switchToState="two" >
+ <h:outputText value="Client two" />
+ </rich:toggleControl>
+ </h:panelGroup>
<br/>
<a4j:outputPanel ajaxRendered="true" >
16 years, 8 months
JBoss Rich Faces SVN: r8100 - trunk/ui/drag-drop/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-23 14:39:27 -0400 (Wed, 23 Apr 2008)
New Revision: 8100
Modified:
trunk/ui/drag-drop/src/main/config/component/dragSupport.xml
trunk/ui/drag-drop/src/main/config/component/dropSupport.xml
Log:
http://jira.jboss.com/jira/browse/RF-3212
Modified: trunk/ui/drag-drop/src/main/config/component/dragSupport.xml
===================================================================
--- trunk/ui/drag-drop/src/main/config/component/dragSupport.xml 2008-04-23 17:49:24 UTC (rev 8099)
+++ trunk/ui/drag-drop/src/main/config/component/dragSupport.xml 2008-04-23 18:39:27 UTC (rev 8100)
@@ -58,13 +58,6 @@
Disable default action for target event (append "return false;" to JavaScript)
</description>
</property>
- <property>
- <name>onsubmit</name>
- <classname>java.lang.String</classname>
- <description>
- JavaScript code for call before submission of ajax event
- </description>
- </property>
<property>
<name>grabCursors</name>
Modified: trunk/ui/drag-drop/src/main/config/component/dropSupport.xml
===================================================================
--- trunk/ui/drag-drop/src/main/config/component/dropSupport.xml 2008-04-23 17:49:24 UTC (rev 8099)
+++ trunk/ui/drag-drop/src/main/config/component/dropSupport.xml 2008-04-23 18:39:27 UTC (rev 8100)
@@ -50,13 +50,6 @@
Disable default action for target event (append "return false;" to JavaScript)
</description>
</property>
- <property>
- <name>onsubmit</name>
- <classname>java.lang.String</classname>
- <description>
- JavaScript code for call before submission of ajax event
- </description>
- </property>
<property>
<name>acceptCursors</name>
16 years, 8 months
JBoss Rich Faces SVN: r8099 - trunk/framework/impl/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-23 13:49:24 -0400 (Wed, 23 Apr 2008)
New Revision: 8099
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
Log:
BaseGradient updated
Modified: trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2008-04-23 17:36:29 UTC (rev 8098)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2008-04-23 17:49:24 UTC (rev 8099)
@@ -224,6 +224,13 @@
dim.height);
drawGradient(g2d, rect, firstLayer, gradientHeight);
+
+ rect = new Rectangle2D.Float(
+ 0,
+ 0,
+ dim.width,
+ gradientHeight / 2);
+
drawGradient(g2d, rect, secondLayer, gradientHeight / 2);
}
}
16 years, 8 months
JBoss Rich Faces SVN: r8098 - in trunk/test-applications/jsp/src/main: webapp/Columns and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-04-23 13:36:29 -0400 (Wed, 23 Apr 2008)
New Revision: 8098
Modified:
trunk/test-applications/jsp/src/main/java/columns/Columns.java
trunk/test-applications/jsp/src/main/webapp/Columns/Columns.jsp
trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp
Log:
sortBy,comparator, column inside columnGroup
Modified: trunk/test-applications/jsp/src/main/java/columns/Columns.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/columns/Columns.java 2008-04-23 15:31:53 UTC (rev 8097)
+++ trunk/test-applications/jsp/src/main/java/columns/Columns.java 2008-04-23 17:36:29 UTC (rev 8098)
@@ -1,10 +1,16 @@
package columns;
import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Map;
+import org.richfaces.model.Ordering;
+
+import orderingList.OrderingList;
+
import util.data.Data;
-public class Columns {
+public class Columns implements Comparator{
private String[] statusIcon = { "/pics/error.gif", "/pics/fatal.gif",
"/pics/info.gif", "/pics/passed.gif", "/pics/warn.gif" };
private ArrayList<Data> data1;
@@ -16,11 +22,12 @@
private String end;
private String width;
private String title;
+ private Ordering[] orderings = new Ordering[100];
private int colspan;
private int rowspan;
private boolean breakBefore;
private boolean sortable;
- private boolean dataTableRendered;
+ private boolean dataTableRendered;
public Columns() {
this.columns = "3";
this.begin = "0";
@@ -175,4 +182,20 @@
public void setDataTableRendered(boolean dataTableRendered) {
this.dataTableRendered = dataTableRendered;
}
+
+ public Ordering[] getOrderings() {
+ return orderings;
+ }
+
+ public void setOrderings(Ordering[] orderings) {
+ this.orderings = orderings;
+ }
+
+ public int compare(Object arg0, Object arg1) {
+ System.out.println("=====columns comparator work=====");
+ Data data1 = (Data)arg0;
+ Data data2 = (Data)arg1;
+ return data1.getStr0().compareTo(data2.getStr0());
+ }
+
}
Modified: trunk/test-applications/jsp/src/main/webapp/Columns/Columns.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Columns/Columns.jsp 2008-04-23 15:31:53 UTC (rev 8097)
+++ trunk/test-applications/jsp/src/main/webapp/Columns/Columns.jsp 2008-04-23 17:36:29 UTC (rev 8098)
@@ -33,8 +33,9 @@
</rich:column>
<rich:columns value="#{columns.data2}" var="d2" footerClass="#{style.footerClass}" headerClass="#{style.headerClass}" breakBefore="#{columns.breakBefore}" colspan="#{columns.colspan}"
- columns="#{columns.columns}" index="index" rowspan="#{columns.rowspan}" sortable="#{columns.sortable}"
- begin="#{columns.begin}" end="#{columns.end}" width="#{columns.width}" style="#{style.style}" styleClass="#{style.styleClass}">
+ columns="#{columns.columns}" index="index" rowspan="#{columns.rowspan}"
+ begin="#{columns.begin}" end="#{columns.end}" width="#{columns.width}" style="#{style.style}" styleClass="#{style.styleClass}"
+ comparator="#{columns}" sortBy="#{d2.str0}" selfSorted="true" sortOrder="#{columns.orderings[index]}"dir="LTR">
<f:facet name="header">
<h:outputText value="header #{d2.int0}"></h:outputText>
</f:facet>
@@ -93,4 +94,22 @@
<h:outputText value="#{data.str0}"></h:outputText>
</rich:columns>
</rich:dataTable>
+ <rich:spacer height="20" width="150"></rich:spacer>
+
+ <rich:dataTable value="#{columns.data1}" var="cust">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="Data" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <rich:column sortBy="#{cust.str0}" selfSorted="true">
+ <h:outputText value="#{cust.str0}"/>
+ <f:facet name="header">
+ <h:outputText value="#1"></h:outputText>
+ </f:facet>
+ </rich:column>
+</rich:dataTable>
+
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp 2008-04-23 15:31:53 UTC (rev 8097)
+++ trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp 2008-04-23 17:36:29 UTC (rev 8098)
@@ -44,14 +44,11 @@
<h:outputText value="width:"></h:outputText>
<h:inputText value="#{columns.width}" onchange="submit();">
- </h:inputText>
-
- <h:outputText value="sortable"></h:outputText>
- <h:selectBooleanCheckbox value="#{columns.sortable}" onchange="submit();">
- </h:selectBooleanCheckbox>
+ </h:inputText>
<h:outputText value="breakBefore:"></h:outputText>
<h:selectBooleanCheckbox value="#{columns.breakBefore}" onchange="submit();">
</h:selectBooleanCheckbox>
+
</h:panelGrid>
</f:subview>
\ No newline at end of file
16 years, 8 months
JBoss Rich Faces SVN: r8097 - in trunk/ui/scrollableDataTable/src/main: javascript/ClientUI/common/utils and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-04-23 11:31:53 -0400 (Wed, 23 Apr 2008)
New Revision: 8097
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.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
trunk/ui/scrollableDataTable/src/main/resources/org/richfaces/renderkit/html/css/scrollable-data-table.xcss
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-cell.jspx
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-footer-cell.jspx
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-itself.jspx
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
Log:
RF-2761
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-04-23 15:31:53 UTC (rev 8097)
@@ -125,20 +125,6 @@
}
};
- private final ColumnVisitor colsRenderer = new ExtendedColumnVisitor(){
-
- public void renderContent(FacesContext context, UIComponent column, ResponseWriter writer, ScrollableDataTableRendererState state) throws IOException {
- writer.startElement("col", column);
- getUtils().writeAttribute(writer, "width", getColumnWidth(column));
- getUtils().writeAttribute(writer, "style", column.getAttributes().get("style"));
- //int cell_index = state.getCellIndex();
- //Object columnClass = state.getColumnClass(cell_index);
- //if(columnClass!=null) getUtils().writeAttribute(writer, "class", columnClass);
-
- writer.endElement("col");
- }
- };
-
private final ColumnVisitor headerCellRenderer = new ExtendedColumnVisitor(){
public void renderContent(FacesContext context, UIComponent column, ResponseWriter writer, ScrollableDataTableRendererState state) throws IOException {
@@ -171,6 +157,7 @@
variables.setVariable("cell_index", new Integer(cell_index));
variables.setVariable("sepOffset", new Integer(sepOffset));
variables.setVariable("headerColumnClass", state.getColumnClass());
+ variables.setVariable("columnWidth", width);
Boolean sorting = getColumnSorting(state.getGrid(), cell_index);
if (sorting != null) {
if (sorting.booleanValue()) {
@@ -332,9 +319,9 @@
ColumnWalker.iterateOverColumns(context, grid, cellRenderer, writer, state);
if(!state.isFrozenPart()){
writer.startElement("td", grid);
- getUtils().writeAttribute(writer, "class","dr-sdt-bc rich-sdt-column-cell " + state.getColumnClass(state.getCellIndex()));
+ getUtils().writeAttribute(writer, "class","dr-sdt-bc dr-sdt-c-f rich-sdt-column-cell " + state.getColumnClass(state.getCellIndex()));
writer.startElement(HTML.DIV_ELEM, grid);
- getUtils().writeAttribute(writer, "class","dr-sdt-bcbody");
+ getUtils().writeAttribute(writer, "class","dr-sdt-cbody");
writer.endElement(HTML.DIV_ELEM);
writer.endElement("td");
}
@@ -416,9 +403,9 @@
writer, baseClientId);
}
writer.startElement("td", grid);
- getUtils().writeAttribute(writer, "class","dr-sdt-bc rich-sdt-column-cell " + state.getColumnClass(state.getCellIndex()));
+ getUtils().writeAttribute(writer, "class","dr-sdt-bc dr-sdt-c-f rich-sdt-column-cell " + state.getColumnClass(state.getCellIndex()));
writer.startElement(HTML.DIV_ELEM, grid);
- getUtils().writeAttribute(writer, "class","dr-sdt-bcbody");
+ getUtils().writeAttribute(writer, "class","dr-sdt-cbody");
writer.endElement(HTML.DIV_ELEM);
writer.endElement("td");
writer.endElement("tr");
@@ -554,46 +541,9 @@
state.setFrozenPart(isFrozen);
state.setClientId(grid.getClientId(context));
state.setSepOffset(new Integer(0));
- if (!isFrozen || state.getFrozenColumnCount() > 0) {
- writer.startElement(HTML.TR_ELEMENT, grid);
- getUtils().writeAttribute(
- writer,
- "class",
- "dr-sdt-hr rich-std-header-row"
- + grid.getAttributes().get("headerClass"));
- ColumnWalker.iterateOverColumns(context, grid, headerCellRenderer,
- writer, state);
- if (!isFrozen) {
- writer.startElement(HTML.th_ELEM, grid);
- getUtils().writeAttribute(writer, "class",
- "dr-sdt-hc rich-sdt-header-cell");
- writer.startElement(HTML.DIV_ELEM, grid);
- getUtils().writeAttribute(writer, "class", "dr-sdt-hcbody");
- writer.endElement(HTML.DIV_ELEM);
- writer.endElement(HTML.th_ELEM);
- }
- writer.endElement(HTML.TR_ELEMENT);
- }
+ ColumnWalker.iterateOverColumns(context, grid, headerCellRenderer, writer, state);
}
- public void renderCols(FacesContext context, UIScrollableDataTable grid, boolean isFrozen) throws IOException{
-
- ResponseWriter writer = context.getResponseWriter();
- final ScrollableDataTableRendererState state = ScrollableDataTableRendererState.getRendererState(context);
-
- if(isFrozen){
- state.setColumType(COLUMN_FROZEN_TYPE);
- }else{
- state.setColumType(COLUMN_NORMAL_TYPE);
- }
-
- state.setClientId(grid.getClientId(context));
- state.setFrozenColumnCount(ScrollableDataTableUtils.getFrozenColumnsCount(grid));
- state.setFrozenPart(isFrozen);
- ColumnWalker.iterateOverColumns(context, grid, colsRenderer, writer, state);
- }
-
-
public void renderFooters(FacesContext context, UIScrollableDataTable grid, boolean isFrozen) throws IOException{
ResponseWriter writer = context.getResponseWriter();
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2008-04-23 15:31:53 UTC (rev 8097)
@@ -314,6 +314,20 @@
this._d = new Date().getTime();
};
+Utils.getRule = function (className) {
+ var rule = null;
+ var sheets = document.styleSheets;
+ for (var j = 0; !rule && j < sheets.length; j++) {
+ var rules = sheets[j].cssRules ? sheets[j].cssRules: sheets[j].rules;
+ for (var i = 0; !rule && i < rules.length; i++) {
+ if (rules[i].selectorText.toLowerCase() == ("." + className.toLowerCase())) {
+ rule = rules[i];
+ }
+ }
+ }
+ return rule;
+};
+
Array.prototype.unbreakableEach = function(f) {
for (var i = 0; i < this.length; i++) {
f(this[i], i);
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2008-04-23 15:31:53 UTC (rev 8097)
@@ -105,8 +105,6 @@
},
adjustColumnWidth: function(index, width) {
this.getHeader().adjustColumnWidth(index, width);
- this.getBody().adjustColumnWidth(index, width);
- if(this.getFooter()) this.getFooter().adjustColumnWidth(index, width);
this.updateLayout();
this.getHeader().agjustSeparators();
this.element.fire("grid:onresizecolumn",{index:index, width:width});
@@ -127,23 +125,6 @@
this.getHeader().getColumns()[index].minWidth = width;
return true;
},
- getColumnsTotalWidth: function() {
- var totalWidth = 0;
- var columns = this.getHeader().getColumns();
- for(var i=0; i<columns.length; i++) {
- totalWidth += columns[i].width;
- }
- return totalWidth;
- },
- getColumnsFrozenWidth: function() {
- var totalWidth = 0;
- var columns = this.getHeader().getColumns();
- var i = 0;
- while(i<columns.length && columns[i].frozen) {
- totalWidth += columns[i++].width;
- }
- return totalWidth;
- },
invalidate: function(params) {
this.getBody().invalidate(params);
},
@@ -153,24 +134,6 @@
this.adjustColumnWidth(i, columns[i].width);
}
},
- quickFind: function(column, text, startRow) {
- var start = startRow || 0;
- var searchText = ".*" + text + ".*";
- var searchReg = new RegExp(searchText, 'i');
- var rowIndex = -1;
- var body = this.getBody();
- var rowsCount = body.rowsCount;
- for (var i = start; i < rowsCount; i++) {
- var currentTextInGrid = body.getCellText(i, column);
- currentTextInGrid = currentTextInGrid.replace(/(<[^<]*>)/g,'');
- if (currentTextInGrid.search(searchReg) != -1) {
- rowIndex = i;
- break;
- }
- }
-
- return rowIndex;
- },
ensureVisible: function(index) {
this.getBody().ensureVisible(index);
},
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-04-23 15:31:53 UTC (rev 8097)
@@ -137,19 +137,6 @@
parseTemplate: function(templFrozen, templNormal) {
var result = false;
if(templNormal && templNormal.rows && templNormal.rows.length != 0) {
- var columns = this.grid.getHeader().getColumns();
- var i=0, j=0;
- var cols = this.templFrozen.getElement().getElementsByTagName("col");
- for(i=0; i<cols.length; i++) {
- columns[j].bodyCol = $(cols[i]);
- j++;
- }
- cols = this.templNormal.getElement().getElementsByTagName("col");
- for(i=0; i<cols.length; i++) {
- columns[j].bodyCol = $(cols[i]);
- j++;
- }
-
this.rowsCount = Math.min(templNormal.rows.length, this.grid.dataModel.getCount());
//if(ClientUILib.isGecko) {
@@ -196,7 +183,9 @@
return;
}
- var totalWidth = this.grid.getColumnsTotalWidth();
+ var frozenContentWidth = this.fTable.offsetWidth;
+ var totalWidth = frozenContentWidth + this.nTable.offsetWidth;
+
this.scrollBox.moveTo(0, 0);
var height = this.element.offsetHeight;
var width = this.element.offsetWidth;
@@ -208,8 +197,6 @@
var fixH = this.grid.getFooter() ? this.grid.getFooter().element.offsetHeight : 0;
if(fixH > height) fixH = 0;
- var frozenContentWidth = this.grid.getColumnsFrozenWidth();
-
this.frozenContentBox.moveTo(0, 0);
this.contentBox.moveTo(frozenContentWidth, 0);
this.sizeBox.moveTo(0, 0);
@@ -252,7 +239,6 @@
}
var scrollPos = Math.min(totalWidth - viewWidth, scrollLeft);
this.grid.adjustScrollPosition(scrollPos);
- this.setFakeColumnWidth();
},
adjustScrollPosition: function(pos) {
this.templNormal.moveToX(-pos);
@@ -332,24 +318,7 @@
this.startLoadData();
}.bind(this), this.grid.dataModel.getRequestDelay());
},
- adjustColumnWidth: function(column, width) {
- var bodyCol = this.grid.getHeader().getColumns()[column].bodyCol;
- if (bodyCol) {
- bodyCol.width = width>0 ? width : 1;
- }
- },
- setFakeColumnWidth: function() {
- var columns = this.grid.getHeader().getColumns();
- var bodyCell = columns.last().bodyCol;
- if(bodyCell) bodyCell.width = 1;
- var width = this.container.getElement().offsetWidth - this.fTable.offsetWidth - this.nTable.offsetWidth;
- if (width < 1) {
- width = 1;
- }
- if(bodyCell) bodyCell.width = width;
- },
-
startLoadData: function() {
if(this.updateStarted) {
this._setPendingTask(this._getPendingTask());
@@ -686,18 +655,6 @@
return options;
},
- getCellText: function(row, column) {
- var tbl = this.templFrozen.getElement().rows[row].cells;
- var fcount = tbl.length;
- var index = column;
- if(index >= fcount) {
- index -= fcount;
- tbl = this.templNormal.getElement().rows[row].cells;
- }
-
- var cell = document.getElementsByClassName("dr-sdt-bcbody", tbl[index]);
- return (cell && cell.length && cell.length>0) ? cell[0].innerHTML : "";
- },
ensureVisible: function (index) {
if(index>=0 && index<this.grid.dataModel.getCount()) {
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2008-04-23 15:31:53 UTC (rev 8097)
@@ -31,9 +31,6 @@
throw(errMsg);
}
- // Set dimensions
- this.setHeight(this.defaultHeight);
- this.setWidth(this.defaultWidth);
this.controlCreated = true;
},
parseTemplate: function(template) {
@@ -87,41 +84,15 @@
ch = ch.nextSibling;
}
- var columns = this.grid.getHeader().getColumns();
- var i=0;
- var cols = $A(this.headerFrozenRow.getElement().getElementsByTagName("col"));
- cols.each(function(col) {
- columns[i].footerCol = $(col);
- i++;
- });
- cols = $A(this.headerRow.getElement().getElementsByTagName("col"));
- cols.each(function(col) {
- columns[i].footerCol = $(col);
- i++;
- });
-
this.helpObj = new ClientUI.common.box.Box(this.frozenContentBox.getElement(), null, true);
- this.defaultWidth = this.grid.getHeader().defaultWidth;
- this.defaultHeight = this.headerRow.getElement().rows[0].cells[0].offsetHeight;
- if(ClientUILib.isGecko) {
- this.defaultHeight -= this.getBorderWidth("tb") + this.getPadding("tb");
- //this.defaultWidth -= this.getBorderWidth("lr") + this.getPadding("lr");
- }
this.frozenSubstrate = new ClientUI.common.box.Box(this.grid.getElement().id + ":fs", this.getElement());
this.frozenSubstrate.getElement().name = this.getElement().id + "FRFrm";
- this.frozenSubstrate.setHeight(this.defaultHeight);
+ this.frozenSubstrate.setHeight(this.headerRow.element.offsetHeight);
return true;
},
updateSize: function() {
- this.defaultWidth = this.grid.getHeader().defaultWidth;
- this.defaultHeight = this.headerRow.getElement().rows[0].cells[0].offsetHeight;
- if(ClientUILib.isGecko) {
- this.defaultHeight -= this.getBorderWidth("tb") + this.getPadding("tb");
- //this.defaultWidth -= this.getBorderWidth("lr") + this.getPadding("lr");
- }
- this.setHeight(this.defaultHeight);
- this.setWidth(this.defaultWidth);
+ this.setHeight(this.headerRow.element.offsetHeight);
},
updateLayout: function($super) {
if(!this.controlCreated || !this.grid.controlCreated) {
@@ -130,41 +101,22 @@
$super();
var height = this.element.offsetHeight;
- var totalWidth = this.grid.getColumnsTotalWidth();
- var frozenContentWidth = this.grid.getColumnsFrozenWidth();
+ var frozenContentWidth = this.frozenContentBox.getElement().offsetWidth;
- this.contentBox.setWidth(Math.max(this.getWidth(), totalWidth));
this.contentBox.setHeight(height);
this.contentBox.moveTo(frozenContentWidth - this.grid.getScrollOffset(), 0);
- this.frozenContentBox.setWidth(frozenContentWidth);
this.frozenContentBox.setHeight(height);
this.frozenContentBox.moveTo(0, 0);
- var frozenContentWidth = this.grid.getBody().frozenContentBox.getWidth();
var viewWidth = this.grid.getBody().scrollBox.getViewportWidth();
this.container.setWidth(viewWidth);
this.setWidth(viewWidth);
this.frozenSubstrate.setWidth(frozenContentWidth);
- this.setFakeColumnWidth();
},
adjustScrollPosition: function(pos) {
- this.contentBox.moveToX(this.grid.getColumnsFrozenWidth()-pos);
+ this.contentBox.moveToX(this.frozenContentBox.getElement().offsetWidth - pos);
},
- adjustColumnWidth: function(column, width) {
- var columns = this.grid.getHeader().getColumns();
- columns[column].footerCol.width = width>0 ? width : 1;
- },
- setFakeColumnWidth: function() {
- var columns = this.grid.getHeader().getColumns();
- columns.last().footerCol.width = 1;
- var width = this.grid.getElement().offsetWidth - this.headerRow.getElement().offsetWidth;
- if (width < 1) {
- width = 1;
- }
- columns.last().footerCol.width = width;
- },
-
hideColumn: function(index, frozen) {
var rows;
if(frozen) {
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-04-23 15:31:53 UTC (rev 8097)
@@ -46,9 +46,6 @@
throw(errMsg);
}
- // Set dimensions
- this.setHeight(this.defaultHeight);
- this.setWidth(this.defaultWidth);
this.controlCreated = true;
this.agjustSeparators();
},
@@ -108,24 +105,18 @@
var fcount = rows.length?rows[0].cells.length:0;
var ncount = this.headerRow.getElement().rows[0].cells.length;
var columns = new Array(fcount + ncount);
- var defaultWidth = 0;
- var defaultHeight = 0;
var eventCellMouseDown = this.eventCellMouseDown.bind(this);
// Get columns information
- var i = 0, h, j=0, cell;
- var cols = this.headerFrozenRow.getElement().getElementsByTagName("col");
+ var i = 0, j=0, cell;
this.frozenCells = fcount?this.headerFrozenRow.getElement().rows[0].cells:[];
var ids = this.grid.options.ids;
var count = this.frozenCells.length;
for(i=0; i<count; i++) {
- Utils.trace(i);
cell = this.frozenCells[i];
columns[j] = {
columnId: ids[i],
- col: cols[i],
- width: parseInt(cols[i].width),
styleClass: cell.className,
id: cell.id,
align: cell.align,
@@ -135,20 +126,12 @@
frozen: true,
fixedWidth: Validators.getBoolean(cell.getAttribute("fixedWidth"), false),
sortable: Validators.getBoolean(cell.getAttribute("sortable"), false),
- sorted: Validators.getBoolean(cell.getAttribute("sorted"), "desc")
+ sorted: Validators.getBoolean(cell.getAttribute("sorted"), "desc"),
+ style : Utils.getRule("dr-sdt-c-" + j).style
};
- Utils.trace(i+"a");
-
if(columns[j].sortable)
Event.observe(cell, 'click', eventCellMouseDown);
- Utils.trace(i+"a1");
- h = cell.offsetHeight;
- Utils.trace(i+"a2");
- if(h > defaultHeight) defaultHeight = h;
- defaultWidth += columns[j].width;
columns[j].object = new ClientUI.common.box.InlineBox(cell, null, true);
-
- Utils.trace(i+"b");
var details = this._getCellElements(j);
// separator
columns[j].sep = new ClientUI.common.box.InlineBox(details[0], null, true);
@@ -165,10 +148,8 @@
//columns[j].sortDesc = new ClientUI.common.box.Box(details[1], null, true);
//columns[j].sortAsc = new ClientUI.common.box.Box(details[2], null, true);
j++;
- Utils.trace(i+"c");
}
- cols = this.headerRow.getElement().getElementsByTagName("col");
this.cells = this.headerRow.getElement().rows[0].cells;
count = this.cells.length;
for(i=0; i<count; i++) {
@@ -176,8 +157,6 @@
columns[j] = {
columnId: ids[i],
- col: cols[i],
- width: parseInt(cols[i].width),
styleClass: cell.className,
id: cell.id,
align: cell.align,
@@ -187,14 +166,12 @@
frozen: false,
fixedWidth: Validators.getBoolean(cell.getAttribute("fixedWidth"), false),
sortable: Validators.getBoolean(cell.getAttribute("sortable"), false),
- sorted: null
+ sorted: null,
+ style : Utils.getRule("dr-sdt-c-" + (( i < count - 1 ) ? j : "f")).style
};
if(columns[j].sortable)
Event.observe(cell, 'click', eventCellMouseDown);
- h = cell.offsetHeight;
- if(h > defaultHeight) defaultHeight = h;
- defaultWidth += columns[j].width;
columns[j].object = new ClientUI.common.box.InlineBox(cell, null, true);
var details = this._getCellElements(j);
@@ -218,13 +195,6 @@
}
this._columns = columns;
- this.defaultHeight = defaultHeight;
- this.defaultWidth = defaultWidth;
- if(ClientUILib.isGecko) {
- this.defaultWidth -= this.getBorderWidth("lr") + this.getPadding("lr");
- this.defaultHeight -= this.getBorderWidth("tb") + this.getPadding("tb");
- }
-
this.frozenSubstrate = new ClientUI.common.box.Box(this.gridId + ":hs", this.getElement());
this.frozenSubstrate.getElement().name = this.getElement().id + "HRFrm";
this.frozenSubstrate.setHeight(this.headerRow.element.offsetHeight);
@@ -256,40 +226,7 @@
}
},
updateSize: function() {
- var defaultWidth = 0, defaultHeight = 0;
- var i = 0, h;
- var columns = this._columns;
- var cols = $A(this.headerFrozenRow.getElement().getElementsByTagName("col"));
- var count = this.frozenCells.length;
- for(j=0; j<count; j++) {
- cell = this.frozenCells[j];
- if(i<columns.length) {
- columns[i].width = parseInt(cols[j].width);
- h = cell.offsetHeight;
- if(h > defaultHeight) defaultHeight = h;
- defaultWidth += columns[i].width;
- }
- i++;
- }
- cols = $A(this.headerRow.getElement().getElementsByTagName("col"));
- count = this.cells.length;
- for(j=0; j<count; j++) {
- cell = this.cells[j];
- if(i<columns.length) {
- columns[i].width = parseInt(cols[j].width);
-
- h = cell.offsetHeight;
- if(h > defaultHeight) defaultHeight = h;
- defaultWidth += columns[i].width;
- }
- i++;
- }
-
- this.defaultHeight = defaultHeight;
- this.defaultWidth = defaultWidth;
-
- this.setHeight(this.defaultHeight);
- this.setWidth(this.defaultWidth);
+ this.setHeight(this.headerRow.element.offsetHeight);
this.agjustSeparators();
this.updateHeaders();
},
@@ -299,14 +236,11 @@
}
$super();
var height = this.element.offsetHeight;
- var totalWidth = this.grid.getColumnsTotalWidth();
- var frozenContentWidth = this.grid.getColumnsFrozenWidth();
+ var frozenContentWidth = this.frozenContentBox.getElement().offsetWidth;
- this.contentBox.setWidth(Math.max(this.getWidth(), totalWidth));
this.contentBox.setHeight(height);
this.contentBox.moveTo(frozenContentWidth - this.grid.getScrollOffset(), 0);
this.headerRow.setHeight(height);
- this.frozenContentBox.setWidth(frozenContentWidth);
this.frozenContentBox.setHeight(height);
this.frozenContentBox.moveTo(0, 0);
this.headerFrozenRow.setHeight(height);
@@ -374,11 +308,11 @@
var pos = this.dragColumnInfo.sep.getX();
if(!this.getColumns()[index].frozen) {
- pos += this.grid.getColumnsFrozenWidth() - this.grid.getScrollOffset();
+ pos += this.frozenContentBox.getElement().offsetWidth - this.grid.getScrollOffset();
}
this.dragColumnInfo.originalX = pos;
this.columnSplitter.show();
- this.columnSplitter.setHeight(this.defaultHeight + this.grid.getBody().contentBox.element.offsetHeight);
+ this.columnSplitter.setHeight(this.headerRow.element.offsetHeight + this.grid.getBody().contentBox.element.offsetHeight);
this.columnSplitter.moveTo(pos, 0);
},
_hideSplitter: function() {
@@ -392,7 +326,7 @@
this.columnSplitter.setWidth(10);
},
adjustScrollPosition: function(pos) {
- this.contentBox.moveToX(this.grid.getColumnsFrozenWidth()-pos);
+ this.contentBox.moveToX(this.frozenContentBox.getElement().offsetWidth - pos);
},
OnCellMouseDown: function(event) {
var el = Event.element(event);
@@ -454,18 +388,18 @@
},
adjustColumnWidth: function(column, width) {
- this._columns[column].col.width = width>0 ? width : 1;
+ this._columns[column].style.width = width +"px";
if(width<=0) this.getColumns()[column].sep.hide();
- this._columns[column].width = width;
},
setFakeColumnWidth: function() {
- this._columns.last().col.width = 1;
+ var style = this._columns.last().style;
+ style.width = "0px";
var width = this.grid.getElement().offsetWidth - this.headerRow.getElement().offsetWidth;
- if (width < 1) {
- width = 1;
+ if (width < 0) {
+ width = 0;
}
- this._columns.last().col.width = width;
+ style.width = width + "px";
},
hideColumn: function(index, frozen) {
Modified: trunk/ui/scrollableDataTable/src/main/resources/org/richfaces/renderkit/html/css/scrollable-data-table.xcss
===================================================================
--- trunk/ui/scrollableDataTable/src/main/resources/org/richfaces/renderkit/html/css/scrollable-data-table.xcss 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/resources/org/richfaces/renderkit/html/css/scrollable-data-table.xcss 2008-04-23 15:31:53 UTC (rev 8097)
@@ -35,7 +35,6 @@
* Header row
*/
.dr-sdt-hr {
- z-index:2;
}
/**
@@ -44,16 +43,11 @@
.dr-sdt-hc {
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
- overflow: hidden;
font-weight: normal;
- cursor: default;
box-sizing: border-box;
-moz-box-sizing: border-box;
-moz-outline: none;
-moz-user-focus: normal;
- padding: 0px 0px;
- white-space: nowrap;
- border-bottom-style: solid;
border-right-style: solid;
}
@@ -74,13 +68,11 @@
background-repeat: repeat-y;
cursor: e-resize;
font-size: 1px;
- top: 15%;
+ top: 0px;
width: 6px;
- height: 13px;
- overflow: hidden;
+ height: 100%;
position: absolute;
display: block;
- white-space: nowrap;
z-index: 60;
}
.dr-sdt-hsplit {
@@ -90,16 +82,6 @@
z-index: 100;
}
- /**
- * Header cell body
- */
- .dr-sdt-hcbody {
- white-space: nowrap;
- overflow: hidden;
- width: 100%;
- font-weight: normal;
- }
-
.dr-sdt-fb{
z-index: 50;
}
@@ -117,8 +99,6 @@
* Footer row
*/
.dr-sdt-fr {
- font-weight: normal;
- height: 22px;
border-top: 1px solid #cbc7b8; /* //TODO Which skin parameter must be here? */
}
@@ -128,40 +108,15 @@
.dr-sdt-fc {
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
- overflow: hidden;
font-weight: normal;
- cursor: default;
box-sizing: border-box;
-moz-box-sizing: border-box;
-moz-outline: none;
-moz-user-focus: normal;
border-right: 1px solid;
- height:21px !important;
- padding: 0px 0px;
- white-space: nowrap;
}
-
+
/**
- * Footer cell body
- */
- .dr-sdt-fcbody {
- cursor: default;
- font-weight: normal;
- padding: 3px 5px;
- white-space: nowrap;
- overflow: hidden;
- }
-
- .dr-sdt-fcbody1{
- cursor: default;
- font-weight: normal;
- padding: 0px 0px;
- white-space: nowrap;
- overflow: hidden;
- width: 100%;
- }
-
- /**
* ---------------------------------------------
* Body styles
* ---------------------------------------------
@@ -177,7 +132,6 @@
-moz-box-sizing: border-box;
-moz-outline: none;
-moz-user-focus: normal;
- cursor: default;
border-right: 1px solid;
border-bottom: 1px solid;
}
@@ -202,16 +156,13 @@
font-weight:bold; //TODO Which skin parameter must be here?
}
*/
- .dr-sdt-bcbody {
- cursor: default;
- font-weight: normal;
+ .dr-sdt-cbody {
white-space: nowrap;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
-moz-box-sizing: border-box;
-moz-outline: none;
- width: 100%;
height: 20px;
}
@@ -262,43 +213,23 @@
<u:selector name=".dr-sdt-hsplit">
<u:style name="border-right-color" skin="tipBorderColor" />
</u:selector>
- <u:selector name=".dr-sdt-hcbody">
- <u:style name="font-family" skin="generalFamilyFont" />
- <u:style name="font-size" skin="generalSizeFont" />
- </u:selector>
<u:selector name=".dr-sdt-fr">
<u:style name="background-color" skin="tableSubfooterBackgroundColor" />
- <u:style name="font-family" skin="generalFamilyFont" />
- <u:style name="font-size" skin="generalSizeFont" />
</u:selector>
<u:selector name=".dr-sdt-fc">
<u:style name="border-right-color" skin="tableBorderColor" />
- <u:style name="font-family" skin="generalFamilyFont" />
- <u:style name="font-size" skin="generalSizeFont" />
</u:selector>
- <u:selector name=".dr-sdt-fcbody">
- <u:style name="font-family" skin="generalFamilyFont" />
- <u:style name="font-size" skin="generalSizeFont" />
- </u:selector>
- <u:selector name=".dr-sdt-fcbody1">
- <u:style name="font-family" skin="generalFamilyFont" />
- <u:style name="font-size" skin="generalSizeFont" />
- </u:selector>
<u:selector name=".dr-sdt-bc">
<u:style name="border-right-color" skin="tableBorderColor" />
<u:style name="border-bottom-color" skin="tableBorderColor" />
</u:selector>
- <u:selector name=".dr-sdt-rb">
- <u:style name="font-family" skin="generalFamilyFont" />
- <u:style name="font-size" skin="generalSizeFont" />
- </u:selector>
<u:selector name=".dr-sdt-row-selected">
<u:style name="background-color" skin="additionalBackgroundColor" />
</u:selector>
<u:selector name=".dr-sdt-row-active">
<u:style name="color" skin="tabDisabledTextColor" />
</u:selector>
- <u:selector name=".dr-sdt-bcbody">
+ <u:selector name=".dr-sdt-cbody">
<u:style name="font-family" skin="generalFamilyFont" />
<u:style name="font-size" skin="generalSizeFont" />
</u:selector>
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-cell.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-cell.jspx 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-cell.jspx 2008-04-23 15:31:53 UTC (rev 8097)
@@ -12,7 +12,7 @@
>
<td class="dr-sdt-bc rich-sdt-column-cell #{columnClass} #{columnSortClass} #{component.attributes['styleClass']}" id="#{client_id}:c_#{cell_id}">
- <div id="#{client_id}:bc_#{cell_id}" class="dr-sdt-bcbody #{component.attributes['cellClass']}" style="#{component.attributes['cellStyle']}">
+ <div id="#{client_id}:bc_#{cell_id}" class="dr-sdt-cbody dr-sdt-c-#{cell_index} #{component.attributes['cellClass']}" style="#{component.attributes['cellStyle']}">
<vcp:body/>
</div>
</td>
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-footer-cell.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-footer-cell.jspx 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-footer-cell.jspx 2008-04-23 15:31:53 UTC (rev 8097)
@@ -12,7 +12,7 @@
>
<th class="dr-sdt-fc rich-sdt-footer-cell #{footerColumnClass} #{footerColumnSortClass} #{component.attributes['footerClass']}">
- <div id="#{client_id}:fc_#{cell_index}" class="dr-sdt-fcbody1">
+ <div id="#{client_id}:fc_#{cell_index}" class="dr-sdt-cbody dr-sdt-c-#{cell_index}">
<vcp:body/>
</div>
</th>
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx 2008-04-23 15:31:53 UTC (rev 8097)
@@ -13,7 +13,6 @@
>
<th class="dr-sdt-hc rich-sdt-header-cell #{headerColumnClass} #{headerColumnSortClass}" id="#{client_id}:hc_#{cell_index}" columnindex="#{cell_index}" sortable="#{component.attributes['sortable']}">
-
<jsp:scriptlet>
if(org.richfaces.component.util.ColumnUtil.isSortable(component)) {
@@ -22,6 +21,13 @@
}
</jsp:scriptlet>
+ <style>
+ <!--
+ .dr-sdt-c-#{cell_index} {
+ width: #{columnWidth}px;
+ }
+ -->
+ </style>
<vcp:body/>
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-itself.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-itself.jspx 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-itself.jspx 2008-04-23 15:31:53 UTC (rev 8097)
@@ -12,7 +12,7 @@
component="javax.faces.component.UIComponent"
>
-<div id="#{client_id}:hcb_#{cell_index}" class="dr-sdt-hcbody #{component.attributes['headerClass']}">
+<div id="#{client_id}:hcb_#{cell_index}" class="dr-sdt-cbody dr-sdt-c-#{cell_index} #{component.attributes['headerClass']}">
<vcp:body/>
<div align="right" id="#{client_id}:hs_#{cell_index}" class="dr-sdt-sort-icon">
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 2008-04-23 14:00:42 UTC (rev 8096)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2008-04-23 15:31:53 UTC (rev 8097)
@@ -91,39 +91,39 @@
<iframe id="#{clientId}:hs" class="dr-sdt-substrate" src="javascript:\'\'" 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>
-
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<thead>
- <jsp:scriptlet>
- <![CDATA[
- renderHeaders(context, component, true);
- ]]>
- </jsp:scriptlet>
+ <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"/>
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<thead>
- <jsp:scriptlet>
- <![CDATA[
- renderHeaders(context, component, false);
- ]]>
- </jsp:scriptlet>
+ <tr class="dr-sdt-hr rich-std-header-row #{component.attributes['headerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderHeaders(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <th class="dr-sdt-hc dr-sdt-c-f rich-sdt-header-cell">
+ <style>
+ <!--
+ .dr-sdt-c-f {
+ width: 0px;
+ }
+ -->
+ </style>
+ <div class="dr-sdt-cbody" />
+ </th>
+ </tr>
</thead>
</table>
</span>
@@ -138,13 +138,7 @@
</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>
+ <table id="#{clientId}:f" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tbody>
<jsp:scriptlet>
<![CDATA[
@@ -156,14 +150,7 @@
<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"/>
+ <table id="#{clientId}:n" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tbody>
<jsp:scriptlet>
<![CDATA[
@@ -181,13 +168,7 @@
<iframe id="#{clientId}:fs" class="dr-sdt-substrate" src="javascript:\'\'" 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>
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tfoot>
<tr class="dr-sdt-fr rich-std-footer-row #{component.attributes['footerClass']}">
<jsp:scriptlet>
@@ -201,14 +182,7 @@
</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"/>
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tfoot>
<tr class="dr-sdt-fr rich-std-footer-row #{component.attributes['footerClass']}">
<jsp:scriptlet>
@@ -216,8 +190,8 @@
renderFooters(context, component,false);
]]>
</jsp:scriptlet>
- <th class="dr-sdt-fc rich-sdt-footer-cell">
- <div class="dr-sdt-fcbody1" />
+ <th class="dr-sdt-fc dr-sdt-c-f rich-sdt-footer-cell">
+ <div class="dr-sdt-cbody" />
</th>
</tr>
</tfoot>
16 years, 8 months
JBoss Rich Faces SVN: r8096 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-04-23 10:00:42 -0400 (Wed, 23 Apr 2008)
New Revision: 8096
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
Log:
http://jira.jboss.com/jira/browse/RF-2859
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-04-23 14:00:26 UTC (rev 8095)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-04-23 14:00:42 UTC (rev 8096)
@@ -82,6 +82,15 @@
this.doSelectItem(this.findItemBySubstr(this.selectedItem.innerHTML.unescapeHTML()));
}
+
+ var items = this.getItems();
+ if (items.length != 0) {
+ this.listParent.show();
+ if (this.iframe) {
+ this.iframe.show();
+ }
+ }
+
if (this.selectFirstOnUpdate) {
var curItems = this.getItems();
if (curItems.length != 0) {
@@ -92,14 +101,7 @@
}
}
}
-
- var items = this.getItems();
- if (items.length != 0) {
- this.listParent.show();
- if (this.iframe) {
- this.iframe.show();
- }
- }
+
this.listParent.fire("rich:onlistcall", {});
},
16 years, 8 months
JBoss Rich Faces SVN: r8095 - trunk/ui/combobox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-04-23 10:00:26 -0400 (Wed, 23 Apr 2008)
New Revision: 8095
Modified:
trunk/ui/combobox/src/main/config/component/combobox.xml
Log:
http://jira.jboss.com/jira/browse/RF-3178?page=all
Modified: trunk/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/ui/combobox/src/main/config/component/combobox.xml 2008-04-23 13:59:40 UTC (rev 8094)
+++ trunk/ui/combobox/src/main/config/component/combobox.xml 2008-04-23 14:00:26 UTC (rev 8095)
@@ -293,8 +293,8 @@
<classname>boolean</classname>
</property>
<property hidden="true" existintag="false" exist="false" >
- <name>alt</name>
- <classname>java.lang.String</classname>
+ <name>maxlength</name>
+ <classname>int</classname>
</property>
</properties>
</component>
16 years, 8 months
JBoss Rich Faces SVN: r8094 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-04-23 09:59:40 -0400 (Wed, 23 Apr 2008)
New Revision: 8094
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
Log:
http://jira.jboss.com/jira/browse/RF-2859
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-04-23 12:50:12 UTC (rev 8093)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-04-23 13:59:40 UTC (rev 8094)
@@ -88,5 +88,16 @@
if (this.selectedItem) {
this.doNormalItem(this.selectedItem);
}
+ },
+
+ doActiveItem : function($super, item) {
+ $super(item);
+ // http://jira.jboss.com/jira/browse/RF-2859
+ item.style.width = this.list.scrollWidth + "px";
+ },
+
+ doNormalItem : function($super, item) {
+ $super(item);
+ item.style.width = "";
}
});
16 years, 8 months
JBoss Rich Faces SVN: r8093 - in trunk/ui/inputnumber-slider/src/main: resources/org/richfaces/renderkit/html/css and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-04-23 08:50:12 -0400 (Wed, 23 Apr 2008)
New Revision: 8093
Modified:
trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2495
Modified: trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2008-04-23 12:08:28 UTC (rev 8092)
+++ trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2008-04-23 12:50:12 UTC (rev 8093)
@@ -71,6 +71,7 @@
<name> width </name>
<classname>java.lang.String</classname>
<description> The width of a slider control</description>
+ <defaultvalue><![CDATA["200px"]]></defaultvalue>
</property>
<property hidden="true">
<name> height </name>
Modified: trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
===================================================================
--- trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss 2008-04-23 12:08:28 UTC (rev 8092)
+++ trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss 2008-04-23 12:50:12 UTC (rev 8093)
@@ -5,7 +5,7 @@
<f:verbatim><![CDATA[
.dr-insldr {
- width : 200px;
+ /*width : 200px;*/
height : 20px;
}
Modified: trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2008-04-23 12:08:28 UTC (rev 8092)
+++ trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2008-04-23 12:50:12 UTC (rev 8093)
@@ -218,7 +218,7 @@
},
maximumOffset: function(){
- return this.removePx(this.track.style.width || this.track.offsetWidth);
+ return this.removePx(this.track.style.width || this.track.offsetWidth || this.options.width);
},
removePx: function(e){
Modified: trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
===================================================================
--- trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2008-04-23 12:08:28 UTC (rev 8092)
+++ trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2008-04-23 12:50:12 UTC (rev 8093)
@@ -9,6 +9,8 @@
baseclass="org.richfaces.renderkit.InputNumberSliderRendererBase"
component="org.richfaces.component.UIInputNumberSlider"
>
+ <jsp:directive.page import="org.richfaces.component.util.HtmlUtil" />
+
<h:styles>css/slider.xcss</h:styles>
<h:scripts>new org.ajax4jsf.javascript.PrototypeScript(),script/SliderScript.js,/org/richfaces/renderkit/html/scripts/browser_info.js,/org/richfaces/renderkit/html/scripts/events.js</h:scripts>
<f:clientid var="clientId"/>
@@ -19,8 +21,19 @@
<f:resource name="org.richfaces.renderkit.html.images.SliderArrowImage" var="arrow" />
<f:resource name="org.richfaces.renderkit.html.images.SliderArrowSelectedImage" var="arrowSelected" />
+ <jsp:scriptlet>
+ <![CDATA[
+ String width = (String) component.getAttributes().get("width");
+ if (width == null || width.length() == 0) {
+ width = "200px";
+ } else {
+ width = HtmlUtil.qualifySize(width);
+ }
+ variables.setVariable("width", width);
+ ]]>
+ </jsp:scriptlet>
<table id="#{clientId}" border="0" cellpadding="0" cellspacing="0" class="dr-insldr rich-slider #{component.attributes['styleClass']}"
- style="#{style}" x:passThruWithExclusions="id,boundClass,tipClass,class,width,height,style,border">
+ style="width: #{width};#{style}" x:passThruWithExclusions="id,boundClass,tipClass,class,width,height,style,border">
<tbody>
<tr>
<jsp:scriptlet><![CDATA[
@@ -188,7 +201,8 @@
clientErrorMsg : "#{component.attributes['clientErrorMessage']}",
<f:call name="writeEventHandlerFunction"><f:parameter value="onslide" /></f:call>,
onchange : "#{component.attributes['onchange']}",
- required : #{component.attributes['required']}
+ required : #{component.attributes['required']},
+ width : "#{width}"
})
</script>
</td>
16 years, 8 months
JBoss Rich Faces SVN: r8092 - trunk/test-applications/jsp/src/main/webapp/styles.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-04-23 08:08:28 -0400 (Wed, 23 Apr 2008)
New Revision: 8092
Modified:
trunk/test-applications/jsp/src/main/webapp/styles/styles.css
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/styles/styles.css
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/styles/styles.css 2008-04-23 10:32:01 UTC (rev 8091)
+++ trunk/test-applications/jsp/src/main/webapp/styles/styles.css 2008-04-23 12:08:28 UTC (rev 8092)
@@ -45,7 +45,7 @@
}
.style {
- background: teal;
+ background: red;
border: solid 3px red;
font: bold 14px;
}
16 years, 8 months