JBoss Rich Faces SVN: r19265 - modules/tests/metamer/trunk/application.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-20 11:20:19 -0400 (Mon, 20 Sep 2010)
New Revision: 19265
Modified:
modules/tests/metamer/trunk/application/pom.xml
Log:
configured pom for generating war with jsf snapshots
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2010-09-20 14:01:02 UTC (rev 19264)
+++ modules/tests/metamer/trunk/application/pom.xml 2010-09-20 15:20:19 UTC (rev 19265)
@@ -116,11 +116,20 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <!-- disable default (inherited) attach-souces execution, use war sources instead -->
+ <execution>
+ <id>attach-sources</id>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
- <classifier>jee6</classifier>
- <packagingExcludes>WEB-INF/lib/jsf-api-*,WEB-INF/lib/jsf-impl-*,WEB-INF/lib/myfaces-api-*,WEB-INF/lib/myfaces-impl-*</packagingExcludes>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
@@ -133,16 +142,17 @@
</archive>
</configuration>
<executions>
+ <!-- disable default war execution (use jee6 profile instead) -->
<execution>
- <id>sources-classes</id>
+ <id>default-war</id>
+ <phase>none</phase>
+ </execution>
+ <execution>
+ <id>exploded-war</id>
<phase>package</phase>
<goals>
- <goal>war</goal>
+ <goal>exploded</goal>
</goals>
- <configuration>
- <attachClasses>true</attachClasses>
- <attachSources>true</attachSources>
- </configuration>
</execution>
</executions>
</plugin>
@@ -238,29 +248,62 @@
</build>
</profile>
<profile>
- <id>mojarra</id>
+ <id>war-default</id>
+ <activation>
+ <property>
+ <name>!disable-default-war</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <classifier>jee6</classifier>
+ <packagingExcludes>WEB-INF/lib/jsf-api-*,WEB-INF/lib/jsf-impl-*,WEB-INF/lib/myfaces-api-*,WEB-INF/lib/myfaces-impl-*</packagingExcludes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>default-war</id>
+ <phase>package</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ <configuration>
+ <attachClasses>true</attachClasses>
+ <attachSources>true</attachSources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>war-mojarra</id>
<activation>
<property>
<name>!jsf_profile</name>
</property>
</activation>
- <dependencies>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- </dependency>
- </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
- <id>myfaces</id>
+ <id>mojarra</id>
<phase>integration-test</phase>
<goals>
<goal>war</goal>
@@ -276,30 +319,20 @@
</build>
</profile>
<profile>
- <id>myfaces</id>
+ <id>war-myfaces</id>
<activation>
<property>
<name>jsf_profile</name>
<value>myfaces</value>
</property>
</activation>
- <dependencies>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-impl</artifactId>
- </dependency>
- </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
- <id>mojarra</id>
+ <id>myfaces</id>
<phase>integration-test</phase>
<goals>
<goal>war</goal>
@@ -314,6 +347,64 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>war-mojarra-snapshot</id>
+ <activation>
+ <property>
+ <name>jsf_profile</name>
+ <value>jsf_ri_2_1_snapshot</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>mojarra-snapshot</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ <configuration>
+ <classifier>mojarra-snapshot</classifier>
+ <packagingExcludes>WEB-INF/lib/myfaces-api-*,WEB-INF/lib/myfaces-impl-*</packagingExcludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>war-myfaces-snapshot</id>
+ <activation>
+ <property>
+ <name>jsf_profile</name>
+ <value>myfaces_snapshot</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>myfaces-snapshot</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ <configuration>
+ <classifier>myfaces-snapshot</classifier>
+ <packagingExcludes>WEB-INF/lib/jsf-api-*,WEB-INF/lib/jsf-impl-*</packagingExcludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
14 years, 3 months
JBoss Rich Faces SVN: r19264 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: a4jJSFunction and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-20 10:01:02 -0400 (Mon, 20 Sep 2010)
New Revision: 19264
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jJSFunction/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jJSFunction/TestJSFunctionSimple.java
Log:
https://jira.jboss.org/browse/RFPL-717
* added 9 tests for a4j:jsFunction
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jJSFunction/TestJSFunctionSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jJSFunction/TestJSFunctionSimple.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jJSFunction/TestJSFunctionSimple.java 2010-09-20 14:01:02 UTC (rev 19264)
@@ -0,0 +1,276 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+
+package org.richfaces.tests.metamer.ftest.a4jJSFunction;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotSame;
+
+import java.net.URL;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.waiting.ajax.JavaScriptCondition;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jJSFunction/simple.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestJSFunctionSimple extends AbstractMetamerTest {
+
+ private JQueryLocator link = pjq("a[id$=callFunctionLink]");
+ private JQueryLocator time1 = pjq("span[id$=time1]");
+ private JQueryLocator time2 = pjq("span[id$=time2]");
+ private JQueryLocator year = pjq("span[id$=year]");
+ private JQueryLocator ajaxRenderedTime = pjq("span[id$=autoTime]");
+
+ private String[] phasesNames = {"RESTORE_VIEW 1", "APPLY_REQUEST_VALUES 2", "PROCESS_VALIDATIONS 3",
+ "UPDATE_MODEL_VALUES 4", "INVOKE_APPLICATION 5", "RENDER_RESPONSE 6"};
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jJSFunction/simple.xhtml");
+ }
+
+ @Test
+ public void testSimpleClick() {
+ String time1Value = selenium.getText(time1);
+ String time2Value = selenium.getText(time2);
+ String yearValue = selenium.getText(year);
+ String ajaxRenderedTimeValue = selenium.getText(ajaxRenderedTime);
+
+ guardXhr(selenium).click(link);
+
+ String newTime1Value = waitGui.failWith("Page was not updated").waitForChangeAndReturn(time1Value,
+ retrieveText.locator(time1));
+ String newTime2Value = selenium.getText(time2);
+ String newYearValue = selenium.getText(year);
+ String newAjaxRenderedTimeValue = selenium.getText(ajaxRenderedTime);
+
+ assertNotSame(newTime1Value, time1Value, "Time1 did not change");
+ assertNotSame(newTime2Value, time2Value, "Time2 did not change");
+ assertEquals(newYearValue, yearValue, "Year should not change");
+ assertNotSame(newAjaxRenderedTimeValue, ajaxRenderedTimeValue, "Ajax rendered time did not change");
+ }
+
+ @Test
+ public void testAction() {
+ int yearValue = Integer.parseInt(selenium.getText(year));
+ String time1Value = selenium.getText(time1);
+
+ JQueryLocator incYearActionOption = pjq("input[id$=actionInput:1]");
+ selenium.click(incYearActionOption);
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(link);
+ String newTime1Value = waitGui.failWith("Page was not updated").waitForChangeAndReturn(time1Value,
+ retrieveText.locator(time1));
+ assertNotSame(time1Value, newTime1Value, "Time1 did not change");
+ assertEquals(Integer.parseInt(selenium.getText(year)), yearValue + 1, "Action was not called");
+
+ guardXhr(selenium).click(link);
+ newTime1Value = waitGui.failWith("Page was not updated").waitForChangeAndReturn(time1Value,
+ retrieveText.locator(time1));
+ assertNotSame(time1Value, newTime1Value, "Time1 did not change");
+ assertEquals(Integer.parseInt(selenium.getText(year)), yearValue + 2, "Action was not called");
+ }
+
+ @Test
+ public void testActionListener() {
+ int yearValue = Integer.parseInt(selenium.getText(year));
+ String time1Value = selenium.getText(time1);
+
+ JQueryLocator incYearActionListenerOption = pjq("input[id$=actionListenerInput:1]");
+ selenium.click(incYearActionListenerOption);
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(link);
+ String newTime1Value = waitGui.failWith("Page was not updated").waitForChangeAndReturn(time1Value,
+ retrieveText.locator(time1));
+ assertNotSame(time1Value, newTime1Value, "Time1 did not change");
+ assertEquals(Integer.parseInt(selenium.getText(year)), yearValue + 1, "Action was not called");
+
+ guardXhr(selenium).click(link);
+ newTime1Value = waitGui.failWith("Page was not updated").waitForChangeAndReturn(time1Value,
+ retrieveText.locator(time1));
+ assertNotSame(time1Value, newTime1Value, "Time1 did not change");
+ assertEquals(Integer.parseInt(selenium.getText(year)), yearValue + 2, "Action was not called");
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ String time1Value = selenium.getText(time1);
+
+ JQueryLocator input = pjq("input[type=checkbox][id$=bypassUpdatesInput]");
+ selenium.click(input);
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(link);
+ waitGui.failWith("Page was not updated").waitForChange(time1Value, retrieveText.locator(time1));
+
+ JQueryLocator[] phases = {jq("div#phasesPanel li"), jq("div#phasesPanel li:eq(0)"),
+ jq("div#phasesPanel li:eq(1)"), jq("div#phasesPanel li:eq(2)"), jq("div#phasesPanel li:eq(3)")};
+
+ final String msg = "Update model values and Invoke application phases should be skipped.";
+ assertEquals(selenium.getCount(phases[0]), 4, msg);
+ assertEquals(selenium.getText(phases[1]), phasesNames[0], msg);
+ assertEquals(selenium.getText(phases[2]), phasesNames[1], msg);
+ assertEquals(selenium.getText(phases[3]), phasesNames[2], msg);
+ assertEquals(selenium.getText(phases[4]), phasesNames[5], msg);
+ }
+
+ @Test
+ public void testImmediate() {
+ String time1Value = selenium.getText(time1);
+
+ JQueryLocator input = pjq("input[type=checkbox][id$=immediateInput]");
+ selenium.click(input);
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(link);
+ waitGui.failWith("Page was not updated").waitForChange(time1Value, retrieveText.locator(time1));
+
+ JQueryLocator[] phases = {jq("div#phasesPanel li"), jq("div#phasesPanel li:eq(0)"),
+ jq("div#phasesPanel li:eq(1)"), jq("div#phasesPanel li:eq(2)")};
+
+ final String msg = "Process validations, Update model values and Invoke application phases should be skipped.";
+ assertEquals(selenium.getCount(phases[0]), 3, msg);
+ assertEquals(selenium.getText(phases[1]), phasesNames[0], msg);
+ assertEquals(selenium.getText(phases[2]), phasesNames[1], msg);
+ assertEquals(selenium.getText(phases[3]), phasesNames[5], msg);
+ }
+
+ @Test
+ public void testLimitRender() {
+ // set limitRender=true
+ JQueryLocator limitRenderInput = pjq("input[type=checkbox][id$=limitRenderInput]");
+ selenium.click(limitRenderInput);
+ selenium.waitForPageToLoad();
+
+ // get all values
+ String time1Value = selenium.getText(time1);
+ String time2Value = selenium.getText(time2);
+ String yearValue = selenium.getText(year);
+ String ajaxRenderedTimeValue = selenium.getText(ajaxRenderedTime);
+
+ // invoke the function and get new values
+ guardXhr(selenium).click(link);
+
+ String newTime1Value = waitGui.failWith("Page was not updated").waitForChangeAndReturn(time1Value,
+ retrieveText.locator(time1));
+ String newTime2Value = selenium.getText(time2);
+ String newYearValue = selenium.getText(year);
+ String newAjaxRenderedTimeValue = selenium.getText(ajaxRenderedTime);
+
+ assertNotSame(newTime1Value, time1Value, "Time1 did not change");
+ assertNotSame(newTime2Value, time2Value, "Time2 did not change");
+ assertEquals(newYearValue, yearValue, "Year should not change");
+ assertEquals(newAjaxRenderedTimeValue, ajaxRenderedTimeValue, "Ajax rendered time should not change");
+ }
+
+ @Test
+ public void testEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "alert('begin')");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "alert('beforedomupdate')");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "alert('complete')");
+ selenium.waitForPageToLoad();
+
+ JavaScriptCondition condition = new JavaScriptCondition() {
+ public JavaScript getJavaScriptCondition() {
+ return new JavaScript("selenium.isAlertPresent()");
+ }
+ };
+
+ guardXhr(selenium).click(link);
+
+ waitGui.failWith("First alert was not displayed").until(condition);
+ assertEquals(selenium.getAlert(), "begin", "Attribute onbegin does not work");
+
+ waitGui.failWith("Second alert was not displayed").until(condition);
+ assertEquals(selenium.getAlert(), "beforedomupdate", "Attribute onbeforedomupdate does not work");
+
+ waitGui.failWith("Third alert was not displayed").until(condition);
+ assertEquals(selenium.getAlert(), "complete", "Attribute oncomplete does not work");
+ }
+
+ @Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "time1");
+ selenium.waitForPageToLoad();
+
+ // get all values
+ String time1Value = selenium.getText(time1);
+ String time2Value = selenium.getText(time2);
+ String yearValue = selenium.getText(year);
+ String ajaxRenderedTimeValue = selenium.getText(ajaxRenderedTime);
+
+ // invoke the function and get new values
+ guardXhr(selenium).click(link);
+
+ String newTime1Value = waitGui.failWith("Page was not updated").waitForChangeAndReturn(time1Value,
+ retrieveText.locator(time1));
+ String newTime2Value = selenium.getText(time2);
+ String newYearValue = selenium.getText(year);
+ String newAjaxRenderedTimeValue = selenium.getText(ajaxRenderedTime);
+
+ assertNotSame(newTime1Value, time1Value, "Time1 should not change");
+ assertEquals(newTime2Value, time2Value, "Time2 did not change");
+ assertEquals(newYearValue, yearValue, "Year should not change");
+ assertNotSame(newAjaxRenderedTimeValue, ajaxRenderedTimeValue, "Ajax rendered time should change");
+ }
+
+ @Test
+ public void testRendered() {
+ selenium.click(pjq("input[type=checkbox][id$=renderedInput]"));
+ selenium.waitForPageToLoad();
+
+ // get all values
+ String time1Value = selenium.getText(time1);
+ String time2Value = selenium.getText(time2);
+ String yearValue = selenium.getText(year);
+ String ajaxRenderedTimeValue = selenium.getText(ajaxRenderedTime);
+
+ guardNoRequest(selenium).click(link);
+
+ // get new values
+ String newTime1Value = selenium.getText(time1);
+ String newTime2Value = selenium.getText(time2);
+ String newYearValue = selenium.getText(year);
+ String newAjaxRenderedTimeValue = selenium.getText(ajaxRenderedTime);
+
+ assertEquals(newTime1Value, time1Value, "Time1 should not change");
+ assertEquals(newTime2Value, time2Value, "Time2 should not change");
+ assertEquals(newYearValue, yearValue, "Year should not change");
+ assertEquals(newAjaxRenderedTimeValue, ajaxRenderedTimeValue, "Ajax rendered time should not change");
+ }
+
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jJSFunction/TestJSFunctionSimple.java
___________________________________________________________________
Name: svn:keywords
+ Revision
14 years, 3 months
JBoss Rich Faces SVN: r19263 - modules/tests/metamer/trunk/application/src/main/webapp/components/a4jJSFunction.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-20 09:51:26 -0400 (Mon, 20 Sep 2010)
New Revision: 19263
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jJSFunction/simple.xhtml
Log:
* page for a4j:jsFunction refactored because of Selenium testing
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jJSFunction/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jJSFunction/simple.xhtml 2010-09-20 09:15:16 UTC (rev 19262)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jJSFunction/simple.xhtml 2010-09-20 13:51:26 UTC (rev 19263)
@@ -73,7 +73,7 @@
</a4j:jsFunction>
<br/>
- <a href="javascript:metamerFunction()">Call JavaScript function</a>
+ <a id="callFunctionLink" href="#" onclick="javascript:metamerFunction()">Call JavaScript function</a>
</ui:define>
<ui:define name="outOfTemplateAfter">
14 years, 3 months
JBoss Rich Faces SVN: r19262 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-20 05:15:16 -0400 (Mon, 20 Sep 2010)
New Revision: 19262
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js
Log:
Fixed duplicate ajax responses generation in tabPanel
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js 2010-09-20 08:56:19 UTC (rev 19261)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js 2010-09-20 09:15:16 UTC (rev 19262)
@@ -124,7 +124,11 @@
var parent = this.getTogglePanel();
delete parent.getItems()[this.index];
- rf.Event.unbindById(this.id, "."+this.namespace);
+ rf.Event.unbindById(this.id);
+
+ //TODO - optimize
+ rf.Event.unbindById(this.id + ":header:active");
+ rf.Event.unbindById(this.id + ":header:inactive");
this.$super.destroy.call(this);
}
14 years, 3 months
JBoss Rich Faces SVN: r19261 - in trunk/ui/output/ui/src/main: resources/META-INF and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-20 04:56:19 -0400 (Mon, 20 Sep 2010)
New Revision: 19261
Added:
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
Removed:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/actlefttab_bg.gif
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/actrighttab_bg.gif
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab2_bg.gif
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab2_bottom_bg.gif
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab_bg.gif
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab_bottom_bg.gif
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/lefttab_bg.gif
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab_bg.gif
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
Log:
https://jira.jboss.org/browse/RF-9361
https://jira.jboss.org/browse/RF-9363
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2010-09-20 08:09:38 UTC (rev 19260)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2010-09-20 08:56:19 UTC (rev 19261)
@@ -22,6 +22,23 @@
package org.richfaces.renderkit.html;
+import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.active;
+import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.disable;
+import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.inactive;
+import static org.richfaces.component.html.HtmlAccordion.PropertyKeys.height;
+import static org.richfaces.component.util.HtmlUtil.concatClasses;
+import static org.richfaces.component.util.HtmlUtil.concatStyles;
+import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.component.AbstractTabPanel;
import org.richfaces.component.AbstractTogglePanel;
@@ -32,21 +49,6 @@
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.RenderKitUtils;
-import javax.faces.application.ResourceDependencies;
-import javax.faces.application.ResourceDependency;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import java.io.IOException;
-import java.util.Map;
-
-import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.*;
-import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.active;
-import static org.richfaces.component.html.HtmlAccordion.PropertyKeys.height;
-import static org.richfaces.component.util.HtmlUtil.concatClasses;
-import static org.richfaces.component.util.HtmlUtil.concatStyles;
-import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
-
/**
* @author akolonitsky
* @since 2010-08-24
@@ -64,7 +66,6 @@
public class TabPanelRenderer extends TogglePanelRenderer {
private static final RenderKitUtils.Attributes HEADER_ATTRIBUTES = RenderKitUtils.attributes()
- .generic("style", HtmlTab.PropertyKeys.headerStyle.toString())
.generic("onclick", HtmlTab.PropertyKeys.onheaderclick.toString(), "headerclick")
.generic("ondblclick", HtmlTab.PropertyKeys.onheaderdblclick.toString(), "headerdblclick")
.generic("onmousedown", HtmlTab.PropertyKeys.onheadermousedown.toString(), "headermousedown")
@@ -112,9 +113,9 @@
w.endElement("tbody");
w.endElement("table");
- writeTopTabsControl(w, comp, "rf-tb-hdr_scroll_left rftp_hidden", "«");
- writeTopTabsControl(w, comp, "rf-tb-hdr_tabslist rftp_hidden", "↓");
- writeTopTabsControl(w, comp, "rf-tb-hdr_scroll_right rftp_hidden", "»");
+ writeTopTabsControl(w, comp, "rf-tb-hdr_scroll_left rftp_hidden", "\u00AB");
+ writeTopTabsControl(w, comp, "rf-tb-hdr_tabslist rftp_hidden", "\u2193");
+ writeTopTabsControl(w, comp, "rf-tb-hdr_scroll_right rftp_hidden", "\u00BB");
w.endElement("div");
}
@@ -129,34 +130,28 @@
return HtmlUtil.concatClasses("rf-tbp", attributeAsString(component, "styleClass"));
}
-
private void writeTopTabHeader(FacesContext context, ResponseWriter writer, AbstractTogglePanelTitledItem tab) throws IOException {
- writer.startElement("td", tab);
- writer.writeAttribute("id", tab.getClientId() + ":header", null);
- writer.writeAttribute("class", concatClasses("rf-tb-hdr", attributeAsString(tab, HtmlTab.PropertyKeys.headerClass)), null);
- renderPassThroughAttributes(context, tab, HEADER_ATTRIBUTES);
-
boolean isActive = tab.isActive();
boolean isDisabled = tab.isDisabled();
+
encodeTabHeader(context, tab, writer, inactive, !isActive && !isDisabled);
encodeTabHeader(context, tab, writer, active, isActive && !isDisabled);
encodeTabHeader(context, tab, writer, disable, isDisabled);
- writer.endElement("td");
}
private void encodeTabHeader(FacesContext context, AbstractTogglePanelTitledItem tab, ResponseWriter writer,
AbstractTogglePanelTitledItem.HeaderStates state, Boolean isDisplay) throws IOException {
- writer.startElement("div", tab);
- writer.writeAttribute("id", tab.getClientId() + ":header:" + state, null);
- writer.writeAttribute("style", concatStyles("white-space: nowrap", isDisplay ? "" : "display : none"), null);
-
+
+ writer.startElement("td", tab);
+ writer.writeAttribute("id", tab.getClientId() + ":header:" + state.toString(), null);
+ renderPassThroughAttributes(context, tab, HEADER_ATTRIBUTES);
String name = "headerClass" + capitalize(state.toString());
- writer.writeAttribute("class", concatClasses("rf-tb-hdr-" + state.abbreviation(), attributeAsString(tab, name)), null);
+ writer.writeAttribute("class", concatClasses("rf-tb-hdr rf-tb-hdr-" + state.abbreviation(),
+ attributeAsString(tab, HtmlTab.PropertyKeys.headerClass), attributeAsString(tab, name)), null);
+ writer.writeAttribute("style", concatStyles(isDisplay ? "" : "display : none", attributeAsString(tab, HtmlTab.PropertyKeys.headerStyle.toString())), null);
- writeTopTabIcon(context, tab, writer, "rftp_icon", "ico.gif");
-
writer.startElement("span", tab);
writer.writeAttribute("class", "rftp_label", null);
@@ -171,10 +166,8 @@
}
writer.endElement("span");
-
- writeTopTabIcon(context, tab, writer, "rftp_close", "close_act.gif");
-
- writer.endElement("div");
+
+ writer.endElement("td");
}
@@ -186,16 +179,6 @@
w.endElement("div");
}
- private void writeTopTabIcon(FacesContext context, UIComponent comp, ResponseWriter writer, String styleClass, String image) throws IOException {
- writer.startElement("img", comp);
- writer.writeAttribute("width", 16, null);
- writer.writeAttribute("height", 16, null);
- writer.writeAttribute("class", styleClass, null);
-
- String imagePath = context.getApplication().getResourceHandler().createResource("org.richfaces/" + image).getRequestPath();
- writer.writeAttribute("src", imagePath, null);
- }
-
private void writeTopTabFirstSpacer(ResponseWriter w, UIComponent comp) throws IOException {
writeTopTabSpacer(w, comp, "padding-left: 5px;", "rf-tb-hdr_spacer");
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java 2010-09-20 08:09:38 UTC (rev 19260)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java 2010-09-20 08:56:19 UTC (rev 19261)
@@ -22,19 +22,20 @@
package org.richfaces.renderkit.html;
-import org.ajax4jsf.javascript.JSObject;
-import org.richfaces.component.AbstractTogglePanelTitledItem;
-import org.richfaces.renderkit.HtmlConstants;
+import static org.richfaces.component.util.HtmlUtil.concatClasses;
+import java.io.IOException;
+import java.util.Map;
+
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import java.io.IOException;
-import java.util.Map;
-import static org.richfaces.component.util.HtmlUtil.concatClasses;
+import org.ajax4jsf.javascript.JSObject;
+import org.richfaces.component.AbstractTogglePanelTitledItem;
+import org.richfaces.renderkit.HtmlConstants;
/**
* @author akolonitsky
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js 2010-09-20 08:09:38 UTC (rev 19260)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js 2010-09-20 08:56:19 UTC (rev 19261)
@@ -41,7 +41,9 @@
this.index = options["index"];
this.getTogglePanel().getItems()[this.index] = this;
- rf.Event.bindById(this.id + ":header", "click", this.__onHeaderClick, this)
+ //TODO - optimize this
+ rf.Event.bindById(this.id + ":header:active", "click", this.__onHeaderClick, this)
+ rf.Event.bindById(this.id + ":header:inactive", "click", this.__onHeaderClick, this)
},
/***************************** Public Methods ****************************************************************/
@@ -70,7 +72,7 @@
* */
__content : function () {
if (!this.__content_) {
- this.__content_ = $(rf.getDomElement(this.id));
+ this.__content_ = $(rf.getDomElement(this.id + ":content"));
}
return this.__content_;
},
Deleted: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/actlefttab_bg.gif
===================================================================
(Binary files differ)
Deleted: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/actrighttab_bg.gif
===================================================================
(Binary files differ)
Deleted: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab2_bg.gif
===================================================================
(Binary files differ)
Deleted: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab2_bottom_bg.gif
===================================================================
(Binary files differ)
Deleted: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab_bg.gif
===================================================================
(Binary files differ)
Deleted: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab_bottom_bg.gif
===================================================================
(Binary files differ)
Deleted: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/lefttab_bg.gif
===================================================================
(Binary files differ)
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2010-09-20 08:09:38 UTC (rev 19260)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2010-09-20 08:56:19 UTC (rev 19261)
@@ -2,7 +2,7 @@
border: "1px solid #{richSkin.panelBorderColor}";
vertical-align: top;
/*gradient - from generalBackgroundColor to tabBackgroundColor*/
- background: "url(#{resource['org.richfaces:tab_bg.gif']}) top repeat-x #{richSkin.tabBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:tabBg.png']}) top repeat-x #{richSkin.tabBackgroundColor}";
}
.rftp_active_bottom {
@@ -10,7 +10,7 @@
font-weight: bold;
vertical-align: top;
/*gradient - from tabBackgroundColor to generalBackgroundColor*/
- background: "url(#{resource['org.richfaces:acttab_bottom_bg.gif']}) top repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBottomBg.png']}) top repeat-x #{richSkin.additionalBackgroundColor}";
}
.rftp_bottomtab_tabline_vis {
@@ -50,7 +50,7 @@
.rftp_bottomtab_scroll_left {
/*gradient - from tabBackgroundColor to generalBackgroundColor*/
- background: "url(#{resource['org.richfaces:acttab_bg.gif']}) bottom repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) bottom repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
bottom: 1px;
left: 1px;
@@ -66,7 +66,7 @@
.rftp_bottomtab_scroll_right {
/*gradient - from tabBackgroundColor to generalBackgroundColor*/
- background: "url(#{resource['org.richfaces:acttab_bg.gif']}) bottom repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) bottom repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
bottom: 1px;
right: 17px;
@@ -82,7 +82,7 @@
.rftp_bottomtab_tabslist {
/*gradient - from tabBackgroundColor to generalBackgroundColor*/
- background: "url(#{resource['org.richfaces:acttab_bg.gif']}) bottom repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) bottom repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
bottom: 1px;
right: 1px;
@@ -96,23 +96,17 @@
padding-top: 2px;
}
-.rf-tb-hdr {
- border: "1px solid #{richSkin.panelBorderColor}";
- vertical-align: top;
-
- /*gradient - from generalBackgroundColor to tabBackgroundColor*/
- background: "url(#{resource['org.richfaces:tab_bg.gif']}) top repeat-x #DAE7F5"; /* #{richSkin.tabBackgroundColor} */
-}
-
.rf-tb-hdr {
+ white-space: nowrap;
+ border: "1px solid #{richSkin.panelBorderColor}";
cursor : pointer;
- border : 1px solid #A6A6A6;
- padding : 0px 0px 3px 0px;
+ padding : 0px 5px 3px 5px;
vertical-align : top;
- background-image: "url(#{resource['org.richfaces:tab_bg.gif']})";
+ /*gradient - from generalBackgroundColor to tabBackgroundColor*/
+ background-image: "url(#{resource['org.richfaces.images:tabBg.png']})";
background-position: top;
- background-color: #DAE7F5;
background-repeat: repeat-x;
+ background-color: "#{richSkin.tabBackgroundColor}";
}
@@ -120,15 +114,19 @@
border-bottom: 0px;
font-weight: bold;
vertical-align: top;
-
- /*gradient - from tabBackgroundColor to generalBackgroundColor*/
- background: "url(#{resource['org.richfaces:acttab_bg.gif']}) top repeat-x #{richSkin.additionalBackgroundColor}";
+ background-image: "url(#{resource['org.richfaces.images:actTabBg.png']})";
+ background-position: top;
+ background-repeat: repeat-x;
+ background-color: "#{richSkin.additionalBackgroundColor}";
+ cursor: default;
}
-rf-tb-hdr-inact {
+.rf-tb-hdr-inact {
}
-rf-tb-hdr-dis {
+.rf-tb-hdr-dis {
+ color: "#{richSkin.tabDisabledTextColor}";
+ cursor: default;
}
.rf-tb-hdr_tabline_vis {
@@ -165,7 +163,7 @@
}
.rf-tb-hdr_scroll_left {
- background: "url(#{resource['org.richfaces:acttab_bg.gif']}) top repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) top repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
top: 1px;
left: 1px;
@@ -180,7 +178,7 @@
}
.rf-tb-hdr_scroll_right {
- background: "url(#{resource['org.richfaces:acttab_bg.gif']}) top repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) top repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
top: 1px;
right: 17px;
@@ -195,7 +193,7 @@
}
.rf-tb-hdr_tabslist {
- background: "url(#{resource['org.richfaces:acttab_bg.gif']}) top repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) top repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
top: 1px;
right: 1px;
@@ -213,7 +211,7 @@
border: "1px solid #{richSkin.panelBorderColor}";
border-top: 0px;
height: 2px;
- background: '#{richSkin.additionalBackgroundColor}';
+ background: '#{richSkin.tabBackgroundColor}';
}
.rf-tb-cnt {
@@ -270,15 +268,6 @@
width: 50%
}
-.rftp_bottommultitab_tabline_vis {
- border: "1px solid #{richSkin.panelBorderColor}";
- background: "url(#{resource['org.richfaces:tabline_bg.gif']}) top repeat-x #EEF4FB";
- border-top: 0px;
- padding-bottom: 2px;
- white-space: nowrap;
- position: relative;
-}
-
.rftp_bottommultitab_tabs_first {
border: 0px;
width: 100%;
@@ -321,7 +310,7 @@
border: "1px solid #{richSkin.panelBorderColor}";
padding: 2px 0px 2px 0px;
vertical-align: middle;
- background: "url(#{resource['org.richfaces:tab_bg.gif']}) top right repeat-x #DAE7F5";
+ background: "url(#{resource['org.richfaces.images:tabBg.png']}) top right repeat-x #DAE7F5";
margin-right: -1px
}
@@ -329,7 +318,7 @@
border-right: 0px;
font-weight: bold;
vertical-align: middle;
- background: "url(#{resource['org.richfaces:actlefttab_bg.gif']}) top left repeat-y #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actLeftTabBg.png']}) top left repeat-y #{richSkin.additionalBackgroundColor}";
width: 100%;
}
@@ -358,7 +347,7 @@
border: "1px solid #{richSkin.panelBorderColor}";
padding: 2px 0px 2px 0px;
vertical-align: middle;
- background: "url(#{resource['org.richfaces:tab_bg.gif']}) top right repeat-x #DAE7F5";
+ background: "url(#{resource['org.richfaces.images:tabBg.png']}) top right repeat-x #DAE7F5";
margin-left: -1px
}
@@ -366,7 +355,7 @@
border-left: 0px;
font-weight: bold;
vertical-align: middle;
- background: "url(#{resource['org.richfaces:actrighttab_bg.gif']}) top right repeat-y #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actRightTabBg.png']}) top right repeat-y #{richSkin.additionalBackgroundColor}";
width: 100%;
}
@@ -391,12 +380,6 @@
vertical-align: top;
}
-.rftp_active_top { cursor : default; border-bottom : 1px solid #C9DBEF; font-weight : bold; padding : 0px 0px 0px 0px; vertical-align : top; background : url(acttab_bg.gif) top repeat-x #C9DBEF;}
-.rftp_active2_top { cursor : default; border-bottom : 1px solid #FFFFFF; font-weight : bold; padding : 0px 0px 0px 0px; vertical-align : top; background : url(acttab2_bg.gif) top repeat-x #FFFFFF;}
-
-.rftp_toptab_tabline_vis {border : 1px solid #a6a6a6; background :url(tabline_bg.gif) top repeat-x #EEF4FB; border-bottom : 0px; padding-top : 2px; overflow : hidden; white-space : nowrap; position : relative;}
-.rftp_toptab_tabline_dis {border-bottom : 0px; padding-top : 2px; overflow : hidden; white-space : nowrap; position : relative;}
-
.rftp_toptab_tabs {border-collapse : collapse; border : 0px; height : 100%;}
.rftp_toptab_spacer {border-bottom : 1px solid #A6A6A6;}
.rftp_horizonttab_tabspacer_width {padding-left : 1px;}
@@ -405,16 +388,5 @@
.rftp_close {margin : 4px 5px 0px 10px; vertical-align : top;}
.rftp_label {display : inline-block; font-family : verdana; font-size : 11px; padding : 5px 0px 2px 0px;}
-.rftp_toptab_scroll_left {background : url(acttab_bg.gif) top repeat-x #C9DBEF; position : absolute; top : 1px; left : 1px; width : 15px; height : 250px; border : 1px solid #a6a6a6; font-weight : bold; text-align : center; font-family : verdana; font-size : 11px; padding-top : 6px;}
-.rftp_toptab_scroll_right {background : url(acttab_bg.gif) top repeat-x #C9DBEF; position : absolute; top : 1px; right : 17px; width : 15px; height : 250px; border : 1px solid #a6a6a6; font-weight : bold; text-align : center; font-family : verdana; font-size : 11px; padding-top : 6px;}
-.rftp_toptab_tabslist {background : url(acttab_bg.gif) top repeat-x #C9DBEF; position : absolute; top : 1px; right : 1px; width : 15px; height : 250px; border : 1px solid #a6a6a6; font-weight : bold; text-align : center; font-family : verdana; font-size : 14px; padding-top : 2px;}
-
-.rf-tb-hdr_border {
- border : 1px solid #A6A6A6;
- border-top : 0px;
- height : 2px;
- background : #C9DBEF;
-}
-
.rftp_toptab_content {border : 1px solid #A6A6A6; border-top : 0px; font-family : verdana; font-size : 11px; padding : 10px; background : #ffffff;}
.rftp_hidden {display : none}
Deleted: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab_bg.gif
===================================================================
(Binary files differ)
Added: trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties (rev 0)
+++ trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-09-20 08:56:19 UTC (rev 19261)
@@ -0,0 +1,14 @@
+org.richfaces.images\:tabBg.png=org.richfaces.renderkit.html.BaseGradient\
+ {width=5, height=26, baseColorParam=tabBackgroundColor, gradientColorParam=generalBackgroundColor}
+
+org.richfaces.images\:actTabBottomBg.png=org.richfaces.renderkit.html.BaseGradient\
+ {width=5, height=26, baseColorParam=tabBackgroundColor, gradientColorParam=generalBackgroundColor}
+
+org.richfaces.images\:actTabBg.png=org.richfaces.renderkit.html.BaseGradient\
+ {width=5, height=26, baseColorParam=generalBackgroundColor, gradientColorParam=tabBackgroundColor}
+
+org.richfaces.images\:actLeftTabBg.png=org.richfaces.renderkit.html.BaseGradient\
+ {width=26, height=5, baseColorParam=tabBackgroundColor, gradientColorParam=generalBackgroundColor, horizontal=true}
+
+org.richfaces.images\:actRightTabBg.png=org.richfaces.renderkit.html.BaseGradient\
+ {width=26, height=5, baseColorParam=generalBackgroundColor, gradientColorParam=tabBackgroundColor, horizontal=true}
14 years, 3 months
JBoss Rich Faces SVN: r19260 - in trunk/ui/core/ui/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-20 04:09:38 -0400 (Mon, 20 Sep 2010)
New Revision: 19260
Removed:
trunk/ui/core/ui/src/main/java/org/richfaces/component/QueuePreRenderViewListener.java
trunk/ui/core/ui/src/main/resources/META-INF/queue-prender-listener.faces-config.xml
Modified:
trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/html/QueueRendererBase.java
Log:
https://jira.jboss.org/browse/RF-9341
Deleted: trunk/ui/core/ui/src/main/java/org/richfaces/component/QueuePreRenderViewListener.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/richfaces/component/QueuePreRenderViewListener.java 2010-09-19 01:21:32 UTC (rev 19259)
+++ trunk/ui/core/ui/src/main/java/org/richfaces/component/QueuePreRenderViewListener.java 2010-09-20 08:09:38 UTC (rev 19260)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.component;
-
-import static org.richfaces.application.configuration.ConfigurationServiceHelper.getBooleanConfigurationValue;
-
-import javax.faces.application.Application;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIOutput;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.SystemEvent;
-import javax.faces.event.SystemEventListener;
-
-import org.richfaces.application.CommonComponentsConfiguration;
-
-/**
- * @author Nick Belaevski
- *
- */
-public class QueuePreRenderViewListener implements SystemEventListener {
-
- private static final String QUEUE_RESOURCE_COMPONENT_RENDERER_TYPE = "org.richfaces.QueueResourceComponentRenderer";
-
- public boolean isListenerForSource(Object source) {
- return true;
- }
-
- public void processEvent(SystemEvent event) throws AbortProcessingException {
- FacesContext context = FacesContext.getCurrentInstance();
- UIViewRoot viewRoot = context.getViewRoot();
-
- boolean queueEnabled = getBooleanConfigurationValue(context, CommonComponentsConfiguration.Items.queueEnabled);
- if (queueEnabled) {
- Application application = context.getApplication();
- UIComponent queueResourceComponent = application.createComponent(context,
- UIOutput.COMPONENT_TYPE, QUEUE_RESOURCE_COMPONENT_RENDERER_TYPE);
-
- //fix for JSF duplicate ID exception
- queueResourceComponent.setId(QueueRegistry.QUEUE_SCRIPT_ID);
-
- viewRoot.addComponentResource(context, queueResourceComponent);
- } else {
- //queue can be switched off at application level, not a page level, so no need to remove it if it is switched off
- }
- }
-
-}
Modified: trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/html/QueueRendererBase.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/html/QueueRendererBase.java 2010-09-19 01:21:32 UTC (rev 19259)
+++ trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/html/QueueRendererBase.java 2010-09-20 08:09:38 UTC (rev 19260)
@@ -23,8 +23,12 @@
import static org.richfaces.application.configuration.ConfigurationServiceHelper.getBooleanConfigurationValue;
+import java.util.List;
+
+import javax.faces.application.Application;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ComponentSystemEvent;
@@ -55,6 +59,28 @@
protected static final String NAME_ATTRIBBUTE = "name";
protected static final Logger LOGGER = RichfacesLogger.COMPONENTS.getLogger();
+ private static final String QUEUE_RESOURCE_COMPONENT_RENDERER_TYPE = "org.richfaces.QueueResourceComponentRenderer";
+ private static final String QUEUE_RESOURCE_COMPONENT_TARGET = "head";
+
+ private void addQueueResourceComponent(FacesContext context) {
+ List<UIComponent> resources = context.getViewRoot().getComponentResources(context, QUEUE_RESOURCE_COMPONENT_TARGET);
+
+ for (UIComponent resource: resources) {
+ if (QUEUE_RESOURCE_COMPONENT_RENDERER_TYPE.equals(resource.getRendererType())) {
+ return;
+ }
+ }
+
+ Application application = context.getApplication();
+ UIComponent queueResourceComponent = application.createComponent(context,
+ UIOutput.COMPONENT_TYPE, QUEUE_RESOURCE_COMPONENT_RENDERER_TYPE);
+
+ //fix for JSF duplicate ID exception
+ queueResourceComponent.setId(QueueRegistry.QUEUE_SCRIPT_ID);
+
+ context.getViewRoot().addComponentResource(context, queueResourceComponent, QUEUE_RESOURCE_COMPONENT_TARGET);
+ }
+
public void processEvent(ComponentSystemEvent event) throws AbortProcessingException {
FacesContext context = FacesContext.getCurrentInstance();
@@ -69,6 +95,7 @@
if (event instanceof PostAddToViewEvent) {
queueRegistry.addQueue(queueName, comp);
+ addQueueResourceComponent(context);
} else if (event instanceof PreRemoveFromViewEvent) {
queueRegistry.removeQueue(queueName);
}
Deleted: trunk/ui/core/ui/src/main/resources/META-INF/queue-prender-listener.faces-config.xml
===================================================================
--- trunk/ui/core/ui/src/main/resources/META-INF/queue-prender-listener.faces-config.xml 2010-09-19 01:21:32 UTC (rev 19259)
+++ trunk/ui/core/ui/src/main/resources/META-INF/queue-prender-listener.faces-config.xml 2010-09-20 08:09:38 UTC (rev 19260)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- version="2.0">
-
- <application>
- <system-event-listener>
- <system-event-listener-class>org.richfaces.component.QueuePreRenderViewListener</system-event-listener-class>
- <system-event-class>javax.faces.event.PreRenderViewEvent</system-event-class>
- </system-event-listener>
- </application>
-</faces-config>
\ No newline at end of file
14 years, 3 months
JBoss Rich Faces SVN: r19259 - trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-18 21:21:32 -0400 (Sat, 18 Sep 2010)
New Revision: 19259
Modified:
trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/ClientBehavior.java
Log:
https://jira.jboss.org/browse/RF-9351
Modified: trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/ClientBehavior.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/ClientBehavior.java 2010-09-19 00:41:18 UTC (rev 19258)
+++ trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/ClientBehavior.java 2010-09-19 01:21:32 UTC (rev 19259)
@@ -138,7 +138,7 @@
if (stateObject.length == 3) {
getStateHelper().restoreState(context, stateObject[1]);
- restoreBindings(context, stateObject[2]);
+ this.bindings = restoreBindings(context, stateObject[2]);
clearInitialState();
}
@@ -167,7 +167,6 @@
// Utility for restoring bindings from state
private static Map<String, ValueExpression> restoreBindings(FacesContext context, Object state) {
-
if (state == null) {
return (null);
}
@@ -175,7 +174,7 @@
Object[] values = (Object[]) state;
String[] names = (String[]) values[0];
Object[] states = (Object[]) values[1];
- Map<String, ValueExpression> bindings = new HashMap<String, ValueExpression>(names.length);
+ Map<String, ValueExpression> bindings = new HashMap<String, ValueExpression>();
for (int i = 0; i < names.length; i++) {
bindings.put(names[i], (ValueExpression) UIComponentBase.restoreAttachedState(context, states[i]));
}
14 years, 3 months
JBoss Rich Faces SVN: r19258 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-18 20:41:18 -0400 (Sat, 18 Sep 2010)
New Revision: 19258
Added:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab_bg.gif
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
Log:
https://jira.jboss.org/browse/RF-9344
added missing tab_bg.gif for tabPanel component
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss 2010-09-18 23:39:33 UTC (rev 19257)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss 2010-09-19 00:41:18 UTC (rev 19258)
@@ -7,26 +7,27 @@
left: 0px;
top: 0px;
z-index: -300;
- opacity:0.1;
- filter : 'alpha(opacity=10)';
+ opacity: 0.1;
+ filter: 'alpha(opacity \5C 3D 10)';
}
.rf-pp-sh {
- position : fixed;
- width : 100%;
- height : 100%;
- top:0px;
- left : 0px;
- background : #D0D0D0;
- opacity:0.5;
- filter : 'alpha(opacity=50)';
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0px;
+ left: 0px;
+ background-color: #D0D0D0;
+ opacity: 0.5;
+ filter: 'alpha(opacity \5C 3D 50)';
}
.rf-pp-shw {
- background-color : #000000;
- opacity:0.1;
- filter : 'alpha(opacity=10)';
+ background-color: #000000;
+ opacity: 0.1;
+ filter: 'alpha(opacity \5C 3D 10)';
}
+
.rf-pp-cr {
border : '1px solid #{richSkin.panelBorderColor}';
background : '#{richSkin.generalBackgroundColor}';
@@ -79,11 +80,12 @@
}
.rf-pp-hr {
background : red;
- filter : 'alpha(opacity=0)';
opacity:0;
position : absolute;
margin : -4px;
+ filter : 'alpha(opacity \5C 3D 0)';
}
+
.rf-pp-hr-l {
width : 7px;
height : 100%;
Added: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab_bg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 3 months
JBoss Rich Faces SVN: r19257 - management/design-4x/TabPanel.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-18 19:39:33 -0400 (Sat, 18 Sep 2010)
New Revision: 19257
Added:
management/design-4x/TabPanel/tab_bg.gif
Log:
added tab_bg.gif
Added: management/design-4x/TabPanel/tab_bg.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/TabPanel/tab_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 3 months
JBoss Rich Faces SVN: r19256 - trunk/ui/output/ui/src/main/resources/META-INF.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-18 19:35:46 -0400 (Sat, 18 Sep 2010)
New Revision: 19256
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
Log:
Added missing configuration records for tab/tabPanel components
Modified: trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-09-18 23:11:09 UTC (rev 19255)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-09-18 23:35:46 UTC (rev 19256)
@@ -653,8 +653,15 @@
<property-name>onmouseup</property-name>
<property-class>java.lang.String</property-class>
</property>
-
</component>
+ <component>
+ <component-type>org.richfaces.TabPanel</component-type>
+ <component-class>org.richfaces.component.html.HtmlTabPanel</component-class>
+ </component>
+ <component>
+ <component-type>org.richfaces.TogglePanelTitledItem</component-type>
+ <component-class>org.richfaces.component.html.HtmlTab</component-class>
+ </component>
<render-kit>
<render-kit-id>HTML_BASIC</render-kit-id>
@@ -700,8 +707,19 @@
<cdk:renders-children>false</cdk:renders-children>
</renderer-extension>
</renderer>
- </render-kit>
+ <renderer>
+ <component-family>org.richfaces.TabPanel</component-family>
+ <renderer-type>org.richfaces.TabPanel</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.TabPanelRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>org.richfaces.TogglePanelTitledItem</component-family>
+ <renderer-type>org.richfaces.Tab</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.TabRenderer</renderer-class>
+ </renderer>
+ </render-kit>
+
<faces-config-extension>
<cdk:taglib>
<cdk:shortName>output</cdk:shortName>
Modified: trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-09-18 23:11:09 UTC (rev 19255)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-09-18 23:35:46 UTC (rev 19256)
@@ -29,6 +29,22 @@
</tag>
<tag>
+ <tag-name>tabPanel</tag-name>
+ <component>
+ <component-type>org.richfaces.TabPanel</component-type>
+ <renderer-type>org.richfaces.TabPanel</renderer-type>
+ </component>
+ </tag>
+ <tag>
+ <tag-name>tab</tag-name>
+ <component>
+ <component-type>org.richfaces.TogglePanelTitledItem</component-type>
+ <renderer-type>org.richfaces.Tab</renderer-type>
+ </component>
+ </tag>
+
+
+ <tag>
<tag-name>collapsiblePanel</tag-name>
<component>
<component-type>org.richfaces.CollapsiblePanel</component-type>
14 years, 3 months