JBoss Rich Faces SVN: r14416 - in branches/community/3.3.X/test-applications/regressionArea: regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7273 and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-29 14:31:03 -0400 (Fri, 29 May 2009)
New Revision: 14416
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7273/
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7273/Bean.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7273/
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7273/Test.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7273.xhtml
Modified:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/META-INF/MANIFEST.MF
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/resources/testng.xml
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/resources/META-INF/MANIFEST.MF
Log:
https://jira.jboss.org/jira/browse/RF-7273
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7273/Bean.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7273/Bean.java (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7273/Bean.java 2009-05-29 18:31:03 UTC (rev 14416)
@@ -0,0 +1,66 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.regressionarea.issues.rf7273;
+
+import javax.faces.component.UIComponent;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreeNode;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.event.NodeExpandedEvent;
+
+/**
+ * This test case for: <a href="https://jira.jboss.org/jira/browse/RF-7273">RF-7273 -
+ * Tree: expanded state is not correct inside NodeExpandedEvent listener</a>
+ *
+ * @author Nick Belaevski
+ * @since 3.3.1
+ */
+@Name("rf7273")
+(a)Scope(ScopeType.SESSION)
+public class Bean {
+
+ private DefaultMutableTreeNode node;
+
+ private String stateString = "";
+
+ public Bean() {
+ node = new DefaultMutableTreeNode("root");
+ node.add(new DefaultMutableTreeNode("child"));
+ }
+
+ public void processExpand(NodeExpandedEvent event) {
+ UIComponent component = event.getComponent();
+ Boolean expanded = (Boolean) component.getAttributes().get("expanded");
+ stateString += expanded ? " expanded" : " collapsed";
+ }
+
+ public TreeNode getNode() {
+ return node;
+ }
+
+ public String getStateString() {
+ return stateString;
+ }
+}
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/META-INF/MANIFEST.MF
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/META-INF/MANIFEST.MF 2009-05-29 17:33:59 UTC (rev 14415)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/META-INF/MANIFEST.MF 2009-05-29 18:31:03 UTC (rev 14416)
@@ -2,5 +2,5 @@
Class-Path: bsh-1.3.0.jar commons-beanutils-1.7.0.jar commons-collecti
ons-3.2.jar commons-lang-2.3.jar commons-logging-1.0.4.jar el-api-1.0
.jar jboss-el-1.0_02.CR2.jar jboss-seam-2.1.1.GA.jar log4j-1.2.14.jar
- richfaces-api-3.3.1-SNAPSHOT.jar
+ richfaces-api-3.3.2-SNAPSHOT.jar
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7273/Test.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7273/Test.java (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7273/Test.java 2009-05-29 18:31:03 UTC (rev 14416)
@@ -0,0 +1,61 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng.rf7273;
+
+import junit.framework.Assert;
+
+import org.richfaces.SeleniumTestBase;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.2
+ */
+public class Test extends SeleniumTestBase{
+
+ private static final String HANDLE_LOCATOR = "form:tree:0::node:handle";
+
+ private int getNodesCount() {
+ return selenium.getXpathCount("//*[contains(@class, 'rich-tree-node') and not(contains(@class, 'rich-tree-node-'))]").intValue();
+ }
+
+ @org.testng.annotations.Test
+ public void testExecute() throws Exception {
+ renderPage();
+
+ AssertTextEquals("statePanel", "");
+ Assert.assertEquals(1, getNodesCount());
+
+ clickAjaxCommandAndWait(HANDLE_LOCATOR);
+ Assert.assertEquals(2, getNodesCount());
+ AssertTextEquals("statePanel", "expanded");
+
+ clickAjaxCommandAndWait(HANDLE_LOCATOR);
+ Assert.assertEquals(1, getNodesCount());
+ AssertTextEquals("statePanel", "expanded collapsed");
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/rf7273.xhtml";
+ }
+
+}
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/resources/testng.xml
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/resources/testng.xml 2009-05-29 17:33:59 UTC (rev 14415)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/resources/testng.xml 2009-05-29 18:31:03 UTC (rev 14416)
@@ -32,6 +32,7 @@
<package name="org.richfaces.testng.rf6267" />
<package name="org.richfaces.testng.rf6547" />
<package name="org.richfaces.testng.rf5773" />
+ <package name="org.richfaces.testng.rf7273" />
</packages>
</test>
</suite>
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/resources/META-INF/MANIFEST.MF
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/resources/META-INF/MANIFEST.MF 2009-05-29 17:33:59 UTC (rev 14415)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/resources/META-INF/MANIFEST.MF 2009-05-29 18:31:03 UTC (rev 14416)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
-Class-Path: commons-beanutils-1.7.0.jar commons-digester-2.0.jar jboss
- -seam-debug-2.1.1.GA.jar jboss-seam-jul-2.1.1.GA.jar jboss-seam-remot
- ing-2.1.1.GA.jar jboss-seam-ui-2.1.1.GA.jar jsf-facelets-1.1.15.B1.ja
- r richfaces-impl-3.3.1-SNAPSHOT.jar richfaces-ui-3.3.1-SNAPSHOT.jar
+Class-Path: commons-beanutils-1.7.0.jar commons-digester-1.8.1.jar jbo
+ ss-seam-debug-2.1.1.GA.jar jboss-seam-jul-2.1.1.GA.jar jboss-seam-rem
+ oting-2.1.1.GA.jar jboss-seam-ui-2.1.1.GA.jar jsf-facelets-1.1.15.B1.
+ jar richfaces-impl-3.3.2-SNAPSHOT.jar richfaces-ui-3.3.2-SNAPSHOT.jar
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7273.xhtml
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7273.xhtml (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7273.xhtml 2009-05-29 18:31:03 UTC (rev 14416)
@@ -0,0 +1,24 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition template="/layout/layout.xhtml">
+ <ui:define name="template">
+ <h:form id="form">
+ <rich:tree id="tree" switchType="ajax" value="#{rf7273.node}" changeExpandListener="#{rf7273.processExpand}" var="node">
+ <rich:treeNode id="node">
+ #{node}
+ </rich:treeNode>
+ </rich:tree>
+ </h:form>
+
+ <a4j:outputPanel ajaxRendered="true" id="statePanel">
+ #{rf7273.stateString}
+ </a4j:outputPanel>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
15 years, 6 months
JBoss Rich Faces SVN: r14415 - branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/state.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-29 13:33:59 -0400 (Fri, 29 May 2009)
New Revision: 14415
Modified:
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java
Log:
https://jira.jboss.org/jira/browse/RF-7273
Modified: branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java 2009-05-29 17:31:38 UTC (rev 14414)
+++ branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java 2009-05-29 17:33:59 UTC (rev 14415)
@@ -98,8 +98,10 @@
return true;
}
- return expandedNodes.contains(rowKey) ||
- NodeState.EXPANDED.equals(queuedNodeStates.get(rowKey));
+ NodeState queuedNodeState = queuedNodeStates.get(rowKey);
+
+ return expandedNodes.contains(rowKey) && !NodeState.COLLAPSED.equals(queuedNodeState) ||
+ NodeState.EXPANDED.equals(queuedNodeState);
}
public boolean isSelected(TreeRowKey rowKey) {
15 years, 6 months
JBoss Rich Faces SVN: r14414 - branches/community/3.3.X/ui/tabPanel/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-05-29 13:31:38 -0400 (Fri, 29 May 2009)
New Revision: 14414
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/config/component/tabPanel.xml
Log:
tab: unnecessary attribute - bypassUpdates
https://jira.jboss.org/jira/browse/RF-7267
Modified: branches/community/3.3.X/ui/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- branches/community/3.3.X/ui/tabPanel/src/main/config/component/tabPanel.xml 2009-05-29 17:18:01 UTC (rev 14413)
+++ branches/community/3.3.X/ui/tabPanel/src/main/config/component/tabPanel.xml 2009-05-29 17:31:38 UTC (rev 14414)
@@ -167,101 +167,13 @@
&html_style_attributes;
&ui_component_attributes;
&ui_command_attributes;
+ &ajax_component_attributes;
&html_event_handler_attributes;
- <property >
- <name>ajaxSingle</name>
+ <property hidden="true">
+ <name>bypassUpdates</name>
<classname>boolean</classname>
- <description>boolean attribute which provides possibility to limit JSF tree processing(decoding, conversion/validation, value applying)
- to the component which send the request only</description>
</property>
-
- <property >
- <name>limitToList</name>
- <classname>boolean</classname>
- <description>If "true", then of all AJAX-rendered on the page components only those will be updated,
- which ID's are passed to the "reRender" attribute of the describable component.
- "false"-the default value-means that all components with ajaxRendered="true" will be updated.
- </description>
- </property>
-
- <property >
- <name>reRender</name>
- <classname>java.lang.Object</classname>
- <description>Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection</description>
- </property>
-
- <property >
- <name>process</name>
- <classname>java.lang.Object</classname>
- <description>Id['s] (in format of call UIComponent.findComponent()) of components, processed at the phases 2-5 in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection</description>
- </property>
-
- <property >
- <name>status</name>
- <classname>java.lang.String</classname>
- <description>ID (in format of call UIComponent.findComponent()) of Request status component</description>
- </property>
-
- <property >
- <name>eventsQueue</name>
- <classname>java.lang.String</classname>
- <description>Name of requests queue to avoid send next request before complete other from same event. Can be used to reduce number of requests of frequently events (key press, mouse move etc.)</description>
- </property>
-
- <property >
- <name>requestDelay</name>
- <classname>int</classname>
- <description>
- Attribute defines the time (in ms.) that the request will be wait in the queue before it is ready to send.
- When the delay time is over, the request will be sent to the server or removed if the newest 'similar' request is in a queue already
- </description>
- </property>
-
- <property >
- <name>oncomplete</name>
- <classname>java.lang.String</classname>
- <description>The client side script method to be called after the request is completed</description>
- </property>
- <property>
- <name>onbeforedomupdate</name>
- <classname>java.lang.String</classname>
- <description>The client side script method to be called before DOM is updated</description>
- </property>
- <property >
- <name>focus</name>
- <classname>java.lang.String</classname>
- <description>id of element to set focus after request completed on client side</description>
- </property>
- <property >
- <name>data</name>
- <classname>java.lang.Object</classname>
- <description>Serialized (on default with JSON) data passed on the client by a developer on AJAX request. It's accessible via "data.foo" syntax</description>
- </property>
- <property>
- <name>ignoreDupResponses</name>
- <classname>boolean</classname>
- <description>
-Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is
-in a queue already. ignoreDupResponses="true" does not cancel the request while it is processed on the server,
-but just allows to avoid unnecessary updates on the client side if the response isn't actual now
- </description>
- </property>
- <property>
- <name>timeout</name>
- <classname>int</classname>
- <description>Response waiting time on a particular request. If a response is not received during this time, the request is aborted</description>
- </property>
- <property>
- <name>similarityGroupingId</name>
- <classname>java.lang.String</classname>
- <description>If there are any component requests with identical IDs then these requests will be grouped.</description>
- </property>
-
- <property hidden="true">
- <name>value</name>
- <classname>java.lang.Object</classname>
- </property>
<property hidden="true">
<name>value</name>
<classname>java.lang.Object</classname>
15 years, 6 months
JBoss Rich Faces SVN: r14413 - branches/community/3.3.X/ui/tabPanel/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-05-29 13:18:01 -0400 (Fri, 29 May 2009)
New Revision: 14413
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/config/component/tabPanel.xml
Log:
tab: unnecessary attribute - bypassUpdates
https://jira.jboss.org/jira/browse/RF-7267
Modified: branches/community/3.3.X/ui/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- branches/community/3.3.X/ui/tabPanel/src/main/config/component/tabPanel.xml 2009-05-29 16:58:00 UTC (rev 14412)
+++ branches/community/3.3.X/ui/tabPanel/src/main/config/component/tabPanel.xml 2009-05-29 17:18:01 UTC (rev 14413)
@@ -167,8 +167,101 @@
&html_style_attributes;
&ui_component_attributes;
&ui_command_attributes;
- &ajax_component_attributes;
&html_event_handler_attributes;
+
+ <property >
+ <name>ajaxSingle</name>
+ <classname>boolean</classname>
+ <description>boolean attribute which provides possibility to limit JSF tree processing(decoding, conversion/validation, value applying)
+ to the component which send the request only</description>
+ </property>
+
+ <property >
+ <name>limitToList</name>
+ <classname>boolean</classname>
+ <description>If "true", then of all AJAX-rendered on the page components only those will be updated,
+ which ID's are passed to the "reRender" attribute of the describable component.
+ "false"-the default value-means that all components with ajaxRendered="true" will be updated.
+ </description>
+ </property>
+
+ <property >
+ <name>reRender</name>
+ <classname>java.lang.Object</classname>
+ <description>Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection</description>
+ </property>
+
+ <property >
+ <name>process</name>
+ <classname>java.lang.Object</classname>
+ <description>Id['s] (in format of call UIComponent.findComponent()) of components, processed at the phases 2-5 in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection</description>
+ </property>
+
+ <property >
+ <name>status</name>
+ <classname>java.lang.String</classname>
+ <description>ID (in format of call UIComponent.findComponent()) of Request status component</description>
+ </property>
+
+ <property >
+ <name>eventsQueue</name>
+ <classname>java.lang.String</classname>
+ <description>Name of requests queue to avoid send next request before complete other from same event. Can be used to reduce number of requests of frequently events (key press, mouse move etc.)</description>
+ </property>
+
+ <property >
+ <name>requestDelay</name>
+ <classname>int</classname>
+ <description>
+ Attribute defines the time (in ms.) that the request will be wait in the queue before it is ready to send.
+ When the delay time is over, the request will be sent to the server or removed if the newest 'similar' request is in a queue already
+ </description>
+ </property>
+
+ <property >
+ <name>oncomplete</name>
+ <classname>java.lang.String</classname>
+ <description>The client side script method to be called after the request is completed</description>
+ </property>
+ <property>
+ <name>onbeforedomupdate</name>
+ <classname>java.lang.String</classname>
+ <description>The client side script method to be called before DOM is updated</description>
+ </property>
+ <property >
+ <name>focus</name>
+ <classname>java.lang.String</classname>
+ <description>id of element to set focus after request completed on client side</description>
+ </property>
+ <property >
+ <name>data</name>
+ <classname>java.lang.Object</classname>
+ <description>Serialized (on default with JSON) data passed on the client by a developer on AJAX request. It's accessible via "data.foo" syntax</description>
+ </property>
+ <property>
+ <name>ignoreDupResponses</name>
+ <classname>boolean</classname>
+ <description>
+Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is
+in a queue already. ignoreDupResponses="true" does not cancel the request while it is processed on the server,
+but just allows to avoid unnecessary updates on the client side if the response isn't actual now
+ </description>
+ </property>
+ <property>
+ <name>timeout</name>
+ <classname>int</classname>
+ <description>Response waiting time on a particular request. If a response is not received during this time, the request is aborted</description>
+ </property>
+ <property>
+ <name>similarityGroupingId</name>
+ <classname>java.lang.String</classname>
+ <description>If there are any component requests with identical IDs then these requests will be grouped.</description>
+ </property>
+
+ <property hidden="true">
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ </property>
<property hidden="true">
<name>value</name>
<classname>java.lang.Object</classname>
15 years, 6 months
JBoss Rich Faces SVN: r14412 - in branches/community/3.3.X/test-applications/regressionArea: regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6896 and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-05-29 12:58:00 -0400 (Fri, 29 May 2009)
New Revision: 14412
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6896/
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6896/Bean.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6896/
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6896/Test.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf6896.xhtml
Modified:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/layout/layout.xhtml
Log:
+RF-6896 selenium test.
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6896/Bean.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6896/Bean.java (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6896/Bean.java 2009-05-29 16:58:00 UTC (rev 14412)
@@ -0,0 +1,32 @@
+package org.richfaces.regressionarea.issues.rf6896;
+
+import java.util.ArrayList;
+
+import javax.faces.model.SelectItem;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name("rf6896")
+(a)Scope(ScopeType.SESSION)
+public class Bean {
+
+ private ArrayList<SelectItem> data;
+
+ public ArrayList<SelectItem> getData() {
+ return data;
+ }
+
+ public void setData(ArrayList<SelectItem> data) {
+ this.data = data;
+ }
+
+ public Bean(){
+ data = new ArrayList<SelectItem>();
+ for(int i=0;i<10;i++){
+ data.add(new SelectItem("item"+i,"item"+i));
+ }
+ }
+
+}
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6896/Test.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6896/Test.java (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6896/Test.java 2009-05-29 16:58:00 UTC (rev 14412)
@@ -0,0 +1,33 @@
+package org.richfaces.testng.rf6896;
+
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+
+public class Test extends SeleniumTestBase {
+
+ @org.testng.annotations.Test
+ public void testExecute() throws Exception {
+ renderPage();
+
+ clickById("form:inplaceSelect");
+
+ int inputTop = Integer.parseInt(runScript("getTop('form:inplaceSelectinplaceTmpValue')"));
+ int inputHeight = getHeightById("form:inplaceSelectinplaceTmpValue").intValue();
+ int listTop = Integer.parseInt(runScript("getTop('form:inplaceSelectlist')"));
+ int componentStyleTop = findTop(selenium.getAttribute("//input[@id='form:inplaceSelectinplaceTmpValue']@style"));
+
+ Assert.assertEquals(listTop, inputTop+inputHeight+componentStyleTop);
+ }
+
+ public int findTop(String str){
+ int startTop = str.indexOf("top");
+ int endTop = str.indexOf("px", startTop);
+ return Integer.parseInt(str.substring(startTop+"top: ".length(), endTop));
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/rf6896.xhtml";
+ }
+
+}
\ No newline at end of file
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/layout/layout.xhtml
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/layout/layout.xhtml 2009-05-29 16:34:44 UTC (rev 14411)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/layout/layout.xhtml 2009-05-29 16:58:00 UTC (rev 14412)
@@ -83,7 +83,17 @@
}
}
}
+
+ function getTop(id){
+ var el = document.getElementById(id);
+ return el.cumulativeOffset().top;
+ }
+ function getLeft(id){
+ var el = document.getElementById(id);
+ return el.cumulativeOffset().left;
+ }
+
</script>
<style type="text/css">
<ui:insert name="style"/>
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf6896.xhtml
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf6896.xhtml (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf6896.xhtml 2009-05-29 16:58:00 UTC (rev 14412)
@@ -0,0 +1,23 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<ui:composition template="/layout/layout.xhtml">
+ <ui:define name="template">
+ <h:form id="form">
+
+ <rich:modalPanel showWhenRendered="true">
+ <rich:inplaceSelect id="inplaceSelect">
+ <f:selectItems value="#{rf6896.data}" />
+ </rich:inplaceSelect>
+ </rich:modalPanel>
+
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
15 years, 6 months
JBoss Rich Faces SVN: r14411 - in branches/community/3.3.X/ui: tree/src/main/java/org/richfaces/renderkit and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-05-29 12:34:44 -0400 (Fri, 29 May 2009)
New Revision: 14411
Modified:
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/UITree.java
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
branches/community/3.3.X/ui/tree/src/main/templates/htmlTree.jspx
branches/community/3.3.X/ui/tree/src/main/templates/htmlTreeNode.jspx
branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
branches/community/3.3.X/ui/treeModel/src/test/java/org/richfaces/component/TreeModelComponentTest.java
Log:
RF-7224
Modified: branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/UITree.java 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/UITree.java 2009-05-29 16:34:44 UTC (rev 14411)
@@ -122,9 +122,9 @@
public static final String SELECTION_INPUT_ATTRIBUTE = "_selectionInput";
- public final static String DEFAULT_SELECTED_CSS_CLASS = "dr-tree-i-sel";
+ public final static String DEFAULT_SELECTED_CSS_CLASS = "rich-tree-node-selected";
- public final static String DEFAULT_HIGHLIGHTED_CSS_CLASS = "dr-tree-i-hl";
+ public final static String DEFAULT_HIGHLIGHTED_CSS_CLASS = "rich-tree-node-highlighted";
private UITreeNode defaultFacet;
Modified: branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2009-05-29 16:34:44 UTC (rev 14411)
@@ -148,16 +148,16 @@
if (tree.isShowConnectingLines()) {
if (Boolean.TRUE.equals(treeNode.getAttributes().get("isLastElement"))) {
- variables.setVariable("line", "dr-tree-h-ic-line-last");
+ variables.setVariable("line", "rich-tree-h-ic-line-last");
} else {
- variables.setVariable("line", "dr-tree-h-ic-line-node");
+ variables.setVariable("line", "rich-tree-h-ic-line-node");
}
if (tree.isExpanded() && !tree.isLeaf()) {
variables
- .setVariable("lineFirst", "dr-tree-h-ic-line-exp");
+ .setVariable("lineFirst", "rich-tree-h-ic-line-exp");
} else {
variables.setVariable("lineFirst",
- "dr-tree-h-ic-line-clp");
+ "rich-tree-h-ic-line-clp");
}
}
}
@@ -171,7 +171,6 @@
String resource;
String cssClass;
resource = UITree.DEFAULT_HIGHLIGHTED_CSS_CLASS;
- resource += " rich-tree-node-highlighted";
cssClass = tree.getHighlightedClass();
if (cssClass != null) {
resource += " " + cssClass;
@@ -183,7 +182,6 @@
variables.setVariable("highlightedClass", resource);
resource = UITree.DEFAULT_SELECTED_CSS_CLASS;
- resource += " rich-tree-node-selected";
cssClass = tree.getSelectedClass();
if (cssClass != null) {
resource += " " + cssClass;
Modified: branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2009-05-29 16:34:44 UTC (rev 14411)
@@ -190,8 +190,8 @@
String styleClasses = "";
if (context.getRowKey() != null) {
- styleClasses = "dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-children rich-tree-node-cildren";
- if (!context.isLast() && showLines) styleClasses += " dr-tree-h-ic-line";
+ styleClasses = "rich-tree-node-children";
+ if (!context.isLast() && showLines) styleClasses += " rich-tree-h-ic-line";
}
if (styleClasses!="") getUtils().writeAttribute(writer, "class", styleClasses);
}
@@ -248,7 +248,7 @@
ResponseWriter writer = context.getResponseWriter();
if (isLastElement && this.navigator.showLines) {
writer.startElement("p", tree);
- writer.writeAttribute("class", "dr-tree-last-node-marker", null);
+ writer.writeAttribute("class", "rich-tree-last-node-marker", null);
writer.endElement("p");
}
@@ -573,7 +573,7 @@
public String writeScriptElement(FacesContext context, UITree tree, String code) throws IOException {
/*
- <div id="#{clientId}:script" class="dr-tree-h-script">
+ <div id="#{clientId}:script" class="rich-tree-h">
<script type="text/javascript">
</script>
</div>
@@ -583,7 +583,7 @@
ResponseWriter responseWriter = context.getResponseWriter();
responseWriter.startElement(HTML.DIV_ELEM, tree);
responseWriter.writeAttribute(HTML.id_ATTRIBUTE, scriptId, null);
- responseWriter.writeAttribute(HTML.class_ATTRIBUTE, "dr-tree-h-script", null);
+ responseWriter.writeAttribute(HTML.class_ATTRIBUTE, "rich-tree-h", null);
responseWriter.startElement(HTML.SCRIPT_ELEM, tree);
responseWriter.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
Modified: branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss 2009-05-29 16:34:44 UTC (rev 14411)
@@ -4,67 +4,51 @@
xmlns="http://www.w3.org/1999/xhtml" >
<f:verbatim><![CDATA[
-.dr-tree {
-}
-
-.dr-tree-full-width {
+.rich-tree-node {
width: 100%;
}
-.dr-tree-layout-on {
+.rich-tree-node-children {
zoom: 1;
+ margin-left : 8px;
+ padding-left : 10px;
}
-.dr-tree-h-input, .dr-tree-h-script {
+.rich-tree-h {
display: none;
}
-.dr-tree-h-ic-div {
- margin-left : 8px;
- padding-left : 10px;
-}
-
-.dr-tree-h-ic {
+.rich-tree-node-icon, .rich-tree-node-icon-leaf, .rich-tree-node-handleicon {
width: 16px;
padding: 1px;
}
-.dr-tree-h-ic-img{
+.rich-tree-h-ic-img, .rich-tree-node-handleicon-collapsed, .rich-tree-node-handleicon-expanded {
width : 16px;
height : 16px;
-}
-
-.dr-tree-h-ic-img-md{
margin: 0px;
display: block;
-}
-
-.dr-tree-h-ic-facets{
overflow: hidden;
}
-.dr-tree-h-ic-line {
+.rich-tree-h-ic-line {
background-position: left;
background-repeat: repeat-y;
}
-.dr-tree-h-ic-line-node, .dr-tree-h-ic-line-last, .dr-tree-h-ic-line-exp, .dr-tree-h-ic-line-clp{
+.rich-tree-h-ic-line-node, .rich-tree-h-ic-line-last, .rich-tree-h-ic-line-exp, .rich-tree-h-ic-line-clp{
background-position: center;
background-repeat: no-repeat;
}
-.dr-tree-h-text {
+.rich-tree-node-text {
width: 100%;
cursor: default;
padding : 1px 4px 1px 4px;
white-space: nowrap;
}
-.dr-tree-h-text-span {
- white-space: nowrap;
-}
-
-.dr-tree-i-sel {
+.rich-tree-node-selected {
padding : 0px 3px 0px 3px;
border : 1px solid;
background-color : transparent;
@@ -72,15 +56,15 @@
background-repeat: repeat-x;
}
-.dr-tree-i-hl {
+.rich-tree-node-highlighted {
text-decoration: underline;
}
-.dr-tree-pointer-cursor {
+.rich-tree-node-handleicon-collapsed, .rich-tree-node-handleicon-expanded {
cursor: pointer;
}
-.dr-tree-last-node-marker {
+.rich-tree-last-node-marker {
display: none;
}
@@ -91,60 +75,60 @@
]]>
</f:verbatim>
-<u:selector name=".dr-tree">
+<u:selector name=".rich-tree">
<u:style name="background-color" skin="overAllBackground" />
</u:selector>
-<u:selector name=".dr-tree-h-text">
+<u:selector name=".rich-tree-node-text">
<u:style name="color" skin="panelTextColor" />
<u:style name="font-size" skin="preferableDataSizeFont" />
<u:style name="font-family" skin="preferableDataFamilyFont" />
</u:selector>
-<u:selector name=".dr-tree-i-hl">
+<u:selector name=".rich-tree-node-highlighted">
<u:style name="color" skin="selectControlColor" />
</u:selector>
-<u:selector name=".dr-tree-i-sel">
+<u:selector name=".rich-tree-node-selected">
<u:style name="border-color" skin="headerBackgroundColor" />
<u:style name="color" skin="panelTextColor" />
</u:selector>
-<u:selector name=".dr-tree-h-ic-line">
+<u:selector name=".rich-tree-h-ic-line">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.TreeLineImage"/>
</u:style>
</u:selector>
-<u:selector name=".dr-tree-h-ic-line-node">
+<u:selector name=".rich-tree-h-ic-line-node">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.TreeLineNodeImage"/>
</u:style>
</u:selector>
-<u:selector name=".dr-tree-h-ic-line-last">
+<u:selector name=".rich-tree-h-ic-line-last">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.TreeLineLastImage"/>
</u:style>
</u:selector>
-<u:selector name="p.dr-tree-last-node-marker+* .dr-tree-h-ic-line-node">
+<u:selector name="p.rich-tree-last-node-marker+* .rich-tree-h-ic-line-node">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.TreeLineLastImage"/>
</u:style>
</u:selector>
-<u:selector name="p.dr-tree-last-node-marker+*+div.dr-tree-h-ic-line">
+<u:selector name="p.rich-tree-last-node-marker+*+div.rich-tree-h-ic-line">
<u:style name="background-image" value="none" />
</u:selector>
-<u:selector name=".dr-tree-h-ic-line-exp">
+<u:selector name=".rich-tree-h-ic-line-exp">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.TreeLineExpandedImage"/>
</u:style>
</u:selector>
-<u:selector name=".dr-tree-h-ic-line-clp">
+<u:selector name=".rich-tree-h-ic-line-clp">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.TreeLineCollapsedImage"/>
</u:style>
</u:selector>
-<u:selector name=".dr-tree-i-sel .dr-tree-i-hl">
+<u:selector name=".rich-tree-node-selected .rich-tree-node-highlighted">
<u:style name="color" skin="selectControlColor" />
</u:selector>
Modified: branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2009-05-29 16:34:44 UTC (rev 14411)
@@ -58,9 +58,9 @@
Tree.ID_ICON = "icon";
Tree.ID_TEXT = "text";
Tree.ID_MAIN_ROW = "mainRow";
-Tree.CLASS_ITEM_SELECTED = "dr-tree-i-sel";
-Tree.CLASS_ITEM_EXPANDED = "dr-tree-h-ic-line-exp";
-Tree.CLASS_ITEM_COLLAPSED = "dr-tree-h-ic-line-clp";
+Tree.CLASS_ITEM_SELECTED = "rich-tree-node-selected";
+Tree.CLASS_ITEM_EXPANDED = "rich-tree-h-ic-line-exp";
+Tree.CLASS_ITEM_COLLAPSED = "rich-tree-h-ic-line-clp";
Tree.CLASS_AJAX_SELECTED_LISTENER_FLAG = "ajax_selected_listener_flag";
Tree.addMethods({
Modified: branches/community/3.3.X/ui/tree/src/main/templates/htmlTree.jspx
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/templates/htmlTree.jspx 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/templates/htmlTree.jspx 2009-05-29 16:34:44 UTC (rev 14411)
@@ -35,7 +35,7 @@
</jsp:scriptlet>
<div id="#{clientId}"
- style="#{component.attributes['style']}" class="dr-tree rich-tree #{component.attributes['styleClass']}" x:passThruWithExclusions="id,style,class,styleClass,rows">
+ style="#{component.attributes['style']}" class="rich-tree #{component.attributes['styleClass']}" x:passThruWithExclusions="id,style,class,styleClass,rows">
<f:call name="encodeAttributeParameters" />
Modified: branches/community/3.3.X/ui/tree/src/main/templates/htmlTreeNode.jspx
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/templates/htmlTreeNode.jspx 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/templates/htmlTreeNode.jspx 2009-05-29 16:34:44 UTC (rev 14411)
@@ -33,13 +33,13 @@
<c:object var="leaf" type="boolean" value="#{component.UITree.leaf}" />
- <table border="0" cellpadding="0" cellspacing="0" id="#{clientId}" class="dr-tree-full-width rich-tree-node">
+ <table border="0" cellpadding="0" cellspacing="0" id="#{clientId}" class="rich-tree-node">
<tbody>
<tr id="#{clientId}:mainRow" onclick="#{component.attributes['onclick']} #{!leaf ? this:getToggleScript(context, component, 'mainRow') : ''}" x:passThruWithExclusions="id,onclick">
<f:call name="encodeAttributeParameters" />
- <td class="dr-tree-h-ic rich-tree-node-handleicon #{line}" id="#{clientId}:handles">
+ <td class="rich-tree-node-handleicon #{line}" id="#{clientId}:handles">
<jsp:scriptlet>
<![CDATA[
if (Boolean.TRUE.equals(component.getAttributes().get("isAjaxUpdateRoot")) && component.getUITree().isShowConnectingLines()) {
@@ -58,7 +58,7 @@
if (leaf) {
]]>
</jsp:scriptlet>
- <img id="#{clientId}:handle:img" src="#{spacer}" alt="" class="dr-tree-h-ic-img-md dr-tree-h-ic-img" />
+ <img id="#{clientId}:handle:img" src="#{spacer}" alt="" class="rich-tree-h-ic-img" />
<jsp:scriptlet>
<![CDATA[
} else {
@@ -74,7 +74,7 @@
]]>
</jsp:scriptlet>
<span id="#{clientId}:handle:img:collapsed"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets rich-tree-node-handleicon-collapsed"
+ class="rich-tree-node-handleicon-collapsed"
style="#{this:getHandleCollapsedDisplayStyle(context, component)}">
<jsp:scriptlet>
@@ -90,7 +90,7 @@
</jsp:scriptlet>
<img id="#{clientId}:handle:img:collapsed"
- src="#{collapsed}" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed"
+ src="#{collapsed}" class="rich-tree-node-handleicon-collapsed"
style="#{this:getHandleCollapsedDisplayStyle(context, component)};border:0" alt="" />
<jsp:scriptlet>
@@ -108,7 +108,7 @@
</jsp:scriptlet>
<span id="#{clientId}:handle:img:expanded"
style="#{this:getHandleExpandedDisplayStyle(context, component)}"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets rich-tree-node-handleicon-expanded">
+ class="rich-tree-node-handleicon-expanded">
<jsp:scriptlet>
<![CDATA[
@@ -123,7 +123,7 @@
</jsp:scriptlet>
<img id="#{clientId}:handle:img:expanded" src="#{expanded}"
style="#{this:getHandleExpandedDisplayStyle(context, component)};border:0"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-expanded" alt="" />
+ class="rich-tree-node-handleicon-expanded" alt="" />
<jsp:scriptlet>
<![CDATA[
}
@@ -141,7 +141,7 @@
if (org.richfaces.component.UITree.SWITCH_CLIENT.equals(component.getUITree().getSwitchType())) {
]]>
</jsp:scriptlet>
- <input class="dr-tree-h-input" type="hidden" id="#{clientId}NodeExpanded" name="#{clientId}NodeExpanded" value="#{this:getExpandedValue(context,component)}" />
+ <input class="rich-tree-h" type="hidden" id="#{clientId}NodeExpanded" name="#{clientId}NodeExpanded" value="#{this:getExpandedValue(context,component)}" />
<jsp:scriptlet>
<![CDATA[
}
@@ -173,7 +173,7 @@
rich:onselected="#{component.attributes['onselected']}"
rich:onexpand="#{component.attributes['onexpand']}"
rich:oncollapse="#{component.attributes['oncollapse']}"
- class="dr-tree-h-ic #{iconClass} #{lineFirst}" id="#{clientId}:icon">
+ class="#{iconClass} #{lineFirst}" id="#{clientId}:icon">
<jsp:scriptlet>
<![CDATA[
if (leaf) {
@@ -182,7 +182,7 @@
]]>
</jsp:scriptlet>
- <span class="dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets">
+ <span class="rich-tree-h-ic-img">
<jsp:scriptlet>
<![CDATA[
renderChild(context, leafFacet);
@@ -194,7 +194,7 @@
} else {
]]>
</jsp:scriptlet>
- <img src="#{leafIcon}" alt="" class="dr-tree-h-ic-img-md dr-tree-h-ic-img" />
+ <img src="#{leafIcon}" alt="" class="rich-tree-h-ic-img" />
<jsp:scriptlet>
<![CDATA[
}
@@ -207,7 +207,7 @@
if (iconFacet != null && iconFacet.isRendered()) {
]]>
</jsp:scriptlet>
- <span class="dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets">
+ <span class="rich-tree-h-ic-img">
<jsp:scriptlet>
<![CDATA[
renderChild(context, iconFacet);
@@ -219,7 +219,7 @@
} else {
]]>
</jsp:scriptlet>
- <img src="#{folderIcon}" alt="" class="dr-tree-h-ic-img-md dr-tree-h-ic-img" />
+ <img src="#{folderIcon}" alt="" class="rich-tree-h-ic-img" />
<jsp:scriptlet>
<![CDATA[
}
@@ -227,7 +227,7 @@
]]>
</jsp:scriptlet>
</td>
- <td class="dr-tree-h-text rich-tree-node-text #{component.attributes['nodeClass']}"
+ <td class="rich-tree-node-text #{component.attributes['nodeClass']}"
rich:selectedclass="#{selectedClass}" rich:highlightedclass="#{highlightedClass}"
id="#{clientId}:text">
<vcp:body />
Modified: branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2009-05-29 16:34:44 UTC (rev 14411)
@@ -254,10 +254,10 @@
private static Set styleClasses = new HashSet();
static {
- styleClasses.add("dr-tree-h-ic dr-tree-h-ic-line-last");
- styleClasses.add("dr-tree-h-ic dr-tree-h-ic-line-clp");
- styleClasses.add("dr-tree-h-text rich-tree-node");
- styleClasses.add("dr-tree-pointer-cursor");
+ styleClasses.add("rich-tree-node-icon-leaf rich-tree-h-ic-line-last");
+ styleClasses.add("rich-tree-h-ic rich-tree-h-ic-line-clp");
+ styleClasses.add("rich-tree-node");
+ styleClasses.add("rich-tree-node-handleicon-collapsed");
styleClasses.add("");
}
@@ -267,7 +267,7 @@
HtmlElement htmlTree = renderedView.getHtmlElementById(tree
.getClientId(facesContext));
- htmlTree.getAttributeValue("class").equals("dr-tree rich-tree ");
+ htmlTree.getAttributeValue("class").equals("rich-tree ");
// System.out.println(htmlTree.getHtmlElementsByAttribute("class",
// "highlightedclass", "selectedclass"));
Modified: branches/community/3.3.X/ui/treeModel/src/test/java/org/richfaces/component/TreeModelComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/treeModel/src/test/java/org/richfaces/component/TreeModelComponentTest.java 2009-05-29 16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/treeModel/src/test/java/org/richfaces/component/TreeModelComponentTest.java 2009-05-29 16:34:44 UTC (rev 14411)
@@ -196,9 +196,9 @@
//System.out.println(element);
if (nextSibling == null) {
- assertTrue(handleCell.getAttributeValue("class").contains("dr-tree-h-ic-line-last"));
+ assertTrue(handleCell.getAttributeValue("class").contains("rich-tree-h-ic-line-last"));
} else {
- assertTrue(handleCell.getAttributeValue("class").contains("dr-tree-h-ic-line-node"));
+ assertTrue(handleCell.getAttributeValue("class").contains("rich-tree-h-ic-line-node"));
}
HtmlElement handleElement = (HtmlElement) handleCell.getFirstChild().getFirstChild();
15 years, 6 months
JBoss Rich Faces SVN: r14410 - branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-29 12:30:33 -0400 (Fri, 29 May 2009)
New Revision: 14410
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
Log:
RendererUtils: wrong children count check in findComponent()
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2009-05-29 14:55:12 UTC (rev 14409)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2009-05-29 16:30:33 UTC (rev 14410)
@@ -915,7 +915,7 @@
}
}
if (target == null) {
- if (child.getChildCount() > 0) {
+ if (child.getChildCount() > 0 || child.getFacetCount() > 0) {
target = findUIComponentBelow(child, id);
}
}
15 years, 6 months
JBoss Rich Faces SVN: r14409 - branches/community/3.3.X/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-05-29 10:55:12 -0400 (Fri, 29 May 2009)
New Revision: 14409
Modified:
branches/community/3.3.X/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js
Log:
inputNumberSpinner: Up/Down keyboard keys don't work
https://jira.jboss.org/jira/browse/RF-4516
Modified: branches/community/3.3.X/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js
===================================================================
--- branches/community/3.3.X/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js 2009-05-29 14:43:31 UTC (rev 14408)
+++ branches/community/3.3.X/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js 2009-05-29 14:55:12 UTC (rev 14409)
@@ -193,26 +193,26 @@
upClick: function(e){
if (e.preventDefault) {
- e.preventDefault(); ;
+ e.preventDefault();
}
var isError = this.spinner.switchItems('up');
this.spinner.upClick();
if(!isError){
- window.document.onmouseup = this.mouseUp.bindAsEventListener(this);
+ window.document.onmouseup = this.mouseUp.bindAsEventListener(this);
this.mousedown=true;
this.timer = setTimeout(this.continueUpClick.bind(this), 750);
}
},
-
+
downClick: function(e){
if (e.preventDefault) {
- e.preventDefault(); ;
+ e.preventDefault();
}
var isError = this.spinner.switchItems('down');
this.spinner.downClick();
if(!isError){
- window.document.onmouseup = this.mouseUp.bindAsEventListener(this);
- this.mousedown=true;
+ window.document.onmouseup = this.mouseUp.bindAsEventListener(this);
+ this.mousedown = true;
this.timer = setTimeout(this.continueDownClick.bind(this), 750);
}
},
@@ -308,6 +308,16 @@
if ((this.edit.value < this.spinner.max) && (this.edit.value > this.spinner.min) && !isNaN(Number(this.edit.value)) && this.edit.value != ""){
this.prevEditValue = this.edit.value;
}
+
+ switch (e.keyCode) {
+ case Event.KEY_UP:
+ this.spinner.switchItems('up');
+ return;
+ case Event.KEY_DOWN:
+ this.spinner.switchItems('down');
+ return;
+ }
+
if (e.keyCode == 13){
if (this.spinner.required || "" != this.edit.value)
this.edit.value = this.getValidValue(this.edit.value);
@@ -332,10 +342,10 @@
},
_attachBehaviors: function(){
- this.up.onmousedown = this.upClick.bindAsEventListener(this);
- this.down.onmousedown = this.downClick.bindAsEventListener(this);
- this.up.onmouseup = this.mouseUp.bindAsEventListener(this);
- this.down.onmouseup = this.mouseUp.bindAsEventListener(this);
+ this.up.onmousedown = this.upClick.bindAsEventListener(this);
+ this.down.onmousedown = this.downClick.bindAsEventListener(this);
+ this.up.onmouseup = this.mouseUp.bindAsEventListener(this);
+ this.down.onmouseup = this.mouseUp.bindAsEventListener(this);
this.edit.onkeydown = this.editChange.bindAsEventListener(this);
this.eventInputChange= this.inputChange.bindAsEventListener(this);
if (this.edit.onchange){
15 years, 6 months
JBoss Rich Faces SVN: r14408 - branches/community/3.3.X/ui/message/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-29 10:43:31 -0400 (Fri, 29 May 2009)
New Revision: 14408
Modified:
branches/community/3.3.X/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java
Log:
Modified: branches/community/3.3.X/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java
===================================================================
--- branches/community/3.3.X/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java 2009-05-29 13:56:01 UTC (rev 14407)
+++ branches/community/3.3.X/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java 2009-05-29 14:43:31 UTC (rev 14408)
@@ -27,6 +27,7 @@
private static final class MockRichMessages extends UIRichMessages {
private String level = "ALL";
+ private String minLevel = "info";
@Override
public String getLevel() {
@@ -45,6 +46,16 @@
public void setKeepTransient(boolean ajaxRendered) {
}
+
+ @Override
+ public String getMinLevel() {
+ return minLevel;
+ }
+
+ @Override
+ public void setMinLevel(String level) {
+ this.minLevel = level;
+ }
}
private static final String INPUT_ID = "input";
15 years, 6 months
JBoss Rich Faces SVN: r14407 - in branches/community/3.3.X/test-applications/regressionArea: regressionArea-tests/src/test/java/org/richfaces/testng/rf4432 and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-05-29 09:56:01 -0400 (Fri, 29 May 2009)
New Revision: 14407
Modified:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf4553/Bean.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf4432/Test.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf4553/Test.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf4553.xhtml
Log:
tests correction
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf4553/Bean.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf4553/Bean.java 2009-05-29 13:08:01 UTC (rev 14406)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf4553/Bean.java 2009-05-29 13:56:01 UTC (rev 14407)
@@ -12,7 +12,17 @@
private String company;
private String notes;
private int counter;
+ private boolean ajaxRendered;
+ private boolean useAjaxRendered;
+ public boolean isAjaxRendered() {
+ return ajaxRendered;
+ }
+
+ public void setAjaxRendered(boolean ajaxRendered) {
+ this.ajaxRendered = ajaxRendered;
+ }
+
public int getCounter() {
return counter++;
}
@@ -26,6 +36,8 @@
lastName = "";
company = "";
notes = "";
+ ajaxRendered = false;
+ useAjaxRendered = false;
}
public String getFirstName() {
@@ -64,4 +76,16 @@
this.notes = notes;
}
+ public boolean isUseAjaxRendered() {
+ return useAjaxRendered;
+ }
+
+ public void setUseAjaxRendered(boolean useAjaxRendered) {
+ this.useAjaxRendered = useAjaxRendered;
+ }
+
+ public void reset(){
+ counter = 0;
+ }
+
}
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf4432/Test.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf4432/Test.java 2009-05-29 13:08:01 UTC (rev 14406)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf4432/Test.java 2009-05-29 13:56:01 UTC (rev 14407)
@@ -1,6 +1,7 @@
package org.richfaces.testng.rf4432;
import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
public class Test extends SeleniumTestBase {
@@ -11,6 +12,8 @@
AssertPresent("form:sdtItems");
AssertNotPresent("form:hello");
+ selenium.click("//tr[@id='form:sdtItems:n:3']/td[1]");
+
clickAjaxCommandAndWait("//input[@type='button' and @value='Go']");
AssertNotPresent("form:sdtItems");
@@ -19,7 +22,14 @@
clickAjaxCommandAndWait("//input[@type='button' and @value='Back to table']");
AssertPresent("form:sdtItems");
- AssertNotPresent("form:hello");
+ AssertNotPresent("form:hello");
+
+ //check sdt header
+ AssertPresent("form:sdtItems:hcb_0");
+ AssertPresent("form:sdtItems:hcb_1");
+
+ //check selection
+ Assert.assertEquals(selenium.getAttribute("//tr[@id='form:sdtItems:n:3']@class"), "dr-sdt-rb rich-sdt-row dr-sdt-row-active rich-sdt-row-active dr-sdt-row-selected rich-sdt-row-selected");
}
public String getTestUrl() {
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf4553/Test.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf4553/Test.java 2009-05-29 13:08:01 UTC (rev 14406)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf4553/Test.java 2009-05-29 13:56:01 UTC (rev 14407)
@@ -3,35 +3,70 @@
import org.richfaces.SeleniumTestBase;
public class Test extends SeleniumTestBase {
+
+ public void testDefault() {
+ renderPage();
- @org.testng.annotations.Test
- public void testExecute() throws Exception {
- renderPage();
-
- AssertTextEquals("form:includeID:counter", "1");
-
+ AssertTextEquals("form:defaultIncludeID:counter", "1");
+
type("//div[@id='divID']/table/tbody/tr[1]/td[2]/input", "John");
type("//div[@id='divID']/table/tbody/tr[2]/td[2]/input", "Smith");
type("//div[@id='divID']/table/tbody/tr[3]/td[2]/input", "Exadel");
-
+
clickAjaxCommandAndWait("//input[@type='button' and @value='No actions']");
- AssertTextEquals("form:includeID:counter", "1");
+ AssertTextEquals("form:defaultIncludeID:counter", "1");
clickAjaxCommandAndWait("//input[@type='button' and @value='Next >>']");
- AssertTextEquals("form:includeID:counter", "2");
+ AssertTextEquals("form:defaultIncludeID:counter", "2");
+
+ type("form:defaultIncludeID:notes", "Selenium test in process...");
+
+ clickAjaxCommandAndWait("//input[@type='button' and @value='No actions']");
+ AssertTextEquals("form:defaultIncludeID:counter", "2");
+ clickAjaxCommandAndWait("//input[@type='button' and @value='Next >>']");
+ AssertTextEquals("form:defaultIncludeID:counter", "3");
+
+ clickAjaxCommandAndWait("//input[@type='button' and @value='No actions']");
+ AssertTextEquals("form:defaultIncludeID:counter", "3");
+ clickAjaxCommandAndWait("//input[@type='button' and @value='<<Previous']");
+ AssertTextEquals("form:defaultIncludeID:counter", "4");
+ }
+
+ public void testAjaxRenderedFalse() {
+ renderPage();
- type("form:includeID:notes","Selenium test in process...");
+ selenium.check("form:useAjaxRendered");
+ selenium.submit("form");
+ waitForPageToLoad();
+
+ AssertTextEquals("form:ajaxRenderedIncludeID:counter", "7");
+
clickAjaxCommandAndWait("//input[@type='button' and @value='No actions']");
- AssertTextEquals("form:includeID:counter", "2");
+ AssertTextEquals("form:ajaxRenderedIncludeID:counter", "7");
clickAjaxCommandAndWait("//input[@type='button' and @value='Next >>']");
- AssertTextEquals("form:includeID:counter", "3");
+ AssertTextEquals("form:ajaxRenderedIncludeID:counter", "7");
+ }
+
+ public void testAjaxRenderedTrue() {
+ renderPage();
+
+ selenium.check("form:ajaxRendered");
+ AssertTextEquals("form:ajaxRenderedIncludeID:counter", "9");
+
clickAjaxCommandAndWait("//input[@type='button' and @value='No actions']");
- AssertTextEquals("form:includeID:counter", "3");
- clickAjaxCommandAndWait("//input[@type='button' and @value='<<Previous']");
- AssertTextEquals("form:includeID:counter", "4");
+ AssertTextEquals("form:ajaxRenderedIncludeID:counter", "10");
+ clickAjaxCommandAndWait("//input[@type='button' and @value='Next >>']");
+ AssertTextEquals("form:ajaxRenderedIncludeID:counter", "11");
}
-
+
+ @org.testng.annotations.Test
+ public void testExecute() throws Exception {
+ testDefault();
+ testAjaxRenderedFalse();
+ testAjaxRenderedTrue();
+ }
+
public String getTestUrl() {
return "pages/rf4553.xhtml";
}
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf4553.xhtml
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf4553.xhtml 2009-05-29 13:08:01 UTC (rev 14406)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf4553.xhtml 2009-05-29 13:56:01 UTC (rev 14407)
@@ -7,18 +7,49 @@
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/layout/layout.xhtml">
- <ui:define name="template">
- <h:panelGrid width="100%" columns="2">
+ <ui:define name="template">
+ <h:form id="form">
+ <h:panelGrid width="100%" columns="2"
+ rendered="#{!rf4553.useAjaxRendered}" id="default">
<a4j:keepAlive beanName="rf4553" />
<rich:panel styleClass="wizard">
<f:facet name="header">
<h:outputText value="Using a4j:include for Wizard-like behaviour" />
</f:facet>
- <h:form id="form">
- <a4j:include viewId="/pages/examples/wstep1.xhtml" id="includeID"/>
- </h:form>
+ <a4j:include viewId="/pages/examples/wstep1.xhtml"
+ id="defaultIncludeID" />
</rich:panel>
- </h:panelGrid>
+ </h:panelGrid>
+
+ <h:panelGrid width="100%" columns="2"
+ rendered="#{rf4553.useAjaxRendered}" id="ajaxRenderedIsUsed">
+ <a4j:keepAlive beanName="rf4553" />
+ <rich:panel styleClass="wizard">
+ <f:facet name="header">
+ <h:outputText
+ value="Using a4j:include for Wizard-like behaviour(with ajaxRendered)" />
+ </f:facet>
+ <a4j:include viewId="/pages/examples/wstep1.xhtml"
+ id="ajaxRenderedIncludeID" ajaxRendered="#{rf4553.ajaxRendered}" />
+ </rich:panel>
+ </h:panelGrid>
+
+ <br />
+
+ <h:panelGrid columns="2" id="controls_panel" border="1">
+
+ <h:outputText value="useAjaxRendered" />
+ <h:selectBooleanCheckbox value="#{rf4553.useAjaxRendered}"
+ onclick="submit()" id="useAjaxRendered">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="ajaxRendered" />
+ <h:selectBooleanCheckbox value="#{rf4553.ajaxRendered}" id="ajaxRendered">
+ <a4j:support event="onchange" reRender="ajaxRenderedIsUsed"></a4j:support>
+ </h:selectBooleanCheckbox>
+ </h:panelGrid>
+ <h:commandButton action="#{rf4553.reset}" value="Reset counter" id="reset"/>
+ </h:form>
</ui:define>
</ui:composition>
</html>
\ No newline at end of file
15 years, 6 months