Author: abelevich
Date: 2010-05-17 12:43:27 -0400 (Mon, 17 May 2010)
New Revision: 17087
Added:
root/ui-sandbox/componentcontrol/trunk/api/
root/ui-sandbox/componentcontrol/trunk/api/pom.xml
root/ui-sandbox/componentcontrol/trunk/api/src/
root/ui-sandbox/componentcontrol/trunk/api/src/main/
root/ui-sandbox/componentcontrol/trunk/api/src/main/java/
root/ui-sandbox/componentcontrol/trunk/api/src/test/
root/ui-sandbox/componentcontrol/trunk/api/src/test/java/
root/ui-sandbox/componentcontrol/trunk/bom/
root/ui-sandbox/componentcontrol/trunk/bom/pom.xml
root/ui-sandbox/componentcontrol/trunk/parent/
root/ui-sandbox/componentcontrol/trunk/parent/pom.xml
root/ui-sandbox/componentcontrol/trunk/ui/
root/ui-sandbox/componentcontrol/trunk/ui/pom.xml
root/ui-sandbox/componentcontrol/trunk/ui/src/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/UIHashParameter.java
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/behavior/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/renderkit/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/taglib/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/taglib/ComponentControlHandler.java
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/cc.taglib.xml
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/faces-config.xml
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/resources/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/resources/script/
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/resources/script/component-control.js
Removed:
root/ui-sandbox/componentcontrol/trunk/src/
Modified:
root/ui-sandbox/componentcontrol/trunk/pom.xml
Log:
move base behavior related classes to the ui/core/api, switch to the new build structure
Added: root/ui-sandbox/componentcontrol/trunk/api/pom.xml
===================================================================
--- root/ui-sandbox/componentcontrol/trunk/api/pom.xml (rev 0)
+++ root/ui-sandbox/componentcontrol/trunk/api/pom.xml 2010-05-17 16:43:27 UTC (rev
17087)
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>componentControl-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>component-control-api</artifactId>
+ <name>Richfaces UI Components: component control API</name>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <!-- runtime -->
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <!-- todo remove this dependency or move to test scope -->
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+
+ <!-- JSF with dependencies -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- tests -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <!-- todo api? -->
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-test-stage</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: root/ui-sandbox/componentcontrol/trunk/bom/pom.xml
===================================================================
--- root/ui-sandbox/componentcontrol/trunk/bom/pom.xml (rev 0)
+++ root/ui-sandbox/componentcontrol/trunk/bom/pom.xml 2010-05-17 16:43:27 UTC (rev
17087)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>1-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>componentControl-bom</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>Richfaces UI Components: Tables BOM</name>
+ <packaging>pom</packaging>
+
+ <properties>
+
<richfaces.core.api.version>4.0.0-SNAPSHOT</richfaces.core.api.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-bom</artifactId>
+ <version>${richfaces.core.api.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core-api</artifactId>
+ <version>${richfaces.core.api.version}</version>
+
+ </dependency>
+
+
+
+ <dependency>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>component-control-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>component-control-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
Added: root/ui-sandbox/componentcontrol/trunk/parent/pom.xml
===================================================================
--- root/ui-sandbox/componentcontrol/trunk/parent/pom.xml (rev 0)
+++ root/ui-sandbox/componentcontrol/trunk/parent/pom.xml 2010-05-17 16:43:27 UTC (rev
17087)
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>componentControl-bom</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <modules>
+ <!--module>../api</module-->
+ <module>../ui</module>
+ </modules>
+
+
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>componentControl-parent</artifactId>
+ <name>Richfaces UI Components: Tables Parent Module</name>
+ <packaging>pom</packaging>
+
+ <distributionManagement>
+ <downloadUrl>
+
http://labs.jboss.com/portal/jbossrichfaces/downloads
+ </downloadUrl>
+ <repository>
+ <id>jboss-releases-repository</id>
+ <uniqueVersion>false</uniqueVersion>
+ <url>${releaseRepository}</url>
+ </repository>
+ <snapshotRepository>
+ <id>jboss-snapshots-repository</id>
+ <uniqueVersion>true</uniqueVersion>
+ <url>${snapshotRepository}</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <version>1.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-beta-1</version>
+ <configuration>
+ <fail>false</fail>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <
uri>http://richfaces.org/tables</uri>
+ <shortName>tables</shortName>
+ <displayName>Table components tags</displayName>
+ </taglib>
+ </library>
+ </configuration>
+ <executions>
+ <execution>
+ <id>cdk-generate-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+
+ <!-- Archetypes dependency -->
+ <dependency>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0-alpha-4</version>
+ </dependency>
+
+ <!-- tests -->
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <version>1.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <version>1.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-test-stage</artifactId>
+ <version>1.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Modified: root/ui-sandbox/componentcontrol/trunk/pom.xml
===================================================================
--- root/ui-sandbox/componentcontrol/trunk/pom.xml 2010-05-17 16:13:33 UTC (rev 17086)
+++ root/ui-sandbox/componentcontrol/trunk/pom.xml 2010-05-17 16:43:27 UTC (rev 17087)
@@ -1,107 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>componentControl-aggregator</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Richfaces UI Components: componentControl Aggregator</name>
- <parent>
- <groupId>org.richfaces.sandbox.ui</groupId>
- <artifactId>components</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.richfaces.ui</groupId>
- <artifactId>componentControl</artifactId>
- <name>Richfaces UI Components: Component Control</name>
- <packaging>jar</packaging>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.core</groupId>
- <artifactId>richfaces-core-bom</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>annotations</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.richfaces.core</groupId>
- <artifactId>richfaces-core-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.richfaces.core</groupId>
- <artifactId>richfaces-core-impl</artifactId>
- </dependency>
-
- <!-- JSF -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Tests -->
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.test-jsf</groupId>
- <artifactId>htmlunit-client</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.test-jsf</groupId>
- <artifactId>jsf-mock</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
</plugins>
</build>
+
+ <modules>
+ <module>bom</module>
+ <module>parent</module>
+ </modules>
+
</project>
\ No newline at end of file
Added: root/ui-sandbox/componentcontrol/trunk/ui/pom.xml
===================================================================
--- root/ui-sandbox/componentcontrol/trunk/ui/pom.xml (rev 0)
+++ root/ui-sandbox/componentcontrol/trunk/ui/pom.xml 2010-05-17 16:43:27 UTC (rev 17087)
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>componentControl-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>component-control-ui</artifactId>
+ <name>Richfaces UI Components: Tables UI</name>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <!-- todo remove this dependency or move to test scope -->
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core-api</artifactId>
+ </dependency>
+
+ <!-- JSF with dependencies -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- tests -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <!-- todo api? -->
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-test-stage</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added:
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/UIHashParameter.java
===================================================================
---
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/UIHashParameter.java
(rev 0)
+++
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/UIHashParameter.java 2010-05-17
16:43:27 UTC (rev 17087)
@@ -0,0 +1,91 @@
+/*
+ * 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 java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIParameter;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class UIHashParameter extends UIComponentBase {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.HashParameter";
+
+ public static final String COMPONENT_FAMILY =
"org.richfaces.HashParameter";
+
+ enum PropertyKeys {
+ name
+ }
+
+ public UIHashParameter() {
+ super();
+ setRendererType(null);
+ }
+
+ public String getName() {
+ return (String) getStateHelper().eval(PropertyKeys.name);
+ }
+
+ public void setName(String name) {
+ getStateHelper().put(PropertyKeys.name, name);
+ }
+
+ public Map<String, Object> getValue() {
+ List<UIComponent> children = getChildren();
+ Map<String, Object> parameters = new HashMap<String, Object>();
+
+ for (UIComponent child : children) {
+ if (child instanceof UIParameter) {
+ UIParameter parameter = (UIParameter) child;
+ parameters.put(parameter.getName(), (String) parameter.getValue());
+ }
+
+ if (child instanceof UIHashParameter) {
+ UIHashParameter hashParameter = (UIHashParameter) child;
+ String name = hashParameter.getName();
+ Map<String, Object> value = hashParameter.getValue();
+ if (name == null) {
+ throw new FacesException("attribute 'name' for the
nested " + UIHashParameter.class.getName()
+ + " component (id = '" +
hashParameter.getClientId() + "') should not be 'null'");
+ } else {
+ parameters.put(name, value);
+ }
+ }
+ }
+
+ return parameters;
+ }
+
+ @Override
+ public String getFamily() {
+ return (COMPONENT_FAMILY);
+ }
+}
Added:
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
===================================================================
---
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
(rev 0)
+++
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-05-17
16:43:27 UTC (rev 17087)
@@ -0,0 +1,102 @@
+/*
+ * 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.behavior;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.FacesBehavior;
+
+import org.ajax4jsf.component.behavior.ClientBehavior;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+@FacesBehavior(value = "org.richfaces.behavior.ComponentControlBehavior")
+public class ComponentControlBehavior extends ClientBehavior {
+
+ public static final String BEHAVIOR_ID =
"org.richfaces.behavior.ComponentControlBehavior";
+
+ private List<UIComponent> children;
+
+ enum PropertyKeys {
+ event, target, selector, parameters, operation
+ }
+
+ public List<UIComponent> getChildren() {
+ if (children == null) {
+ children = new ArrayList<UIComponent>();
+ }
+ return children;
+ }
+
+ public String getEvent() {
+ return (String) getStateHelper().eval(PropertyKeys.event);
+ }
+
+ public void setEvent(String eventName) {
+ getStateHelper().eval(PropertyKeys.event, eventName);
+ }
+
+ public String getTarget() {
+ return (String) getStateHelper().eval(PropertyKeys.target);
+ }
+
+ public void setTarget(String target) {
+ getStateHelper().put(PropertyKeys.target, target);
+ }
+
+ public String getSelector() {
+ return (String) getStateHelper().eval(PropertyKeys.selector);
+ }
+
+ public void setSelector(String selector) {
+ getStateHelper().put(PropertyKeys.selector, selector);
+ }
+
+ public String getOperation() {
+ return (String) getStateHelper().eval(PropertyKeys.operation);
+ }
+
+ public void setOperation(String operation) {
+ getStateHelper().put(PropertyKeys.operation, operation);
+ }
+
+ @Override
+ public String getRendererType() {
+ return BEHAVIOR_ID;
+ }
+
+ @Override
+ public void setLiteralAttribute(String name, Object value) {
+ if (compare(PropertyKeys.operation, name)) {
+ setOperation((String) value);
+ } else if (compare(PropertyKeys.target, name)) {
+ setTarget((String) value);
+ } else if (compare(PropertyKeys.selector, name)) {
+ setSelector((String) name);
+ }
+ }
+}
Added:
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
===================================================================
---
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
(rev 0)
+++
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2010-05-17
16:43:27 UTC (rev 17087)
@@ -0,0 +1,141 @@
+/*
+ * 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;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.component.behavior.ClientBehaviorContext;
+import javax.faces.render.ClientBehaviorRenderer;
+import javax.faces.render.FacesBehaviorRenderer;
+import javax.faces.render.RenderKitFactory;
+
+import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.JSReference;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.richfaces.component.UIHashParameter;
+import org.richfaces.component.behavior.ComponentControlBehavior;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+@FacesBehaviorRenderer(rendererType =
"org.richfaces.behavior.ComponentControlBehavior", renderKitId =
RenderKitFactory.HTML_BASIC_RENDER_KIT)
+@ResourceDependencies( { @ResourceDependency(library = "javax.faces", name =
"jsf.js"),
+ @ResourceDependency(name = "jquery.js"), @ResourceDependency(name =
"richfaces.js"),
+ @ResourceDependency(name = "richfaces-event.js"), @ResourceDependency(name
= "richfaces-queue.js"),
+ @ResourceDependency(name = "richfaces-base-component.js"),
+ @ResourceDependency(name = "script/component-control.js") })
+public class ComponentControlBehaviorRenderer extends ClientBehaviorRenderer {
+
+ private static final String FUNC_NAME =
"RichFaces.ui.ComponentControl.execute";
+
+ private static final String REF_EVENT = "event";
+
+ private static final String REF_COMPONENT = "component";
+
+ private static final String PARAM_CALLBACK = "callback";
+
+ private static final String PARAM_TARGET = "target";
+
+ private static final String PARAM_SELECTOR = "selector";
+
+ @Override
+ public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior
behavior) {
+ ComponentControlBehavior controlBehavior = (ComponentControlBehavior) behavior;
+
+ JSFunctionDefinition callback = new JSFunctionDefinition();
+ callback.addParameter(new JSReference(REF_EVENT));
+ callback.addParameter(new JSReference(REF_COMPONENT));
+
+ String apiFunctionName = controlBehavior.getOperation();
+
+ // create callback function
+ StringBuffer script = new StringBuffer();
+
script.append(REF_COMPONENT).append("['").append(apiFunctionName).append("'].").append("apply").append("(");
+
+ // get client api function parameters
+ List<Object> apiFunctionParams = createSignature(controlBehavior);
+
script.append(REF_COMPONENT).append(",").append(ScriptUtils.toScript(apiFunctionParams.toArray())).append(");");
+ callback.addToBody(script);
+
+ String target = controlBehavior.getTarget();
+ String selector = controlBehavior.getSelector();
+
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ parameters.put(PARAM_CALLBACK, callback);
+ parameters.put(PARAM_TARGET, target);
+ parameters.put(PARAM_SELECTOR, selector);
+
+ // execution function
+ JSFunction eventFunction = new JSFunction(FUNC_NAME);
+ eventFunction.addParameter(new JSReference(REF_EVENT));
+ eventFunction.addParameter(parameters);
+
+ StringBuffer execution = new StringBuffer();
+ execution.append(eventFunction.toScript());
+ execution.append("; return false;");
+ return execution.toString();
+ }
+
+ protected List<Object> createSignature(ComponentControlBehavior behavior) {
+ List<Object> elements = new ArrayList<Object>();
+ List<UIComponent> children = behavior.getChildren();
+
+ for (UIComponent child : children) {
+ if (child instanceof UIParameter) {
+ UIParameter parameter = (UIParameter) child;
+ Object value = parameter.getValue();
+
+ if (value != null) {
+ elements.add(value);
+ }
+ }
+
+ if (child instanceof UIHashParameter) {
+ UIHashParameter parameter = (UIHashParameter) child;
+ String name = parameter.getName();
+ Map<String, Object> value = parameter.getValue();
+
+ if (value != null) {
+ if (name != null) {
+ Map<String, Object> map = new HashMap<String,
Object>();
+ map.put(name, value);
+ elements.add(map);
+ } else {
+ elements.add(value);
+ }
+ }
+ }
+ }
+ return elements;
+ }
+}
Added:
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/taglib/ComponentControlHandler.java
===================================================================
---
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/taglib/ComponentControlHandler.java
(rev 0)
+++
root/ui-sandbox/componentcontrol/trunk/ui/src/main/java/org/richfaces/taglib/ComponentControlHandler.java 2010-05-17
16:43:27 UTC (rev 17087)
@@ -0,0 +1,119 @@
+/*
+ * 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.taglib;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.view.facelets.BehaviorConfig;
+import javax.faces.view.facelets.ComponentConfig;
+import javax.faces.view.facelets.ComponentHandler;
+import javax.faces.view.facelets.CompositeFaceletHandler;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.FaceletHandler;
+
+import org.richfaces.component.UIHashParameter;
+import org.richfaces.component.behavior.ComponentControlBehavior;
+import org.richfaces.view.facelets.html.CustomBehaviorHandler;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ComponentControlHandler extends CustomBehaviorHandler {
+
+ public ComponentControlHandler(BehaviorConfig config) {
+ super(config);
+ }
+
+ @Override
+ public void apply(FaceletContext ctx, UIComponent parent) throws IOException {
+ super.apply(ctx, parent);
+ processNestedTags(ctx, parent);
+ }
+
+ private void processNestedTags(FaceletContext ctx, UIComponent parent) throws
IOException {
+ if (nextHandler instanceof CompositeFaceletHandler) {
+ FaceletHandler[] children = ((CompositeFaceletHandler)
nextHandler).getHandlers();
+ for (FaceletHandler handler : children) {
+ processNextHandler(ctx, handler, parent);
+ }
+ } else {
+ processNextHandler(ctx, nextHandler, parent);
+ }
+ }
+
+ private void processNextHandler(FaceletContext ctx, FaceletHandler handler,
UIComponent parent) throws IOException {
+ if (handler instanceof ComponentHandler) {
+ ComponentHandler componentHandler = (ComponentHandler) handler;
+
+ ComponentConfig componentConfig = componentHandler.getComponentConfig();
+ String componentType = componentConfig.getComponentType();
+
+ if (isUIParameter(componentType)) {
+ FacesContext facesContext = ctx.getFacesContext();
+
+ UIComponent component = (UIComponent)
facesContext.getApplication().createComponent(facesContext,
+ componentType, null);
+ componentHandler.setAttributes(ctx, component);
+
+ if (parent instanceof ClientBehaviorHolder) {
+ ClientBehaviorHolder clientBehaviorHolder = ((ClientBehaviorHolder)
parent);
+ Map<String, List<ClientBehavior>> clientBehaviors =
clientBehaviorHolder.getClientBehaviors();
+
+ String eventName = getEventName();
+
+ if (eventName == null) {
+ eventName = clientBehaviorHolder.getDefaultEventName();
+ }
+
+ if (eventName != null) {
+ List<ClientBehavior> eventClientBehaviors =
clientBehaviors.get(eventName);
+ for (ClientBehavior clientBehavior : eventClientBehaviors) {
+ if (clientBehavior instanceof ComponentControlBehavior) {
+ ((ComponentControlBehavior)
clientBehavior).getChildren().add(component);
+ }
+ }
+ }
+ }
+
+ componentHandler.applyNextHandler(ctx, component);
+ }
+ }
+ }
+
+ private boolean isUIParameter(String type) {
+ return (UIParameter.COMPONENT_TYPE.equals(type) ||
UIHashParameter.COMPONENT_TYPE.equals(type));
+ }
+
+ @Override
+ public boolean isWrapping() {
+ return false;
+ }
+}
Added:
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/cc.taglib.xml
===================================================================
--- root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/cc.taglib.xml
(rev 0)
+++
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/cc.taglib.xml 2010-05-17
16:43:27 UTC (rev 17087)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<facelet-taglib
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
+ version="2.0"
+ id="cc">
+ <
namespace>http://richfaces.org/componentControl</namespace>
+ <tag>
+ <tag-name>componentControl</tag-name>
+ <behavior>
+ <behavior-id>org.richfaces.behavior.ComponentControlBehavior</behavior-id>
+ <handler-class>org.richfaces.taglib.ComponentControlHandler</handler-class>
+ </behavior>
+ </tag>
+ <tag>
+ <tag-name>hashParam</tag-name>
+ <component>
+ <component-type>org.richfaces.HashParameter</component-type>
+ <handler-class>javax.faces.view.facelets.ComponentHandler</handler-class>
+ </component>
+
+ </tag>
+</facelet-taglib>
\ No newline at end of file
Added:
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/faces-config.xml
===================================================================
---
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/faces-config.xml
(rev 0)
+++
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/faces-config.xml 2010-05-17
16:43:27 UTC (rev 17087)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<faces-config version="2.0" metadata-complete="false"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:cdk="http://richfaces.org/cdk/extensions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+<component>
+ <component-type>org.richfaces.HashParameter</component-type>
+ <component-class>org.richfaces.component.UIHashParameter</component-class>
+ <component-extension>
+ <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions">false</cd...
+ </component-extension>
+ </component>
+</faces-config>
\ No newline at end of file
Added:
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/resources/script/component-control.js
===================================================================
---
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/resources/script/component-control.js
(rev 0)
+++
root/ui-sandbox/componentcontrol/trunk/ui/src/main/resources/META-INF/resources/script/component-control.js 2010-05-17
16:43:27 UTC (rev 17087)
@@ -0,0 +1,39 @@
+(function ($, richfaces) {
+
+ richfaces = richfaces || {};
+ richfaces.ui.ComponentControl = richfaces.ui.ComponentControl || {};
+
+ $.extend(richfaces.ui.ComponentControl, {
+
+ execute: function(event, parameters) {
+ var target = parameters.target;
+ var selector = parameters.selector;
+ var callback = parameters.callback;
+
+ if(target) {
+ var ids = target.split(',');
+ for (var i = 0; i < ids.length; i++) {
+ var component = document.getElementById(ids[i]);
+ if(component) {
+ richfaces.ui.ComponentControl.invokeOnComponent(event, component, callback);
+ }
+ }
+ }
+
+ if(selector) {
+ richfaces.ui.ComponentControl.invokeOnComponent(event, selector, callback);
+ }
+ },
+
+ invokeOnComponent : function(event, target, callback) {
+ if(callback && typeof callback == 'function') {
+ $(target).each(function() {
+ if (this.richfaces && this.richfaces.component) {
+ callback(event, this.richfaces.component);
+ }
+ });
+ }
+ }
+ });
+
+})(jQuery, window.RichFaces);
\ No newline at end of file