JBoss Rich Faces SVN: r19285 - trunk/archetypes.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-21 11:55:24 -0400 (Tue, 21 Sep 2010)
New Revision: 19285
Modified:
trunk/archetypes/pom.xml
Log:
RF-9337
Modified: trunk/archetypes/pom.xml
===================================================================
--- trunk/archetypes/pom.xml 2010-09-21 15:48:39 UTC (rev 19284)
+++ trunk/archetypes/pom.xml 2010-09-21 15:55:24 UTC (rev 19285)
@@ -39,6 +39,7 @@
<module>richfaces-component</module>
<module>richfaces-component-short</module>
<module>richfaces-components-aggregator</module>
+ <module>rf-gae-sample</module>
</modules>
<properties>
14 years, 3 months
JBoss Rich Faces SVN: r19284 - in modules/tests/metamer/trunk/application/src/main: java/org/richfaces/tests/metamer/bean and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-21 11:48:39 -0400 (Tue, 21 Sep 2010)
New Revision: 19284
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButton.xhtml
Log:
* small refactoring in A4JAjaxBean
* changed string added to page log after action/action listener invoked
* added second output to the page for command button and a4j:ajax
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2010-09-21 15:44:05 UTC (rev 19283)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2010-09-21 15:48:39 UTC (rev 19284)
@@ -366,7 +366,7 @@
return null;
}
- RichBean.logToPage("action invoked");
+ RichBean.logToPage("* action invoked");
// if no select options for "action" are defined in property file and it is an EL expression
if (!hasSelectOptions("action") && isStringEL(outcome)) {
@@ -407,7 +407,7 @@
return;
}
- RichBean.logToPage("action listener invoked");
+ RichBean.logToPage("* action listener invoked");
// if no select options for "actionListener" are defined in property file and it is an EL expression
if (!hasSelectOptions("actionListener") && isStringEL(listener)) {
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java 2010-09-21 15:44:05 UTC (rev 19283)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java 2010-09-21 15:48:39 UTC (rev 19284)
@@ -64,9 +64,10 @@
attributes = Attributes.getBehaviorAttributes(AjaxBehavior.class, getClass());
// the 'event' attribute for behavior tag must be a literal
attributes.remove("event");
- attributes.get("render").setValue("output");
- attributes.get("execute").setValue("@form");
+ attributes.setAttribute("render", "output1, output2");
+ attributes.setAttribute("execute", "@form");
+
cars = new ArrayList<String>();
cars.add("Ferrari");
cars.add("Lexus");
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButton.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButton.xhtml 2010-09-21 15:44:05 UTC (rev 19283)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButton.xhtml 2010-09-21 15:48:39 UTC (rev 19284)
@@ -60,9 +60,12 @@
/>
</h:commandButton>
- <a4j:outputPanel id="output" layout="block">
+ <a4j:outputPanel id="output1" layout="block">
<h:outputText value="#{a4jAjaxBean.input}"/>
</a4j:outputPanel>
+ <a4j:outputPanel id="output2" layout="block">
+ <h:outputText value="#{a4jAjaxBean.input}"/>
+ </a4j:outputPanel>
</ui:define>
14 years, 3 months
JBoss Rich Faces SVN: r19283 - trunk/archetypes and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-21 11:44:05 -0400 (Tue, 21 Sep 2010)
New Revision: 19283
Added:
trunk/archetypes/rf-gae-sample/
Removed:
sandbox/trunk/archetypes/rf-gae-sample/
Log:
RF-9337
Copied: trunk/archetypes/rf-gae-sample (from rev 19282, sandbox/trunk/archetypes/rf-gae-sample)
14 years, 3 months
JBoss Rich Faces SVN: r19282 - branches.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-21 11:36:50 -0400 (Tue, 21 Sep 2010)
New Revision: 19282
Removed:
branches/RF-9151/
Log:
RF-9151 development branch now closed
14 years, 3 months
JBoss Rich Faces SVN: r19280 - in trunk: examples/input-demo/src/main/java/org/richfaces/demo and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-21 11:23:14 -0400 (Tue, 21 Sep 2010)
New Revision: 19280
Added:
trunk/examples/input-demo/src/main/webapp/inputNumberSpinner.xhtml
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.ecss
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js
trunk/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
Modified:
trunk/
trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java
trunk/examples/input-demo/src/main/webapp/index.xhtml
trunk/ui/input/ui/src/main/config/faces-config.xml
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
Log:
Merged revisions 19224-19225,19244-19247,19271-19273,19278 via svnmerge from
https://svn.jboss.org/repos/richfaces/branches/RF-9151
.......
r19224 | konstantin.mishin | 2010-09-16 21:06:09 +0300 (Thu, 16 Sep 2010) | 1 line
RF-9193
.......
r19225 | konstantin.mishin | 2010-09-16 21:08:24 +0300 (Thu, 16 Sep 2010) | 1 line
RF-9200
.......
r19244 | konstantin.mishin | 2010-09-17 20:50:16 +0300 (Fri, 17 Sep 2010) | 1 line
RF-9194
.......
r19245 | konstantin.mishin | 2010-09-17 20:52:10 +0300 (Fri, 17 Sep 2010) | 1 line
RF-9194
.......
r19246 | konstantin.mishin | 2010-09-17 20:53:39 +0300 (Fri, 17 Sep 2010) | 1 line
RF-9195
.......
r19247 | konstantin.mishin | 2010-09-17 21:10:07 +0300 (Fri, 17 Sep 2010) | 1 line
RF-9200
.......
r19271 | konstantin.mishin | 2010-09-21 14:20:51 +0300 (Tue, 21 Sep 2010) | 1 line
RF-9194
.......
r19272 | konstantin.mishin | 2010-09-21 14:26:44 +0300 (Tue, 21 Sep 2010) | 1 line
RF-9195
.......
r19273 | konstantin.mishin | 2010-09-21 14:28:55 +0300 (Tue, 21 Sep 2010) | 1 line
RF-9200
.......
r19278 | konstantin.mishin | 2010-09-21 17:44:03 +0300 (Tue, 21 Sep 2010) | 1 line
RF-9195
.......
Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
- /branches/RF-9151:1-19212
+ /branches/RF-9151:1-19279
Modified: trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java
===================================================================
--- trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java 2010-09-21 14:57:06 UTC (rev 19279)
+++ trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java 2010-09-21 15:23:14 UTC (rev 19280)
@@ -21,6 +21,8 @@
*/
package org.richfaces.demo;
+import java.util.Date;
+
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@@ -160,4 +162,8 @@
public int getInputSize() {
return inputSize;
}
+
+ public Date getDate() {
+ return new Date();
+ }
}
Modified: trunk/examples/input-demo/src/main/webapp/index.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/index.xhtml 2010-09-21 14:57:06 UTC (rev 19279)
+++ trunk/examples/input-demo/src/main/webapp/index.xhtml 2010-09-21 15:23:14 UTC (rev 19280)
@@ -10,6 +10,7 @@
<ul>
<li><h:link outcome="inplaceInput">rich:inplaceInput</h:link></li>
<li><h:link outcome="inputNumberSlider">rich:inputNumberSlider</h:link></li>
+ <li><h:link outcome="inputNumberSpinner">rich:inputNumberSpinner</h:link></li>
<li><h:link outcome="autocomplete">rich:autocomplete</h:link></li>
</ul>
Copied: trunk/examples/input-demo/src/main/webapp/inputNumberSpinner.xhtml (from rev 19273, branches/RF-9151/examples/input-demo/src/main/webapp/inputNumberSpinner.xhtml)
===================================================================
--- trunk/examples/input-demo/src/main/webapp/inputNumberSpinner.xhtml (rev 0)
+++ trunk/examples/input-demo/src/main/webapp/inputNumberSpinner.xhtml 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,98 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!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:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:ins="http://richfaces.org/input">
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, 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.
+-->
+ <h:head>
+ <title>Richfaces InputNumberSlider Demo</title>
+ </h:head>
+ <h:body>
+ <h:form id="form">
+ <h:outputText value="Skin: "/>
+ <h:selectOneMenu value="#{skinBean.skin}" onchange="submit();">
+ <f:selectItems value="#{skinBean.skins}"/>
+ </h:selectOneMenu>
+ <br />
+ <h:outputText value="Date: "/>
+ <h:outputText id="date" value="#{inputNumberSliderBean.date}" />
+ <br />
+ <ins:inputNumberSpinner id="ins" value="#{inputNumberSliderBean.value}" accesskey="#{inputNumberSliderBean.accesskey}" cycled="#{inputNumberSliderBean.showInput}"
+ disableBrowserAutoComplete="#{inputNumberSliderBean.showArrows}" disabled="#{inputNumberSliderBean.disabled}" enableManualInput="#{inputNumberSliderBean.enableManualInput}"
+ inputSize="#{inputNumberSliderBean.inputSize}" maxValue="#{inputNumberSliderBean.maxValue}" minValue="#{inputNumberSliderBean.minValue}"
+ step="#{inputNumberSliderBean.step}">
+ <f:ajax render="date" />
+ </ins:inputNumberSpinner>
+ <br />
+ <h:outputText value="Accesskey: " />
+ <h:inputText value="#{inputNumberSliderBean.accesskey}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="Cycled: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="DisableBrowserAutoComplete: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showArrows}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Disabled: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.disabled}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="EnableManualInput: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.enableManualInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="InputSize: "/>
+ <h:inputText value="#{inputNumberSliderBean.inputSize}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MaxValue: "/>
+ <h:inputText value="#{inputNumberSliderBean.maxValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MinValue: "/>
+ <h:inputText value="#{inputNumberSliderBean.minValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="Step: "/>
+ <h:inputText value="#{inputNumberSliderBean.step}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ </h:form>
+ </h:body>
+</html>
Modified: trunk/ui/input/ui/src/main/config/faces-config.xml
===================================================================
--- trunk/ui/input/ui/src/main/config/faces-config.xml 2010-09-21 14:57:06 UTC (rev 19279)
+++ trunk/ui/input/ui/src/main/config/faces-config.xml 2010-09-21 15:23:14 UTC (rev 19280)
@@ -237,6 +237,296 @@
</cdk:tag>
</component-extension>
</component>
+ <component>
+ <component-type>org.richfaces.InputNumberSpinner</component-type>
+ <component-class>org.richfaces.component.html.HtmlInputNumberSpinner</component-class>
+ <property>
+ <property-name>accesskey</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>disabled</property-name>
+ <property-class>boolean</property-class>
+ <default-value>false</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>cycled</property-name>
+ <property-class>boolean</property-class>
+ <default-value>true</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>enableManualInput</property-name>
+ <property-class>boolean</property-class>
+ <default-value>true</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>inputClass</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>inputSize</property-name>
+ <property-class>int</property-class>
+ <default-value>10</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>maxValue</property-name>
+ <property-class>java.lang.String</property-class>
+ <default-value>"100"</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>minValue</property-name>
+ <property-class>java.lang.String</property-class>
+ <default-value>"0"</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>minValue</property-name>
+ <property-class>java.lang.String</property-class>
+ <default-value>"0"</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onblur</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>blur</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onchange</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name default="true">change</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onclick</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>click</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>ondblclick</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>dblclick</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>ondownclick</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>downclick</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onfocus</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>focus</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputclick</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputclick</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputdblclick</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputdblclick</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputkeydown</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputkeydown</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputkeypress</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputkeypress</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputkeyup</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputkeyup</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputmousedown</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputmousedown</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputmousemove</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputmousemove</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputmouseout</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputmouseout</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputmouseover</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputmouseover</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oninputmouseup</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>inputmouseup</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onmousedown</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>mousedown</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onmousemove</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>mousemove</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onmouseout</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>mouseout</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onmouseover</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>mouseover</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onmouseup</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>mouseup</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onselect</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>select</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onupclick</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:event-name>upclick</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>style</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>styleClass</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>tabindex</property-name>
+ <property-class>int</property-class>
+ <default-value>Integer.MIN_VALUE</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <component-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
+ <cdk:component-family>javax.faces.Input</cdk:component-family>
+ <cdk:renderer-type>org.richfaces.InputNumberSpinnerRenderer</cdk:renderer-type>
+ <cdk:tag>
+ <cdk:tag-name>inputNumberSpinner</cdk:tag-name>
+ <cdk:tag-type>Facelets</cdk:tag-type>
+ </cdk:tag>
+ </component-extension>
+ </component>
<faces-config-extension>
<cdk:taglib>
<cdk:shortName>input</cdk:shortName>
Copied: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java (from rev 19273, branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java)
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html.images;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Date;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.resource.DynamicResource;
+import org.richfaces.resource.ImageType;
+import org.richfaces.resource.Java2DUserResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+@DynamicResource
+public abstract class ArrowBase implements Java2DUserResource, StateHolderResource {
+
+ private int color;
+ private String colorName = Skin.GENERAL_TEXT_COLOR;
+
+ private void initialize() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ this.color = skin.getColorParameter(context, colorName);
+ }
+
+ protected final void setColorName(String colorName) {
+ this.colorName = colorName;
+ }
+
+ public abstract Dimension getDimension();
+
+ public void paint(Graphics2D graphics2d, Dimension dimension) {
+ graphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ graphics2d.setColor(new Color(color));
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
+ initialize();
+ dataOutput.writeInt(this.color);
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException {
+ this.color = dataInput.readInt();
+ }
+
+ public Map<String, String> getResponseHeaders() {
+ return null;
+ }
+
+ public Date getLastModified() {
+ return null;
+ }
+
+ public ImageType getImageType() {
+ return ImageType.PNG;
+ }
+
+ public boolean isTransient() {
+ return false;
+ }
+
+}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2010-09-21 14:57:06 UTC (rev 19279)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2010-09-21 15:23:14 UTC (rev 19280)
@@ -22,77 +22,18 @@
package org.richfaces.renderkit.html.images;
-import java.awt.Color;
import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Date;
-import java.util.Map;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.resource.DynamicResource;
-import org.richfaces.resource.ImageType;
-import org.richfaces.resource.Java2DUserResource;
-import org.richfaces.resource.StateHolderResource;
-import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
-
/**
* @author Konstantin Mishin
*
*/
-@DynamicResource
-public abstract class SliderArrowBase implements Java2DUserResource, StateHolderResource {
+public abstract class SliderArrowBase extends ArrowBase {
private Dimension dimension = new Dimension(7, 7);
- private int color;
- private String colorName = Skin.GENERAL_TEXT_COLOR;
- private void initialize() {
- FacesContext context = FacesContext.getCurrentInstance();
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
- this.color = skin.getColorParameter(context, colorName);
- }
-
- protected final void setColorName(String colorName) {
- this.colorName = colorName;
- }
-
+ @Override
public Dimension getDimension() {
return dimension;
}
- public void paint(Graphics2D graphics2d, Dimension dimension) {
- graphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- graphics2d.setColor(new Color(color));
- }
-
- public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
- initialize();
- dataOutput.writeInt(this.color);
- }
-
- public void readState(FacesContext context, DataInput dataInput) throws IOException {
- this.color = dataInput.readInt();
- }
-
- public Map<String, String> getResponseHeaders() {
- return null;
- }
-
- public Date getLastModified() {
- return null;
- }
-
- public ImageType getImageType() {
- return ImageType.PNG;
- }
-
- public boolean isTransient() {
- return false;
- }
-
}
Copied: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java (from rev 19273, branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java)
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html.images;
+
+import java.awt.Dimension;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public abstract class SpinnerArrowBase extends ArrowBase {
+
+ private Dimension dimension = new Dimension(5, 3);
+
+ @Override
+ public Dimension getDimension() {
+ return dimension;
+ }
+}
Copied: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java (from rev 19273, branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java)
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html.images;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SpinnerArrowBottom extends SpinnerArrowBase {
+
+ @Override
+ public void paint(Graphics2D graphics2d, Dimension dimension) {
+ super.paint(graphics2d, dimension);
+ graphics2d.drawLine(0, 0, 4, 0);
+ graphics2d.drawLine(1, 1, 3, 1);
+ graphics2d.drawLine(2, 2, 2, 2);
+ }
+}
Copied: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java (from rev 19273, branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java)
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html.images;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SpinnerArrowTop extends SpinnerArrowBase {
+
+ @Override
+ public void paint(Graphics2D graphics2d, Dimension dimension) {
+ super.paint(graphics2d, dimension);
+ graphics2d.drawLine(2, 0, 2, 0);
+ graphics2d.drawLine(1, 1, 3, 1);
+ graphics2d.drawLine(0, 2, 4, 2);
+ }
+}
Copied: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java (from rev 19273, branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java)
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html.images;
+
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SpinnerDisabledArrowBottom extends SpinnerArrowBottom {
+
+ public SpinnerDisabledArrowBottom() {
+ setColorName("tabDisabledTextColor");
+ }
+}
Copied: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java (from rev 19273, branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java)
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html.images;
+
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SpinnerDisabledArrowTop extends SpinnerArrowTop {
+
+ public SpinnerDisabledArrowTop() {
+ setColorName("tabDisabledTextColor");
+ }
+}
Copied: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.ecss (from rev 19273, branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.ecss)
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.ecss (rev 0)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.ecss 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
+.rf-insp {
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.panelBorderColor}';
+ display: inline-block;
+ font-size: 1px;
+ white-space: nowrap;
+}
+
+input.rf-insp-inp[type="text"] {
+ background-color: '#{richSkin.controlBackgroundColor}';
+ background-imaage: url("#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']}");
+ background-position:1px 1px;
+ background-repeat:no-repeat;
+ border: 0px;
+ color: '#{richSkin.generalTextColor}';
+ font-family : '#{richSkin.generalFamilyFont}';
+ font-size : '#{richSkin.generalSizeFont}';
+ margin: 0px;
+ padding: 0px;
+ vertical-align: top;
+}
+
+.rf-insp-btns {
+ background-color: '#{richSkin.headerBackgroundColor}';
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
+ background-position: top left;
+ background-repeat: repeat-x;
+ border-left-width: 1px;
+ border-left-style: solid;
+ border-left-color: '#{richSkin.panelBorderColor}';
+ display: inline-block;
+ vertical-align: top;
+}
+
+
+.rf-insp-dec, .rf-insp-inc, .rf-insp-dec-dis, .rf-insp-inc-dis {
+ background-position: 50% 40%;
+ background-repeat: no-repeat;
+ display: block;
+ height: 8px;
+ width: 15px;
+}
+
+.rf-insp-dec {
+ background-image: url("#{resource['org.richfaces.renderkit.html.images.SpinnerArrowBottom']}");
+}
+
+.rf-insp-inc {
+ background-image: url("#{resource['org.richfaces.renderkit.html.images.SpinnerArrowTop']}");
+}
+
+.rf-insp-dec-dis {
+ background-image: url("#{resource['org.richfaces.renderkit.html.images.SpinnerDisabledArrowBottom']}");
+}
+
+.rf-insp-inc-dis {
+ background-image: url("#{resource['org.richfaces.renderkit.html.images.SpinnerDisabledArrowTop']}");
+}
\ No newline at end of file
Copied: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js (from rev 19273, branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js)
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js (rev 0)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,159 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
+(function(richfaces, jQuery) {
+ richfaces.ui = richfaces.ui || {};
+
+ richfaces.ui.InputNumberSpinner = richfaces.BaseComponent.extendClass({
+
+ name: "InputNumberSpinner",
+
+ cycled: true,
+ delay: 200,
+ maxValue: 100,
+ minValue: 0,
+ step: 1,
+
+ init: function (id, options) {
+ jQuery.extend(this, options);
+ this.id = id;
+ this.element = jQuery(this.attachToDom());
+ this.input = this.element.children(".rf-insp-inp");
+
+ var value = Number(this.input.val());
+ if (isNaN(value)) {
+ value = this.minValue;
+ }
+ this.__setValue(value, null, true);
+
+ if (!this.input.attr("disabled")) {
+ var buttonsArea = this.element.children(".rf-insp-btns");
+ this.decreaseButton = buttonsArea.children(".rf-insp-dec");
+ this.increaseButton = buttonsArea.children(".rf-insp-inc");
+
+ var proxy = jQuery.proxy(this.__inputHandler, this)
+ this.input.change(proxy);
+ this.input.submit(proxy);
+ this.input.submit(proxy);
+ this.input.keydown(jQuery.proxy(this.__keydownHandler, this));
+ this.decreaseButton.mousedown(jQuery.proxy(this.__decreaseHandler, this));
+ this.increaseButton.mousedown(jQuery.proxy(this.__increaseHandler, this));
+ }
+ },
+
+ decrease: function (event) {
+ var value = this.value - this.step;
+ if (value < this.minValue && this.cycled) {
+ value = this.maxValue;
+ }
+ this.__setValue(value, event);
+ },
+
+ increase: function (event) {
+ var value = this.value + this.step;
+ if (value > this.maxValue && this.cycled) {
+ value = this.minValue;
+ }
+ this.__setValue(value, event);
+ },
+
+ getValue: function () {
+ return this.value;
+ },
+
+ setValue: function (value, event) {
+ if (!this.input.attr("disabled")) {
+ this.__setValue(value);
+ }
+ },
+
+ __setValue: function (value, event, skipOnchange) {
+ if (!isNaN(value)) {
+ value = Math.round(value / this.step) * this.step; //TODO Add normal support of float values. E.g. '0.3' should be instead of '0.30000000000000004'.
+ if (value > this.maxValue) {
+ value = this.maxValue;
+ } else if (value < this.minValue) {
+ value = this.minValue;
+ }
+ if (value != this.value) {
+ this.input.val(value);
+ this.value = value;
+ if (this.onchange && !skipOnchange) {
+ this.onchange.call(this.element[0], event);
+ }
+ }
+ }
+ },
+
+ __inputHandler: function (event) {
+ var value = Number(this.input.val());
+ if (isNaN(value)) {
+ this.input.val(this.value);
+ } else {
+ this.__setValue(value, event);
+ }
+ },
+
+ __keydownHandler: function (event) {
+ if (event.keyCode == 40) { //DOWN
+ this.decrease(event);
+ event.preventDefault();
+ } else if (event.keyCode == 38) { //UP
+ this.increase(event);
+ event.preventDefault();
+ }
+ },
+
+ __decreaseHandler: function (event) {
+ var component = this;
+ component.decrease(event);
+ this.intervalId = window.setInterval(function() {
+ component.decrease(event);
+ }, this.delay);
+ var proxy = jQuery.proxy(this.__clearInterval, this);
+ this.decreaseButton.bind("mouseup", true, proxy).bind("mouseout", true, proxy)
+ .css("backgroundPosition", "60% 60%");
+ event.preventDefault();
+ },
+
+ __increaseHandler: function (event) {
+ var component = this;
+ component.increase(event);
+ this.intervalId = window.setInterval(function() {
+ component.increase(event);
+ }, this.delay);
+ var proxy = jQuery.proxy(this.__clearInterval, this);
+ this.increaseButton.bind("mouseup", proxy).bind("mouseout", proxy)
+ .css("backgroundPosition", "60% 60%");
+ event.preventDefault();
+ },
+
+ __clearInterval: function (event) {
+ window.clearInterval(this.intervalId);
+ var button = this.increaseButton;
+ if (event.data) { // decreaseButton
+ button = this.decreaseButton;
+ }
+ button.css("backgroundPosition", " 50% 40%").unbind("mouseout", this.__clearInterval)
+ .unbind("mouseup", this.__clearInterval);
+ }
+ });
+}(window.RichFaces, jQuery));
\ No newline at end of file
Copied: trunk/ui/input/ui/src/main/templates/inputnumberspinner.template.xml (from rev 19273, branches/RF-9151/ui/input/ui/src/main/templates/inputnumberspinner.template.xml)
===================================================================
--- trunk/ui/input/ui/src/main/templates/inputnumberspinner.template.xml (rev 0)
+++ trunk/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2010-09-21 15:23:14 UTC (rev 19280)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, 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.
+-->
+<cdk:root xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
+ xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite" xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <cc:interface>
+ <cdk:class>org.richfaces.renderkit.html.InputNumberSpinnerRenderer</cdk:class>
+ <cdk:superclass>org.richfaces.renderkit.InputRendererBase</cdk:superclass>
+ <cdk:component-family>javax.faces.Input</cdk:component-family>
+ <cdk:renderer-type>org.richfaces.InputNumberSpinnerRenderer</cdk:renderer-type>
+ <cdk:resource-dependency library="org.richfaces" name="inputNumberSpinner.ecss" />
+ <cdk:resource-dependency library="org.richfaces" name="base-component.reslib" />
+ <cdk:resource-dependency name="jquery.position.js" />
+ <cdk:resource-dependency library="org.richfaces" name="inputNumberSpinner.js" />
+ </cc:interface>
+ <cc:implementation>
+ <span id="#{clientId}" class="rf-insp #{component.attributes['styleClass']}" cdk:passThroughWithExclusions="id class" >
+ <input name="#{clientId}" type="text"
+ class="rf-insp-inp #{component.attributes['inputClass']}" value="#{getInputValue(facesContext, component)}"
+ cdk:passThrough="accesskey disabled maxlength onblur onfocus onclick:oninputclick ondblclick:ondblinputclick onkeydown:oninputkeydown
+ onkeypress:oninputkeypress onkeyup:oninputkeyup onmousedown:oninputmousedown onmousemove:oninputmousemove onmouseout:oninputmouseout
+ onmouseover:oninputmouseover onmouseup:oninputmouseup onselect size:inputSize tabindex"
+ readonly="#{!component.attributes['enableManualInput']}" autocomplete="#{component.attributes['disableBrowserAutoComplete'] ? 'off' : ''}" />
+ <span class="rf-insp-btns">
+ <span class="rf-insp-inc#{component.attributes['disabled'] ? '-dis' : ''}" cdk:passThrough="onclick:onupclick" />
+ <span class="rf-insp-dec#{component.attributes['disabled'] ? '-dis' : ''}" cdk:passThrough="onclick:ondownclick" />
+ </span>
+ <!-- TODO Rewrite the next line when the CDK will support normal way to take event handlers from attributes and behaviors. -->
+ <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change').first()))}" />
+ <script type="text/javascript">new RichFaces.ui.InputNumberSpinner('#{clientId}', {
+ cycled: #{component.attributes['cycled']},
+ maxValue: #{component.attributes['maxValue']},
+ minValue: #{component.attributes['minValue']},
+ onchange: #{onchange.length() > 0 ? 'function (event) {' + onchange + '}' : 'null' },
+ step: #{component.attributes['step']}
+ });</script>
+ </span>
+ </cc:implementation>
+</cdk:root>
14 years, 3 months
JBoss Rich Faces SVN: r19279 - trunk.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-21 10:57:06 -0400 (Tue, 21 Sep 2010)
New Revision: 19279
Modified:
trunk/
Log:
Initialized merge tracking via "svnmerge" with revisions "1-19212" from
https://svn.jboss.org/repos/richfaces/branches/RF-9151
Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
+ /branches/RF-9151:1-19212
14 years, 3 months
JBoss Rich Faces SVN: r19278 - branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-21 10:44:03 -0400 (Tue, 21 Sep 2010)
New Revision: 19278
Modified:
branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js
Log:
RF-9195
Modified: branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js 2010-09-21 14:31:52 UTC (rev 19277)
+++ branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js 2010-09-21 14:44:03 UTC (rev 19278)
@@ -148,14 +148,12 @@
__clearInterval: function (event) {
window.clearInterval(this.intervalId);
- console.log('alert');
+ var button = this.increaseButton;
if (event.data) { // decreaseButton
- this.decreaseButton.css("backgroundPosition", "").unbind("mouseout", this.__clearInterval)
- .unbind("mouseup", this.__clearInterval);
- } else {
- this.increaseButton.css("backgroundPosition", "").unbind("mouseout", this.__clearInterval)
- .unbind("mouseup", this.__clearInterval);
+ button = this.decreaseButton;
}
+ button.css("backgroundPosition", " 50% 40%").unbind("mouseout", this.__clearInterval)
+ .unbind("mouseup", this.__clearInterval);
}
});
}(window.RichFaces, jQuery));
\ No newline at end of file
14 years, 3 months
JBoss Rich Faces SVN: r19277 - in branches/RF-9151: core/impl/src/main/java/org/richfaces/application and 21 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-21 10:31:52 -0400 (Tue, 21 Sep 2010)
New Revision: 19277
Added:
branches/RF-9151/core/impl/src/main/java/org/richfaces/application/GlobalResourcesViewHandler.java
branches/RF-9151/core/impl/src/main/resources/META-INF/global-resources.faces-config.xml
branches/RF-9151/examples/output-demo/src/main/webapp/qunit/tab.xhtml
branches/RF-9151/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js
branches/RF-9151/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js
branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java
branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java
branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTabPanel.java
branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/richfaces/
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
branches/RF-9151/ui/output/ui/src/test/java/org/richfaces/component/UICollapsiblePanelTest.java
branches/RF-9151/ui/output/ui/src/test/java/org/richfaces/component/UITogglePanelTitledItemTest.java
Removed:
branches/RF-9151/core/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java
branches/RF-9151/core/impl/src/main/resources/META-INF/skinning-resources-listener.faces-config.xml
branches/RF-9151/ui/core/ui/src/main/java/org/richfaces/component/QueuePreRenderViewListener.java
branches/RF-9151/ui/core/ui/src/main/resources/META-INF/queue-prender-listener.faces-config.xml
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/actlefttab_bg.gif
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/actrighttab_bg.gif
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab2_bg.gif
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab2_bottom_bg.gif
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab_bg.gif
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab_bottom_bg.gif
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/lefttab_bg.gif
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
Modified:
branches/RF-9151/
branches/RF-9151/core/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
branches/RF-9151/examples/input-demo/src/main/webapp/autocomplete.xhtml
branches/RF-9151/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/ClientBehavior.java
branches/RF-9151/ui/core/ui/src/main/java/org/richfaces/renderkit/html/QueueRendererBase.java
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/component/AbstractAutocomplete.java
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
branches/RF-9151/ui/input/ui/src/main/templates/autocomplete.template.xml
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
Log:
Merged revisions 19231-19234,19248-19249,19255-19256,19258-19262,19276 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r19231 | pyaschenko | 2010-09-17 11:01:17 +0300 (Fri, 17 Sep 2010) | 3 lines
https://jira.jboss.org/browse/RF-9105
onblur, onfocus, onchange, onselectitem user event handlers support was added
handlers script output was fixed
.......
r19232 | pyaschenko | 2010-09-17 11:11:22 +0300 (Fri, 17 Sep 2010) | 2 lines
https://jira.jboss.org/browse/RF-9105
onchange bubble fix
.......
r19233 | pyaschenko | 2010-09-17 11:38:05 +0300 (Fri, 17 Sep 2010) | 1 line
https://jira.jboss.org/browse/RFPL-761
.......
r19234 | pyaschenko | 2010-09-17 11:43:11 +0300 (Fri, 17 Sep 2010) | 1 line
https://jira.jboss.org/browse/RFPL-761
.......
r19248 | nbelaevski | 2010-09-17 21:15:10 +0300 (Fri, 17 Sep 2010) | 1 line
https://jira.jboss.org/browse/RF-8937
.......
r19249 | nbelaevski | 2010-09-17 22:05:01 +0300 (Fri, 17 Sep 2010) | 3 lines
Initialized merge tracking via "svnmerge" with revisions "1-18996" from
https://svn.jboss.org/repos/richfaces/branches/RF-7944
.......
r19255 | nbelaevski | 2010-09-19 02:11:09 +0300 (Sun, 19 Sep 2010) | 4 lines
Merged revisions 19109-19110,19113,19160,19199 via svnmerge from
https://svn.jboss.org/repos/richfaces/branches/RF-7944
.......
r19256 | nbelaevski | 2010-09-19 02:35:46 +0300 (Sun, 19 Sep 2010) | 1 line
Added missing configuration records for tab/tabPanel components
.......
r19258 | nbelaevski | 2010-09-19 03:41:18 +0300 (Sun, 19 Sep 2010) | 2 lines
https://jira.jboss.org/browse/RF-9344
added missing tab_bg.gif for tabPanel component
.......
r19259 | nbelaevski | 2010-09-19 04:21:32 +0300 (Sun, 19 Sep 2010) | 1 line
https://jira.jboss.org/browse/RF-9351
.......
r19260 | nbelaevski | 2010-09-20 11:09:38 +0300 (Mon, 20 Sep 2010) | 1 line
https://jira.jboss.org/browse/RF-9341
.......
r19261 | nbelaevski | 2010-09-20 11:56:19 +0300 (Mon, 20 Sep 2010) | 2 lines
https://jira.jboss.org/browse/RF-9361
https://jira.jboss.org/browse/RF-9363
.......
r19262 | nbelaevski | 2010-09-20 12:15:16 +0300 (Mon, 20 Sep 2010) | 1 line
Fixed duplicate ajax responses generation in tabPanel
.......
r19276 | konstantin.mishin | 2010-09-21 16:27:20 +0300 (Tue, 21 Sep 2010) | 3 lines
Removed merge tracking for "svnmerge" for
https://svn.jboss.org/repos/richfaces/branches/RF-7944
.......
Property changes on: branches/RF-9151
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-19211
+ /trunk:1-19276
Copied: branches/RF-9151/core/impl/src/main/java/org/richfaces/application/GlobalResourcesViewHandler.java (from rev 19276, trunk/core/impl/src/main/java/org/richfaces/application/GlobalResourcesViewHandler.java)
===================================================================
--- branches/RF-9151/core/impl/src/main/java/org/richfaces/application/GlobalResourcesViewHandler.java (rev 0)
+++ branches/RF-9151/core/impl/src/main/java/org/richfaces/application/GlobalResourcesViewHandler.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,187 @@
+/*
+ * 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.application;
+
+import java.io.ObjectStreamException;
+import java.util.List;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.application.Application;
+import javax.faces.application.ViewHandler;
+import javax.faces.application.ViewHandlerWrapper;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.application.configuration.ConfigurationService;
+import org.richfaces.el.BaseReadOnlyValueExpression;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class GlobalResourcesViewHandler extends ViewHandlerWrapper {
+
+ private static final String SKINNING_RESOURCE_ID = "__rf_skinning_resource";
+
+ private static final String CLASSES_ECSS = "_classes.ecss";
+
+ private static final String ECSS = ".ecss";
+
+ private static final String BOTH_ECSS = "_both.ecss";
+
+ private static final String CONTROLS_SKINNING;
+
+ private static final String BOTH_SKINNING;
+
+ private static final String CLASSES_SKINNING;
+
+ private static final String HEAD = "head";
+
+ static {
+ String skinningName = "skinning";
+
+ CONTROLS_SKINNING = skinningName + ECSS;
+ BOTH_SKINNING = skinningName + BOTH_ECSS;
+ CLASSES_SKINNING = skinningName + CLASSES_ECSS;
+
+ }
+
+ private ViewHandler viewHandler;
+
+ public GlobalResourcesViewHandler(ViewHandler viewHandler) {
+ super();
+ this.viewHandler = viewHandler;
+ }
+
+ @Override
+ public ViewHandler getWrapped() {
+ return viewHandler;
+ }
+
+ private static final class SkinningResourceNameExpression extends BaseReadOnlyValueExpression {
+
+ public static final ValueExpression INSTANCE = new SkinningResourceNameExpression();
+
+ private static final long serialVersionUID = 7520575496522682120L;
+
+ private SkinningResourceNameExpression() {
+ super(String.class);
+ }
+
+ @Override
+ public Object getValue(ELContext context) {
+ FacesContext facesContext = getFacesContext(context);
+
+ ConfigurationService configurationService = ServiceTracker.getService(ConfigurationService.class);
+
+ boolean controls = configurationService.getBooleanValue(facesContext, CoreConfiguration.Items.standardControlsSkinning);
+ boolean classes = configurationService.getBooleanValue(facesContext, CoreConfiguration.Items.standardControlsSkinningClasses);
+
+ if (controls && classes) {
+ return BOTH_SKINNING;
+ }
+
+ if (classes) {
+ return CLASSES_SKINNING;
+ }
+
+ return CONTROLS_SKINNING;
+ }
+
+ private Object readResolve() throws ObjectStreamException {
+ return INSTANCE;
+ }
+
+ }
+
+ private static final class SkinningResourceRenderedExpression extends BaseReadOnlyValueExpression {
+
+ public static final ValueExpression INSTANCE = new SkinningResourceRenderedExpression();
+
+ private static final long serialVersionUID = -1579256471133808739L;
+
+ private SkinningResourceRenderedExpression() {
+ super(Boolean.TYPE);
+ }
+
+ @Override
+ public Object getValue(ELContext context) {
+ FacesContext facesContext = getFacesContext(context);
+
+ ConfigurationService configurationService = ServiceTracker.getService(ConfigurationService.class);
+
+ return configurationService.getBooleanValue(facesContext, CoreConfiguration.Items.standardControlsSkinning) ||
+ configurationService.getBooleanValue(facesContext, CoreConfiguration.Items.standardControlsSkinningClasses);
+ }
+
+ private Object readResolve() throws ObjectStreamException {
+ return INSTANCE;
+ }
+ }
+
+ private UIComponent createComponentResource(FacesContext context) {
+ Application application = context.getApplication();
+
+ //renderkit id is not set on FacesContext at this point, so calling
+ //application.createComponent(context, componentType, rendererType) causes NPE
+ UIComponent resourceComponent = application.createComponent(UIOutput.COMPONENT_TYPE);
+
+ String rendererType = application.getResourceHandler().getRendererTypeForResourceName(BOTH_SKINNING);
+ resourceComponent.setRendererType(rendererType);
+
+ return resourceComponent;
+ }
+
+ @Override
+ public UIViewRoot createView(FacesContext context, String viewId) {
+ UIViewRoot viewRoot = super.createView(context, viewId);
+
+ boolean skinningResourceFound = false;
+ List<UIComponent> resources = viewRoot.getComponentResources(context, HEAD);
+ for (UIComponent resource : resources) {
+ if (SKINNING_RESOURCE_ID.equals(resource.getId())) {
+ skinningResourceFound = true;
+ break;
+ }
+ }
+
+ if (!skinningResourceFound) {
+ //it's important for skinning resources to come *before* any users/components stylesheet,
+ //that's why they are *always* added here
+ UIComponent basic = createComponentResource(context);
+ basic.setValueExpression("name", SkinningResourceNameExpression.INSTANCE);
+ basic.setValueExpression("rendered", SkinningResourceRenderedExpression.INSTANCE);
+ basic.setId(SKINNING_RESOURCE_ID);
+
+ //workaround for Mojarra: RF-8937
+ boolean initialProcessingEvents = context.isProcessingEvents();
+ context.setProcessingEvents(false);
+ viewRoot.addComponentResource(context, basic);
+ context.setProcessingEvents(initialProcessingEvents);
+ }
+
+ return viewRoot;
+ }
+}
Deleted: branches/RF-9151/core/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java
===================================================================
--- branches/RF-9151/core/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/core/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -1,167 +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.context;
-
-import java.util.List;
-
-import javax.el.ELContext;
-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.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-
-import org.richfaces.application.CoreConfiguration;
-import org.richfaces.application.ServiceTracker;
-import org.richfaces.application.configuration.ConfigurationService;
-import org.richfaces.el.BaseReadOnlyValueExpression;
-
-/**
- * @author Nick Belaevski
- *
- */
-public class SkinningResourcesPhaseListener implements PhaseListener {
-
- private static final long serialVersionUID = 7430448731396547419L;
-
- private static final String SKINNING_RESOURCE_MARKER = SkinningResourcesPhaseListener.class.getName();
-
- private static final String CLASSES_ECSS = "_classes.ecss";
-
- private static final String ECSS = ".ecss";
-
- private static final String BOTH_ECSS = "_both.ecss";
-
- private static final String CONTROLS_SKINNING;
-
- private static final String BOTH_SKINNING;
-
- private static final String CLASSES_SKINNING;
-
- private static final String HEAD = "head";
-
- static {
- String skinningName = "skinning";
-
- CONTROLS_SKINNING = skinningName + ECSS;
- BOTH_SKINNING = skinningName + BOTH_ECSS;
- CLASSES_SKINNING = skinningName + CLASSES_ECSS;
-
- }
-
- private static final class SkinningResourceNameExpression extends BaseReadOnlyValueExpression {
-
- private static final long serialVersionUID = 7520575496522682120L;
-
- public SkinningResourceNameExpression() {
- super(String.class);
- }
-
- @Override
- public Object getValue(ELContext context) {
- FacesContext facesContext = getFacesContext(context);
-
- ConfigurationService configurationService = ServiceTracker.getService(ConfigurationService.class);
-
- boolean controls = configurationService.getBooleanValue(facesContext, CoreConfiguration.Items.standardControlsSkinning);
- boolean classes = configurationService.getBooleanValue(facesContext, CoreConfiguration.Items.standardControlsSkinningClasses);
-
- if (controls && classes) {
- return BOTH_SKINNING;
- }
-
- if (classes) {
- return CLASSES_SKINNING;
- }
-
- return CONTROLS_SKINNING;
- }
-
- }
-
- private static final class SkinningResourceRenderedExpression extends BaseReadOnlyValueExpression {
-
- private static final long serialVersionUID = -1579256471133808739L;
-
- public SkinningResourceRenderedExpression() {
- super(Boolean.TYPE);
- }
-
- @Override
- public Object getValue(ELContext context) {
- FacesContext facesContext = getFacesContext(context);
-
- ConfigurationService configurationService = ServiceTracker.getService(ConfigurationService.class);
-
- return configurationService.getBooleanValue(facesContext, CoreConfiguration.Items.standardControlsSkinning) ||
- configurationService.getBooleanValue(facesContext, CoreConfiguration.Items.standardControlsSkinningClasses);
- }
-
- }
-
- private UIComponent createComponentResource(FacesContext context) {
- Application application = context.getApplication();
- String rendererType = application.getResourceHandler().getRendererTypeForResourceName(BOTH_SKINNING);
- UIComponent resourceComponent = application.createComponent(context, UIOutput.COMPONENT_TYPE, rendererType);
-
- return resourceComponent;
- }
-
- public void afterPhase(PhaseEvent event) {
- //not used
- }
-
- public void beforePhase(PhaseEvent event) {
- //it's important for skinning resources to come *before* any users/components stylesheet,
- //that's why they are added via phase listener
-
- FacesContext context = event.getFacesContext();
- UIViewRoot viewRoot = context.getViewRoot();
-
- assert viewRoot != null;
-
- boolean skinnigResourceFound = false;
- List<UIComponent> resources = viewRoot.getComponentResources(context, HEAD);
- for (UIComponent resource : resources) {
- if (resource.getAttributes().get(SKINNING_RESOURCE_MARKER) != null) {
- skinnigResourceFound = true;
- break;
- }
- }
-
- if (!skinnigResourceFound) {
- UIComponent basic = createComponentResource(context);
- basic.setValueExpression("name", new SkinningResourceNameExpression());
- basic.setValueExpression("rendered", new SkinningResourceRenderedExpression());
- basic.getAttributes().put(SKINNING_RESOURCE_MARKER, Boolean.TRUE);
-
- viewRoot.addComponentResource(context, basic);
- }
- }
-
- public PhaseId getPhaseId() {
- return PhaseId.RENDER_RESPONSE;
- }
-}
Copied: branches/RF-9151/core/impl/src/main/resources/META-INF/global-resources.faces-config.xml (from rev 19276, trunk/core/impl/src/main/resources/META-INF/global-resources.faces-config.xml)
===================================================================
--- branches/RF-9151/core/impl/src/main/resources/META-INF/global-resources.faces-config.xml (rev 0)
+++ branches/RF-9151/core/impl/src/main/resources/META-INF/global-resources.faces-config.xml 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee" version="2.0">
+ <name>richfaces</name>
+
+ <application>
+ <view-handler>org.richfaces.application.GlobalResourcesViewHandler</view-handler>
+ </application>
+
+</faces-config>
\ No newline at end of file
Modified: branches/RF-9151/core/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
===================================================================
--- branches/RF-9151/core/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/core/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-09-21 14:31:52 UTC (rev 19277)
@@ -4,6 +4,8 @@
(function ($, richfaces, params) {
+
+ var RICH_CONTAINER = "richfaces";
richfaces.blankFunction = function (){}; //TODO: add it to global library
@@ -19,6 +21,13 @@
richfaces.MyComponent = function(componentId, [options]) {
// call constructor of parent class
$super.constructor.call(this, componentId, [options]);
+
+ <span style="color:red">
+ // call this.attachToDom method to attach component to dom element
+ // its required for the client side API calls and to clean up after ajax request or page unload:
+ // destroy method will be called if component attached to dom
+ this.attachToDom(componentId);
+ </span>
};
// define private method
@@ -35,7 +44,14 @@
$.extend(richfaces.MyComponent.prototype, (function (params) {
return {
name:"MyComponent",
- f:function (){alert("hello");
+ f:function (){alert("hello"),
+ // destroy method definition for clean up
+ destroy: function () {
+ // clean up code here
+
+ // call parent's destroy method
+ $super.destroy.call(this);
+ }
}
};
})(params));
@@ -50,6 +66,7 @@
* */
richfaces.BaseComponent = function(componentId) {
this.id = componentId;
+ this.options = {};
};
var $p = {};
@@ -149,7 +166,7 @@
$.extend(DerivedClass.prototype, methods);
return DerivedClass;
- },
+ };
$.extend(richfaces.BaseComponent.prototype, (function (params) {
return {
@@ -177,6 +194,13 @@
result[result.length] = this.name;
return result.join(', ');
},
+
+ /** TODO: add jsdocs and qunit tests
+ *
+ */
+ getValue: function() {
+ return;
+ },
/**
* Method returns element's id for event handlers binding.
@@ -193,6 +217,8 @@
/**
* Attach component object to DOM element by component id, DOM element or jQuery object and returns the element
+ * Its required for the client side API calls and to clean up after ajax request or document unload by
+ * calling destroy method
*
* @function
* @name RichFaces.BaseComponent#attachToDom
@@ -204,7 +230,7 @@
source = source || this.id;
var element = richfaces.getDomElement(source);
if (element) {
- element["richfaces"] = element["richfaces"] || {};
+ element[RICH_CONTAINER] = element[RICH_CONTAINER] || {};
element.richfaces.component = this;
}
return element;
@@ -223,7 +249,45 @@
var element = richfaces.getDomElement(source);
element && element.richfaces && (element.richfaces.component=null);
},
+
+ /** TODO: add jsdocs and qunit tests
+ *
+ */
+ invokeEvent: function(eventType, element, event, data) {
+ var handlerResult, result;
+ var eventObj = $.extend({}, event, {type: eventType});
+ if (!eventObj)
+ {
+ if( document.createEventObject )
+ {
+ eventObj = document.createEventObject();
+ eventObj.type = eventType;
+ }
+ else if( document.createEvent )
+ {
+ eventObj = document.createEvent('Events');
+ eventObj.initEvent( eventType, true, false );
+ }
+ }
+ eventObj[RICH_CONTAINER] = {component:this, data: data};
+
+ var eventHandler = this.options['on'+eventType];
+
+ if (typeof eventHandler == "function")
+ {
+ handlerResult = eventHandler.call(element, eventObj);
+ }
+
+ if (richfaces.Event) {
+ result = richfaces.Event.callHandler(this, eventType, data);
+ }
+
+ if (result!=false && handlerResult!=false) result=true;
+
+ return result;
+ },
+
/**
* Destroy method. Will be called before remove component from the page
*
Deleted: branches/RF-9151/core/impl/src/main/resources/META-INF/skinning-resources-listener.faces-config.xml
===================================================================
--- branches/RF-9151/core/impl/src/main/resources/META-INF/skinning-resources-listener.faces-config.xml 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/core/impl/src/main/resources/META-INF/skinning-resources-listener.faces-config.xml 2010-09-21 14:31:52 UTC (rev 19277)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee" version="2.0">
- <name>richfaces</name>
- <lifecycle>
- <phase-listener>org.richfaces.context.SkinningResourcesPhaseListener</phase-listener>
- </lifecycle>
-</faces-config>
\ No newline at end of file
Modified: branches/RF-9151/examples/input-demo/src/main/webapp/autocomplete.xhtml
===================================================================
--- branches/RF-9151/examples/input-demo/src/main/webapp/autocomplete.xhtml 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/examples/input-demo/src/main/webapp/autocomplete.xhtml 2010-09-21 14:31:52 UTC (rev 19277)
@@ -3,7 +3,8 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:input="http://richfaces.org/input">
+ xmlns:input="http://richfaces.org/input"
+ xmlns:a4j="http://richfaces.org/a4j">
<f:view contentType="text/html" />
<h:head>
@@ -18,15 +19,21 @@
<f:selectItem itemValue="client"/>
<f:selectItem itemValue="cachedAjax"/>
<f:selectItem itemValue="ajax"/>
- </h:selectOneMenu>
- <div style="height: 300px; width: 300px; overflow: auto;">Text
+ </h:selectOneMenu><br/>
+ <div style="height: 300px; width: 300px; overflow: auto; float:left;">Text
block text block text block text block text block text block text
block text block
- <input:autocomplete clientFilter="if(subString.length>1) if(value.indexOf(subString)!=-1) return true;" mode="#{autoCompleteBean.mode}" minChars="2" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" fetchValue="#{country.name}" showButton="true">
+ <input:autocomplete id="myAutocomplete" clientFilter="if(subString.length>1) if(value.indexOf(subString)!=-1) return true;" mode="#{autoCompleteBean.mode}" minChars="2" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" fetchValue="#{country.name}" showButton="true"
+ onchange="return onEvent.call(this, event);" onselectitem="return onEvent.call(this, event);" onblur="return onEvent.call(this, event);" onfocus="return onEvent.call(this, event);">
#{country.name} #{country.iso} #{country.domain}
</input:autocomplete>
-
+ <script type="text/javascript">
+ onEvent = function(event, element, data){
+ RichFaces.log.info("jQuery Event: "+(event instanceof jQuery.Event)+"; event: "+event.type+"; data:"+(data || (event['rich']||{})['data'])+"; this.id:"+this.id+"; component:"+ (event['rich']||{})['component']||RichFaces.$(this.id));
+ };
+ RichFaces.Event.bindById("form:myAutocomplete", "selectitem change blur focus", onEvent);
+ </script>
<br />
<select style="width: 200px" name="select">
<option>ccccc</option>
@@ -60,6 +67,9 @@
block text block text block text block text block text block text
block text block text block
</div>
+ <div>
+ <a4j:log mode="inline"></a4j:log>
+ </div>
</h:form>
</h:body>
</html>
Copied: branches/RF-9151/examples/output-demo/src/main/webapp/qunit/tab.xhtml (from rev 19276, trunk/examples/output-demo/src/main/webapp/qunit/tab.xhtml)
===================================================================
--- branches/RF-9151/examples/output-demo/src/main/webapp/qunit/tab.xhtml (rev 0)
+++ branches/RF-9151/examples/output-demo/src/main/webapp/qunit/tab.xhtml 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,259 @@
+<!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:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:pn="http://richfaces.org/output">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="scripts">
+ <h:outputScript name="qunit/qunit.js" />
+ <h:outputScript name="qunit/richfaces-qunit.js" />
+
+ <h:outputScript name="Tab.js" />
+ <h:outputScript name="TabPanel.js" />
+
+ <h:outputStylesheet name="qunit/qunit.css" />
+ </ui:define>
+
+ <ui:define name="title">Tab Example</ui:define>
+ <ui:define name="body_head">Tab Example</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="f" style="border:blue solid thin;">
+ <pn:accordion >
+ <pn:accordionItem></pn:accordionItem>
+ </pn:accordion>
+
+ <div id="f:panel" style="width: 100%;">
+ <input type="hidden" name="f:panel-value" id="f:panel-value" value="name1" />
+ <script type="text/javascript">
+ new RichFaces.ui.TabPanel(
+ "f:panel",
+ {
+ "onbeforeitemchange":function(event){RichFaces.ajax("f:panel",event,{"incId":"1"} )},
+ "onitemchange":function(event){RichFaces.ajax("f:panel",event,{"incId":"1"} )},
+ "activeItem":"name1",
+ "ajax":{"incId":"1"} ,
+ "cycledSwitching":false,
+ "isKeepHeight":true
+ }
+ )
+
+ </script>
+
+ <div id="f:panel:header" class="rftp_toptab_tabline_vis">
+ <div class="rftp_toptab_tabs">
+ <div style="display: table-row;">
+ <div style="padding-left: 5px;" class="rftp_toptab_spacer" ></div>
+
+ <div id="f:name1:header">
+ <div id="f:name1:header:active" class="rftp_toptab rftp_active_top">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt=""/>
+ </div>
+ <div class="rftp_label">Tab name 1 Active</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close.gif" alt=""/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name1:header:inactive" style="display:none" class="rftp_toptab rftp_active_top">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt=""/>
+ </div>
+ <div class="rftp_label">Tab name 1 Inactive</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close.gif" alt=""/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name1:header:disabled" style="display:none" class="rftp_toptab rftp_active_top">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt=""/>
+ </div>
+ <div class="rftp_label">Tab name 1 Disabled</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close.gif" alt=""/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="rftp_toptab_spacer rftp_horizonttab_tabspacer_width"></div>
+
+ <div id="f:name2:header">
+ <div id="f:name2:header:active" style="display:none" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 2 Active</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name2:header:inactive" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 2 Inactive</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name2:header:disabled" style="display:none" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 2 Disabled</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="rftp_toptab_spacer rftp_horizonttab_tabspacer_width"></div>
+
+ <div id="f:name3:header">
+ <div id="f:name3:header:active" style="display:none" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 3 Active</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name3:header:inactive" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 3 Inactive</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name3:header:disabled" style="display:none" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 3 Disabled</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="rftp_toptab_spacer rftp_horizonttab_tabspacer_width"></div>
+
+ <div style="padding-right: 5px; width: 100%;" class="rftp_toptab_spacer"></div>
+ </div>
+ </div>
+
+ <div class="rftp_toptab_scroll_left rftp_hidden">«</div>
+ <div class="rftp_toptab_tabslist rftp_hidden">↓</div>
+ <div class="rftp_toptab_scroll_right rftp_hidden">»</div>
+ </div>
+
+ <div class="rftp_toptab_border"></div>
+
+ <div id="f:panel:content" >
+ <div id="f:name1" class="rftp_toptab_content" >
+ <script type="text/javascript">
+ new RichFaces.ui.Tab(
+ "f:name1",
+ {
+ "onleave":function(event){RichFaces.ajax("f:name1",event,{"incId":"1"} )},
+ "onenter":function(event){RichFaces.ajax("f:name1",event,{"incId":"1"} )},
+ "index":0,
+ "togglePanelId":"f:panel",
+ "switchMode":"client",
+ "name":"name1"
+ }
+ )
+ </script>
+ Content 01 will be here.
+ </div>
+ <div id="f:name2" class="rftp_toptab_content" style="display:none;">
+ <script type="text/javascript">
+ new RichFaces.ui.Tab(
+ "f:name2",
+ {
+ "onleave":function(event){RichFaces.ajax("f:name2",event,{"incId":"1"} )},
+ "onenter":function(event){RichFaces.ajax("f:name2",event,{"incId":"1"} )},
+ "index":1,
+ "togglePanelId":"f:panel",
+ "switchMode":"client",
+ "name":"name2"
+ }
+ )
+ </script>
+ Content 02 will be here.
+ </div>
+ <div id="f:name3" class="rftp_toptab_content" style="display:none;">
+ <script type="text/javascript">
+ new RichFaces.ui.Tab(
+ "f:name3",
+ {
+ "onleave":function(event){RichFaces.ajax("f:name3",event,{"incId":"1"} )},
+ "onenter":function(event){RichFaces.ajax("f:name3",event,{"incId":"1"} )},
+ "index":2,
+ "togglePanelId":"f:panel",
+ "switchMode":"client",
+ "name":"name3"
+ }
+ )
+ </script>
+ Content 03 will be here.
+ </div>
+ </div>
+ </div>
+
+ </h:form>
+
+ <p>Result</p>
+ <div>
+ <ol id="qunit-tests"></ol>
+
+ <div id="testDiv" style="margin-top:10px; border:1px solid #a0a0a0">Main Test Div</div>
+ </div>
+ <h:outputScript name="tests/richfaces-tab-qunit.js" />
+ </ui:define>
+</ui:composition>
+</body>
+</html>
+
Copied: branches/RF-9151/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js (from rev 19276, trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js)
===================================================================
--- branches/RF-9151/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js (rev 0)
+++ branches/RF-9151/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
+
+RichFaces.QUnit.run(function() {
+ module("richfaces-accordion-item");
+
+ var ACCORDION_ITEM_ID = "f:panel";
+
+ test("RichFaces.ui.AccordionItem test constructor", function () {
+ var c = RichFaces.$(ACCORDION_ITEM_ID);
+
+ ok(c instanceof RichFaces.ui.AccordionItem, "inctance of RichFaces.ui.AccordionItem");
+ equals(c.id, ACCORDION_ITEM_ID, "id");
+ // TODO other params
+
+ });
+
+ test("RichFaces.ui.AccordionItem test public api", function () {
+ var c = RichFaces.$(ACCORDION_ITEM_ID);
+
+ var PUBLIC_API = [/* ... */];
+
+ for (i in PUBLIC_API) {
+ var funcName = PUBLIC_API[i];
+ ok(c.[funcName], funcName + "present in component")
+ // TODO check other functions + check is it function
+ }
+ });
+
+ test("RichFaces.ui.AccordionItem test events", function () {
+ var componentId = ACCORDION_ITEM_ID;
+ var c = RichFaces.$(componentId);
+
+ expect(5);
+ var beforeitemchngeHandler = function (event, comp, data) {
+ ok(true, "beforeitemchnge handler invouked");
+
+ same(data.id, componentId, "component id");
+ same(data.oldItem.getName(), c.items[0].getName(), "old item");
+ same(data.newItem.getName(), c.items[1].getName(), "new item");
+
+ return true;
+ };
+
+ var beforeitemchngeHandlerWrapper = RichFaces.Event.bindById(componentId, "beforeitemchange", beforeitemchngeHandler);
+
+ var itemchangeHandler = handler("itemchnge handler invouked", undefined);
+ var itemchangeHandlerWrapper = RichFaces.Event.bindById(componentId, "itemchange", itemchangeHandler);
+
+ c.switchToItem("name2");
+
+ RichFaces.Event.unbindById(componentId, "beforeitemchange", beforeitemchngeHandlerWrapper);
+ RichFaces.Event.unbindById(componentId, "itemchange", itemchangeHandlerWrapper);
+
+ c.switchToItem("name1");
+ });
+});
Copied: branches/RF-9151/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js (from rev 19276, trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js)
===================================================================
--- branches/RF-9151/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js (rev 0)
+++ branches/RF-9151/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
+
+RichFaces.QUnit.run(function() {
+ module("richfaces-tab");
+
+ var TAB_ID = "f:panel";
+
+ test("RichFaces.ui.Tab test constructor", function () {
+ var c = RichFaces.$(TAB_ID);
+
+ ok(c instanceof RichFaces.ui.Tab, "inctance of RichFaces.ui.Tab");
+ equals(c.id, TAB_ID, "id");
+ // TODO other params
+
+ });
+
+ test("RichFaces.ui.Tab test public api", function () {
+ var c = RichFaces.$(TAB_ID);
+
+ var PUBLIC_API = [/* ... */];
+
+ for (var i in PUBLIC_API) {
+ var funcName = PUBLIC_API[i];
+ ok(c.[funcName], funcName + "present in component");
+ // TODO check other functions + check is it function
+ }
+ });
+
+ test("RichFaces.ui.Tab test events", function () {
+ var componentId = TAB_ID;
+ var c = RichFaces.$(componentId);
+
+ expect(5);
+ var beforeitemchngeHandler = function (event, comp, data) {
+ ok(true, "beforeitemchnge handler invouked");
+
+ same(data.id, componentId, "component id");
+ same(data.oldItem.getName(), c.items[0].getName(), "old item");
+ same(data.newItem.getName(), c.items[1].getName(), "new item");
+
+ return true;
+ };
+
+ var beforeitemchngeHandlerWrapper = RichFaces.Event.bindById(componentId, "beforeitemchange", beforeitemchngeHandler);
+
+ var itemchangeHandler = handler("itemchnge handler invouked", undefined);
+ var itemchangeHandlerWrapper = RichFaces.Event.bindById(componentId, "itemchange", itemchangeHandler);
+
+ c.switchToItem("name2");
+
+ RichFaces.Event.unbindById(componentId, "beforeitemchange", beforeitemchngeHandlerWrapper);
+ RichFaces.Event.unbindById(componentId, "itemchange", itemchangeHandlerWrapper);
+
+ c.switchToItem("name1");
+ });
+});
Modified: branches/RF-9151/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/ClientBehavior.java
===================================================================
--- branches/RF-9151/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/ClientBehavior.java 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/ClientBehavior.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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]));
}
Deleted: branches/RF-9151/ui/core/ui/src/main/java/org/richfaces/component/QueuePreRenderViewListener.java
===================================================================
--- branches/RF-9151/ui/core/ui/src/main/java/org/richfaces/component/QueuePreRenderViewListener.java 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/core/ui/src/main/java/org/richfaces/component/QueuePreRenderViewListener.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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: branches/RF-9151/ui/core/ui/src/main/java/org/richfaces/renderkit/html/QueueRendererBase.java
===================================================================
--- branches/RF-9151/ui/core/ui/src/main/java/org/richfaces/renderkit/html/QueueRendererBase.java 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/core/ui/src/main/java/org/richfaces/renderkit/html/QueueRendererBase.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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: branches/RF-9151/ui/core/ui/src/main/resources/META-INF/queue-prender-listener.faces-config.xml
===================================================================
--- branches/RF-9151/ui/core/ui/src/main/resources/META-INF/queue-prender-listener.faces-config.xml 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/core/ui/src/main/resources/META-INF/queue-prender-listener.faces-config.xml 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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
Modified: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/component/AbstractAutocomplete.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/component/AbstractAutocomplete.java 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/component/AbstractAutocomplete.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -177,13 +177,10 @@
@Attribute(events = @EventName("focus"))
public abstract String getOnfocus();
+
+ @Attribute(events = @EventName("selectitem"))
+ public abstract String getOnselectitem();
- @Attribute(events = @EventName("listblur"))
- public abstract String getOnlistblur();
-
- @Attribute(events = @EventName("listfocus"))
- public abstract String getOnlistfocus();
-
@Attribute(events = @EventName("begin"))
public abstract String getOnbegin();
Modified: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -53,6 +53,7 @@
import org.richfaces.component.MetaComponentResolver;
import org.richfaces.component.util.InputUtils;
import org.richfaces.renderkit.util.RendererUtils;
+import org.richfaces.renderkit.util.RendererUtils.ScriptHashVariableWrapper;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterators;
@@ -97,11 +98,14 @@
utils.addToScriptHash(options, "disabled", attributes.get("disabled"), "false");
utils.addToScriptHash(options, "selectFirst", attributes.get("selectFirst"), "true");
utils.addToScriptHash(options, "tokens", attributes.get("tokens"));
- utils.addToScriptHash(options, "onbegin", attributes.get("onbegin"));
- utils.addToScriptHash(options, "oncomplete", attributes.get("oncomplete"));
- utils.addToScriptHash(options, "onerror", attributes.get("onerror"));
- utils.addToScriptHash(options, "onbeforedomupdate", attributes.get("onbeforedomupdate"));
- utils.addToScriptHash(options, "onchange", attributes.get("onchange"));
+ utils.addToScriptHash(options, "onbegin", attributes.get("onbegin"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
+ utils.addToScriptHash(options, "oncomplete", attributes.get("oncomplete"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
+ utils.addToScriptHash(options, "onerror", attributes.get("onerror"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
+ utils.addToScriptHash(options, "onbeforedomupdate", attributes.get("onbeforedomupdate"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
+ utils.addToScriptHash(options, "onchange", attributes.get("onchange"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
+ utils.addToScriptHash(options, "onselectitem", attributes.get("onselectitem"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
+ utils.addToScriptHash(options, "onfocus", attributes.get("onfocus"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
+ utils.addToScriptHash(options, "onblur", attributes.get("onblur"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
utils.addToScriptHash(options, "filterFunction", getClientFilterFunction(component));
String mode = (String) attributes.get("mode");
if (mode != null) {
Modified: branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2010-09-21 14:31:52 UTC (rev 19277)
@@ -168,7 +168,7 @@
var index = this.items.index(element);
selectItem.call(this, event, index);
} else {
- this.__onChangeValue(event, getSelectedItemValue.call(this));
+ this.__onEnter(event);
rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
this.hide(event);
}
@@ -431,10 +431,9 @@
__onBeforeShow: function (event) {
},
__onEnter: function (event) {
- this.__onChangeValue(event, getSelectedItemValue.call(this));
- //rf.getDomElement(this.fieldId).blur();
- //rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
- //rf.getDomElement(this.fieldId).focus();
+ var value = getSelectedItemValue.call(this);
+ this.__onChangeValue(event, value);
+ this.invokeEvent("selectitem", rf.getDomElement(this.fieldId), event, value);
},
__onShow: function (event) {
if (this.options.selectFirst) {
Modified: branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2010-09-21 14:31:52 UTC (rev 19277)
@@ -76,6 +76,7 @@
inputEventHandlers["blur"+this.namespace] = onBlur;
inputEventHandlers["click"+this.namespace] = onClick;
inputEventHandlers[($.browser.opera ? "keypress" : "keydown")+this.namespace] = onKeyDown;
+ inputEventHandlers["change"+this.namespace] = function (event) {if (this.focused) {event.stopPropagation()}};
rf.Event.bindById(this.fieldId, inputEventHandlers, this);
inputEventHandlers = {};
@@ -107,17 +108,29 @@
};
var onFocus = function (event) {
- this.focused = true;
+ if (!this.focused) {
+ this.__focusValue = this.getInputValue();
+ this.focused = true;
+ this.invokeEvent("focus", rf.getDomElement(this.fieldId), event);
+ }
};
var onBlur = function (event) {
if (this.isMouseDown) {
rf.getDomElement(this.fieldId).focus();
this.isMouseDown = false;
- } else if (this.isVisible && !this.isMouseDown) {
- var _this = this;
- this.timeoutId = window.setTimeout(function(){_this.hide();}, 200);
- this.focused=false;
+ } else if (!this.isMouseDown) {
+ if (this.isVisible) {
+ var _this = this;
+ this.timeoutId = window.setTimeout(function(){_this.hide();}, 200);
+ }
+ if (this.focused) {
+ this.focused=false;
+ this.invokeEvent("blur", rf.getDomElement(this.fieldId), event);
+ if (this.__focusValue != this.getInputValue()) {
+ this.invokeEvent("change", rf.getDomElement(this.fieldId), event);
+ }
+ }
}
};
Modified: branches/RF-9151/ui/input/ui/src/main/templates/autocomplete.template.xml
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/templates/autocomplete.template.xml 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/input/ui/src/main/templates/autocomplete.template.xml 2010-09-21 14:31:52 UTC (rev 19277)
@@ -23,8 +23,6 @@
onmouseup="#{component.attributes['onmouseup']}"
onmousedown="#{component.attributes['onmousedown']}"
onmousemove="#{component.attributes['onmousemove']}"
- onblur="#{component.attributes['onblur']}"
- onfocus="#{component.attributes['onfocus']}"
onmouseover="#{component.attributes['onmouseover']}"
onmouseout="#{component.attributes['onmouseout']}"
onkeyup="#{component.attributes['onkeyup']}"
@@ -51,8 +49,6 @@
onmousemove="#{component.attributes['onlistmousemove']}"
onmouseover="#{component.attributes['onlistmouseover']}"
onmouseout="#{component.attributes['onlistmouseout']}"
- onblur="#{component.attributes['onlistblur']}"
- onfocus="#{component.attributes['onlistfocus']}"
onkeyup="#{component.attributes['onlistkeyup']}"
onkeydown="#{component.attributes['onlistkeydown']}"
onkeypress="#{component.attributes['onlistkeypress']}"
Copied: branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java (from rev 19276, trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java)
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java (rev 0)
+++ branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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;
+
+
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-24
+ */
+public abstract class AbstractTabPanel extends UITogglePanel {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.TabPanel";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.TabPanel";
+
+ protected AbstractTabPanel() {
+ setRendererType("org.richfaces.TabPanel");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+
+
+}
Copied: branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java (from rev 19276, trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java)
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java (rev 0)
+++ branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,304 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.html;
+
+import org.richfaces.component.UITogglePanelTitledItem;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-27
+ */
+public class HtmlTab extends UITogglePanelTitledItem implements ClientBehaviorHolder {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.TogglePanelTitledItem";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.TogglePanelTitledItem";
+
+ private static final Collection<String> EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList(
+ "headerclick",
+ "headerdblclick",
+ "headermousedown",
+ "headermousemove",
+ "headermouseup",
+ "enter",
+ "leave",
+ "click",
+ "dblclick",
+ "mousedown",
+ "mousemove",
+ "mouseout",
+ "mouseover",
+ "mouseup"
+ ));
+
+
+ public enum PropertyKeys {
+ headerClassActive,
+ headerClassDisabled,
+ headerClassInactive,
+ headerClass,
+ headerStyle,
+ contentClass,
+ onheaderclick,
+ onheaderdblclick,
+ onheadermousedown,
+ onheadermousemove,
+ onheadermouseup,
+ onenter,
+ onleave,
+ lang,
+ title,
+ style,
+ styleClass,
+ dir,
+ onclick,
+ ondblclick,
+ onmousedown,
+ onmousemove,
+ onmouseout,
+ onmouseover,
+ onmouseup
+ }
+
+ public HtmlTab() {
+ setRendererType("org.richfaces.Tab");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public String getHeaderClassActive() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassActive);
+ }
+
+ public void setHeaderClassActive(String headerClassActive) {
+ getStateHelper().put(PropertyKeys.headerClassActive, headerClassActive);
+ }
+
+ public String getHeaderClassDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassDisabled);
+ }
+
+ public void setHeaderClassDisabled(String headerClassDisabled) {
+ getStateHelper().put(PropertyKeys.headerClassDisabled, headerClassDisabled);
+ }
+
+ public String getHeaderClassInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassInactive);
+ }
+
+ public void setHeaderClassInactive(String headerClassInactive) {
+ getStateHelper().put(PropertyKeys.headerClassInactive, headerClassInactive);
+ }
+
+ public String getHeaderClass() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClass);
+ }
+
+ public void setHeaderClass(String headerClass) {
+ getStateHelper().put(PropertyKeys.headerClass, headerClass);
+ }
+
+ public String getHeaderStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.headerStyle);
+ }
+
+ public void setHeaderStyle(String headerStyle) {
+ getStateHelper().put(PropertyKeys.headerStyle, headerStyle);
+ }
+
+ public String getContentClass() {
+ return (String) getStateHelper().eval(PropertyKeys.contentClass);
+ }
+
+ public void setContentClass(String contentClass) {
+ getStateHelper().put(PropertyKeys.contentClass, contentClass);
+ }
+
+ public String getOnheaderclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onheaderclick);
+ }
+
+ public void setOnheaderclick(String onheaderclick) {
+ getStateHelper().put(PropertyKeys.onheaderclick, onheaderclick);
+ }
+
+ public String getOnheaderdblclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onheaderdblclick);
+ }
+
+ public void setOnheaderdblclick(String onheaderdblclick) {
+ getStateHelper().put(PropertyKeys.onheaderdblclick, onheaderdblclick);
+ }
+
+ public String getOnheadermousedown() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermousedown);
+ }
+
+ public void setOnheadermousedown(String onheadermousedown) {
+ getStateHelper().put(PropertyKeys.onheadermousedown, onheadermousedown);
+ }
+
+ public String getOnheadermousemove() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermousemove);
+ }
+
+ public void setOnheadermousemove(String onheadermousemove) {
+ getStateHelper().put(PropertyKeys.onheadermousemove, onheadermousemove);
+ }
+
+ public String getOnheadermouseup() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermouseup);
+ }
+
+ public void setOnheadermouseup(String onheadermouseup) {
+ getStateHelper().put(PropertyKeys.onheadermouseup, onheadermouseup);
+ }
+
+ public String getOnenter() {
+ return (String) getStateHelper().eval(PropertyKeys.onenter);
+ }
+
+ public void setOnenter(String onenter) {
+ getStateHelper().put(PropertyKeys.onenter, onenter);
+ }
+
+ public String getOnleave() {
+ return (String) getStateHelper().eval(PropertyKeys.onleave);
+ }
+
+ public void setOnleave(String onleave) {
+ getStateHelper().put(PropertyKeys.onleave, onleave);
+ }
+
+ public String getLang() {
+ return (String) getStateHelper().eval(PropertyKeys.lang);
+ }
+
+ public void setLang(String lang) {
+ getStateHelper().put(PropertyKeys.lang, lang);
+ }
+
+ public String getTitle() {
+ return (String) getStateHelper().eval(PropertyKeys.title);
+ }
+
+ public void setTitle(String title) {
+ getStateHelper().put(PropertyKeys.title, title);
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style);
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass);
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public String getDir() {
+ return (String) getStateHelper().eval(PropertyKeys.dir);
+ }
+
+ public void setDir(String dir) {
+ getStateHelper().put(PropertyKeys.dir, dir);
+ }
+
+ public String getOnclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
+ }
+
+ public void setOnclick(String onclick) {
+ getStateHelper().put(PropertyKeys.onclick, onclick);
+ }
+
+ public String getOndblclick() {
+ return (String) getStateHelper().eval(PropertyKeys.ondblclick);
+ }
+
+ public void setOndblclick(String ondblclick) {
+ getStateHelper().put(PropertyKeys.ondblclick, ondblclick);
+ }
+
+ public String getOnmousedown() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousedown);
+ }
+
+ public void setOnmousedown(String onmousedown) {
+ getStateHelper().put(PropertyKeys.onmousedown, onmousedown);
+ }
+
+ public String getOnmousemove() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousemove);
+ }
+
+ public void setOnmousemove(String onmousemove) {
+ getStateHelper().put(PropertyKeys.onmousemove, onmousemove);
+ }
+
+ public String getOnmouseout() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseout);
+ }
+
+ public void setOnmouseout(String onmouseout) {
+ getStateHelper().put(PropertyKeys.onmouseout, onmouseout);
+ }
+
+ public String getOnmouseover() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseover);
+ }
+
+ public void setOnmouseover(String onmouseover) {
+ getStateHelper().put(PropertyKeys.onmouseover, onmouseover);
+ }
+
+ public String getOnmouseup() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseup);
+ }
+
+ public void setOnmouseup(String onmouseup) {
+ getStateHelper().put(PropertyKeys.onmouseup, onmouseup);
+ }
+
+
+
+ @Override
+ public Collection<String> getEventNames() {
+ return EVENT_NAMES;
+ }
+}
+
Copied: branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTabPanel.java (from rev 19276, trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTabPanel.java)
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTabPanel.java (rev 0)
+++ branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTabPanel.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,265 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.html;
+
+import org.richfaces.HeaderPosition;
+import org.richfaces.HeaderAlignment;
+import org.richfaces.component.AbstractTabPanel;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-27
+ */
+public class HtmlTabPanel extends AbstractTabPanel implements ClientBehaviorHolder {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.TabPanel";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.TabPanel";
+
+ private static final Collection<String> EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList(
+ "itemchange",
+ "beforeitemchange",
+ "click",
+ "dblclick",
+ "mousedown",
+ "mousemove",
+ "mouseout",
+ "mouseover",
+ "mouseup"
+ ));
+
+
+ public enum PropertyKeys {
+ headerPosition,
+ headerAlignment,
+ tabHeaderClassActive,
+ tabHeaderClassDisabled,
+ tabHeaderClassInactive,
+ tabContentClass,
+ tabHeaderClass,
+ onitemchange,
+ onbeforeitemchange,
+ lang,
+ title,
+ style,
+ styleClass,
+ dir,
+ onclick,
+ ondblclick,
+ onmousedown,
+ onmousemove,
+ onmouseout,
+ onmouseover,
+ onmouseup
+ }
+
+ public HtmlTabPanel() {
+ setRendererType("org.richfaces.TabPanel");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public HeaderPosition getHeaderPosition() {
+ return (HeaderPosition) getStateHelper().eval(PropertyKeys.headerPosition);
+ }
+
+ public void setHeaderPosition(HeaderPosition headerPosition) {
+ getStateHelper().put(PropertyKeys.headerPosition, headerPosition);
+ }
+
+ public HeaderAlignment getHeaderAlignment() {
+ return (HeaderAlignment) getStateHelper().eval(PropertyKeys.headerAlignment);
+ }
+
+ public void setHeaderAlignment(HeaderAlignment headerAlignment) {
+ getStateHelper().put(PropertyKeys.headerAlignment, headerAlignment);
+ }
+
+ public String getTabHeaderClassActive() {
+ return (String) getStateHelper().eval(PropertyKeys.tabHeaderClassActive);
+ }
+
+ public void setTabHeaderClassActive(String tabHeaderClassActive) {
+ getStateHelper().put(PropertyKeys.tabHeaderClassActive, tabHeaderClassActive);
+ }
+
+ public String getTabHeaderClassDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.tabHeaderClassDisabled);
+ }
+
+ public void setTabHeaderClassDisabled(String tabHeaderClassDisabled) {
+ getStateHelper().put(PropertyKeys.tabHeaderClassDisabled, tabHeaderClassDisabled);
+ }
+
+ public String getTabHeaderClassInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.tabHeaderClassInactive);
+ }
+
+ public void setTabHeaderClassInactive(String tabHeaderClassInactive) {
+ getStateHelper().put(PropertyKeys.tabHeaderClassInactive, tabHeaderClassInactive);
+ }
+
+ public String getTabContentClass() {
+ return (String) getStateHelper().eval(PropertyKeys.tabContentClass);
+ }
+
+ public void setTabContentClass(String tabContentClass) {
+ getStateHelper().put(PropertyKeys.tabContentClass, tabContentClass);
+ }
+
+ public String getTabHeaderClass() {
+ return (String) getStateHelper().eval(PropertyKeys.tabHeaderClass);
+ }
+
+ public void setTabHeaderClass(String tabHeaderClass) {
+ getStateHelper().put(PropertyKeys.tabHeaderClass, tabHeaderClass);
+ }
+
+ public String getOnitemchange() {
+ return (String) getStateHelper().eval(PropertyKeys.onitemchange);
+ }
+
+ public void setOnitemchange(String onitemchange) {
+ getStateHelper().put(PropertyKeys.onitemchange, onitemchange);
+ }
+
+ public String getOnbeforeitemchange() {
+ return (String) getStateHelper().eval(PropertyKeys.onbeforeitemchange);
+ }
+
+ public void setOnbeforeitemchange(String onbeforeitemchange) {
+ getStateHelper().put(PropertyKeys.onbeforeitemchange, onbeforeitemchange);
+ }
+
+ public String getLang() {
+ return (String) getStateHelper().eval(PropertyKeys.lang);
+ }
+
+ public void setLang(String lang) {
+ getStateHelper().put(PropertyKeys.lang, lang);
+ }
+
+ public String getTitle() {
+ return (String) getStateHelper().eval(PropertyKeys.title);
+ }
+
+ public void setTitle(String title) {
+ getStateHelper().put(PropertyKeys.title, title);
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style);
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass);
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public String getDir() {
+ return (String) getStateHelper().eval(PropertyKeys.dir);
+ }
+
+ public void setDir(String dir) {
+ getStateHelper().put(PropertyKeys.dir, dir);
+ }
+
+ public String getOnclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
+ }
+
+ public void setOnclick(String onclick) {
+ getStateHelper().put(PropertyKeys.onclick, onclick);
+ }
+
+ public String getOndblclick() {
+ return (String) getStateHelper().eval(PropertyKeys.ondblclick);
+ }
+
+ public void setOndblclick(String ondblclick) {
+ getStateHelper().put(PropertyKeys.ondblclick, ondblclick);
+ }
+
+ public String getOnmousedown() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousedown);
+ }
+
+ public void setOnmousedown(String onmousedown) {
+ getStateHelper().put(PropertyKeys.onmousedown, onmousedown);
+ }
+
+ public String getOnmousemove() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousemove);
+ }
+
+ public void setOnmousemove(String onmousemove) {
+ getStateHelper().put(PropertyKeys.onmousemove, onmousemove);
+ }
+
+ public String getOnmouseout() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseout);
+ }
+
+ public void setOnmouseout(String onmouseout) {
+ getStateHelper().put(PropertyKeys.onmouseout, onmouseout);
+ }
+
+ public String getOnmouseover() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseover);
+ }
+
+ public void setOnmouseover(String onmouseover) {
+ getStateHelper().put(PropertyKeys.onmouseover, onmouseover);
+ }
+
+ public String getOnmouseup() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseup);
+ }
+
+ public void setOnmouseup(String onmouseup) {
+ getStateHelper().put(PropertyKeys.onmouseup, onmouseup);
+ }
+
+
+
+ @Override
+ public Collection<String> getEventNames() {
+ return EVENT_NAMES;
+ }
+}
+
Copied: branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java (from rev 19276, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java)
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java (rev 0)
+++ branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,227 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.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;
+import org.richfaces.component.AbstractTogglePanelItem;
+import org.richfaces.component.AbstractTogglePanelTitledItem;
+import org.richfaces.component.html.HtmlTab;
+import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.renderkit.HtmlConstants;
+import org.richfaces.renderkit.RenderKitUtils;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-24
+ */
+@ResourceDependencies( { // TODO review
+ @ResourceDependency(library = "javax.faces", name = "jsf.js"),
+ @ResourceDependency(name = "jquery.js"),
+ @ResourceDependency(name = "richfaces.js"),
+ @ResourceDependency(name = "richfaces-event.js"),
+ @ResourceDependency(name = "richfaces-base-component.js"),
+ @ResourceDependency(library = "org.richfaces", name = "tabPanel.ecss"),
+ @ResourceDependency(library = "org.richfaces", name = "TogglePanel.js"),
+ @ResourceDependency(library = "org.richfaces", name = "TabPanel.js")
+})
+public class TabPanelRenderer extends TogglePanelRenderer {
+
+ private static final RenderKitUtils.Attributes HEADER_ATTRIBUTES = RenderKitUtils.attributes()
+ .generic("onclick", HtmlTab.PropertyKeys.onheaderclick.toString(), "headerclick")
+ .generic("ondblclick", HtmlTab.PropertyKeys.onheaderdblclick.toString(), "headerdblclick")
+ .generic("onmousedown", HtmlTab.PropertyKeys.onheadermousedown.toString(), "headermousedown")
+ .generic("onmousemove", HtmlTab.PropertyKeys.onheadermousemove.toString(), "headermousemove")
+ .generic("onmouseup", HtmlTab.PropertyKeys.onheadermouseup.toString(), "headermouseup");
+
+ private static final String DIV = "div";
+ private static final String STYLE = "style";
+ private static final String CLASS = "class";
+
+ @Override
+ protected void doEncodeBegin(ResponseWriter w, FacesContext context, UIComponent comp) throws IOException {
+ super.doEncodeBegin(w, context, comp);
+ writeJavaScript(w, context, comp);
+
+ writeTabsLine(w, context, comp);
+ writeTabsLineSeparator(w);
+ }
+
+ private void writeTabsLineSeparator(ResponseWriter writer) throws IOException {
+ writer.write("<div class='rf-tb-hdr_border'></div>");
+ }
+
+ private void writeTabsLine(ResponseWriter w, FacesContext context, UIComponent comp) throws IOException {
+ w.startElement(DIV, comp);
+ w.writeAttribute(CLASS, "rf-tb-hdr_tabline_vis", null);
+
+ w.startElement("table", comp);
+ w.writeAttribute("class", "rf-tb-hdr_tabs", null);
+ w.writeAttribute("cellspacing", "0", null);
+ w.startElement("tbody", comp);
+ w.startElement("tr", comp);
+
+ writeTopTabFirstSpacer(w, comp);
+
+ for (AbstractTogglePanelItem item : ((AbstractTogglePanel) comp).getRenderedItems()) {
+ AbstractTogglePanelTitledItem tab = (AbstractTogglePanelTitledItem) item;
+ writeTopTabHeader(context, w, tab);
+ writeTopTabSpacer(w, comp);
+ }
+
+ writeTopTabLastSpacer(w, comp);
+
+ w.endElement("tr");
+ w.endElement("tbody");
+ w.endElement("table");
+
+ 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");
+ }
+
+ @Override
+ protected String getStyle(UIComponent component) {
+ return concatStyles(attributeAsString(component, "style"), "width: 100%;");
+ }
+
+ @Override
+ protected String getStyleClass(UIComponent component) {
+ return HtmlUtil.concatClasses("rf-tbp", attributeAsString(component, "styleClass"));
+ }
+
+ private void writeTopTabHeader(FacesContext context, ResponseWriter writer, AbstractTogglePanelTitledItem tab) throws IOException {
+ 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);
+
+ }
+
+ private void encodeTabHeader(FacesContext context, AbstractTogglePanelTitledItem tab, ResponseWriter writer,
+ AbstractTogglePanelTitledItem.HeaderStates state, Boolean isDisplay) throws IOException {
+
+
+ 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 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);
+
+ writer.startElement("span", tab);
+ writer.writeAttribute("class", "rftp_label", null);
+
+ UIComponent headerFacet = tab.getHeaderFacet(state);
+ if (headerFacet != null && headerFacet.isRendered()) {
+ headerFacet.encodeAll(context);
+ } else {
+ Object headerText = tab.getAttributes().get("header");
+ if (headerText != null && !headerText.equals("")) {
+ writer.writeText(headerText, null);
+ }
+ }
+
+ writer.endElement("span");
+
+ writer.endElement("td");
+ }
+
+
+
+ private void writeTopTabsControl(ResponseWriter w, UIComponent comp, String styles, String text) throws IOException {
+ w.startElement("div", comp);
+ w.writeAttribute("class", styles, null);
+ w.writeText(text, null);
+ w.endElement("div");
+ }
+
+ private void writeTopTabFirstSpacer(ResponseWriter w, UIComponent comp) throws IOException {
+ writeTopTabSpacer(w, comp, "padding-left: 5px;", "rf-tb-hdr_spacer");
+ }
+
+ private void writeTopTabSpacer(ResponseWriter w, UIComponent comp) throws IOException {
+ writeTopTabSpacer(w, comp, "", "rf-tb-hdr_spacer rftp_horizonttab_tabspacer_width");
+ }
+
+ private void writeTopTabLastSpacer(ResponseWriter w, UIComponent comp) throws IOException {
+ writeTopTabSpacer(w, comp, "padding-right: 5px; width: 100%;", "rf-tb-hdr_spacer");
+ }
+
+ private void writeTopTabSpacer(ResponseWriter w, UIComponent comp, String style, String classStyle) throws IOException {
+ w.startElement("td", comp);
+ w.writeAttribute(STYLE, style, null);
+ w.writeAttribute(CLASS, classStyle, null);
+ w.startElement("br", comp);
+ w.endElement("td");
+ }
+
+ @Override
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ writer.endElement(HtmlConstants.DIV_ELEM);
+ }
+
+ @Override
+ protected JSObject getScriptObject(FacesContext context, UIComponent component) {
+ return new JSObject("RichFaces.ui.TabPanel",
+ component.getClientId(), getScriptObjectOptions(context, component));
+ }
+
+ @Override
+ protected Map<String, Object> getScriptObjectOptions(FacesContext context, UIComponent component) {
+ Map<String, Object> options = super.getScriptObjectOptions(context, component);
+ options.put("isKeepHeight", !attributeAsString(component, height).isEmpty());
+ options.remove("items");
+
+ return options;
+ }
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return AbstractTabPanel.class;
+ }
+}
+
Copied: branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java (from rev 19276, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java)
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java (rev 0)
+++ branches/RF-9151/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabRenderer.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html;
+
+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 org.ajax4jsf.javascript.JSObject;
+import org.richfaces.component.AbstractTogglePanelTitledItem;
+import org.richfaces.renderkit.HtmlConstants;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-24
+ */
+@ResourceDependencies( { // TODO review
+ @ResourceDependency(library = "javax.faces", name = "jsf.js"),
+ @ResourceDependency(name = "jquery.js"),
+ @ResourceDependency(name = "richfaces.js"),
+ @ResourceDependency(name = "richfaces-event.js"),
+ @ResourceDependency(name = "richfaces-base-component.js"),
+ @ResourceDependency(library = "org.richfaces", name = "TogglePanelItem.js"),
+ @ResourceDependency(library = "org.richfaces", name = "Tab.js")
+})
+public class TabRenderer extends TogglePanelItemRenderer {
+
+ @Override
+ protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ super.doEncodeBegin(writer, context, component);
+
+ encodeContentBegin(component, writer);
+ }
+
+ @Override
+ protected String getStyleClass(UIComponent component) {
+ return concatClasses("rf-tb", attributeAsString(component, "styleClass"));
+ }
+
+ @Override
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ encodeContentEnd(component, writer);
+
+ super.doEncodeEnd(writer, context, component);
+ }
+
+ @Override
+ protected void writeJavaScript(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ Object script = getScriptObject(context, component);
+ if (script == null) {
+ return;
+ }
+
+ writer.startElement(HtmlConstants.SCRIPT_ELEM, component);
+ writer.writeAttribute(HtmlConstants.TYPE_ATTR, "text/javascript", "type");
+ writer.writeText(script, null);
+ writer.endElement(HtmlConstants.SCRIPT_ELEM);
+ }
+
+ private void encodeContentBegin(UIComponent component, ResponseWriter writer) throws IOException {
+ writer.startElement("div", component);
+ writer.writeAttribute("class", concatClasses("rf-tb-cnt", attributeAsString(component, "contentClass")), null);
+ writer.writeAttribute("id", component.getClientId() + ":content", null);
+
+ AbstractTogglePanelTitledItem item = (AbstractTogglePanelTitledItem) component;
+ if (!item.isActive() || item.isDisabled()) {
+ writer.writeAttribute("style", "display: none", null);
+ }
+ }
+
+ private void encodeContentEnd(UIComponent component, ResponseWriter responseWriter) throws IOException {
+ responseWriter.endElement("div");
+ }
+
+ @Override
+ protected JSObject getScriptObject(FacesContext context, UIComponent component) {
+ return new JSObject("RichFaces.ui.Tab", component.getClientId(),
+ getScriptObjectOptions(context, component));
+ }
+
+ @Override
+ protected Map<String, Object> getScriptObjectOptions(FacesContext context, UIComponent component) {
+ Map<String, Object> res = super.getScriptObjectOptions(context, component);
+ res.put("disabled", ((AbstractTogglePanelTitledItem) component).isDisabled());
+
+ return res;
+ }
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return AbstractTogglePanelTitledItem.class;
+ }
+}
+
Modified: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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>
Modified: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tab.js 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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_;
},
@@ -122,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);
}
Deleted: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/actlefttab_bg.gif
===================================================================
(Binary files differ)
Deleted: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/actrighttab_bg.gif
===================================================================
(Binary files differ)
Deleted: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab2_bg.gif
===================================================================
(Binary files differ)
Deleted: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab2_bottom_bg.gif
===================================================================
(Binary files differ)
Deleted: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab_bg.gif
===================================================================
(Binary files differ)
Deleted: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/acttab_bottom_bg.gif
===================================================================
(Binary files differ)
Deleted: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/lefttab_bg.gif
===================================================================
(Binary files differ)
Modified: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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%;
Modified: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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}
Copied: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/richfaces (from rev 19276, trunk/ui/output/ui/src/main/resources/META-INF/richfaces)
Deleted: branches/RF-9151/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 2010-09-21 13:27:20 UTC (rev 19276)
+++ branches/RF-9151/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-09-21 14:31:52 UTC (rev 19277)
@@ -1,14 +0,0 @@
-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}
Copied: branches/RF-9151/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties (from rev 19276, trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties)
===================================================================
--- branches/RF-9151/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties (rev 0)
+++ branches/RF-9151/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-09-21 14:31:52 UTC (rev 19277)
@@ -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}
Copied: branches/RF-9151/ui/output/ui/src/test/java/org/richfaces/component/UICollapsiblePanelTest.java (from rev 19276, trunk/ui/output/ui/src/test/java/org/richfaces/component/UICollapsiblePanelTest.java)
===================================================================
--- branches/RF-9151/ui/output/ui/src/test/java/org/richfaces/component/UICollapsiblePanelTest.java (rev 0)
+++ branches/RF-9151/ui/output/ui/src/test/java/org/richfaces/component/UICollapsiblePanelTest.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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 org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.faces.component.UIComponent;
+import java.util.List;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-27
+ */
+public class UICollapsiblePanelTest {
+
+ private UICollapsiblePanel collapsiblePanel;
+
+ @Before
+ public void setUp () {
+ collapsiblePanel = new UICollapsiblePanel();
+ }
+
+ @Test
+ public void testSomething() {
+ Assert.assertNotNull(collapsiblePanel);
+ }
+}
+
Copied: branches/RF-9151/ui/output/ui/src/test/java/org/richfaces/component/UITogglePanelTitledItemTest.java (from rev 19276, trunk/ui/output/ui/src/test/java/org/richfaces/component/UITogglePanelTitledItemTest.java)
===================================================================
--- branches/RF-9151/ui/output/ui/src/test/java/org/richfaces/component/UITogglePanelTitledItemTest.java (rev 0)
+++ branches/RF-9151/ui/output/ui/src/test/java/org/richfaces/component/UITogglePanelTitledItemTest.java 2010-09-21 14:31:52 UTC (rev 19277)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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 org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.faces.component.UIComponent;
+import java.util.List;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-24
+ */
+public class UITogglePanelTitledItemTest {
+
+ private UITogglePanelTitledItem togglePanelTitledItem;
+
+ @Before
+ public void setUp () {
+ togglePanelTitledItem = new UITogglePanelTitledItem();
+ }
+
+ @Test
+ public void testSomething() {
+ Assert.assertNotNull(togglePanelTitledItem);
+ }
+}
+
14 years, 3 months