JBoss Rich Faces SVN: r18692 - trunk/examples/input-demo.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-16 21:33:24 -0400 (Mon, 16 Aug 2010)
New Revision: 18692
Modified:
trunk/examples/input-demo/pom.xml
Log:
Updated to latest parent snapshot
Modified: trunk/examples/input-demo/pom.xml
===================================================================
--- trunk/examples/input-demo/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
+++ trunk/examples/input-demo/pom.xml 2010-08-17 01:33:24 UTC (rev 18692)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>9</version>
+ <version>10-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
15 years, 9 months
JBoss Rich Faces SVN: r18691 - in trunk: cdk/parent and 18 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-16 20:41:59 -0400 (Mon, 16 Aug 2010)
New Revision: 18691
Removed:
trunk/core/api/checkstyle-suppressions.xml
trunk/core/commons/checkstyle-suppressions.xml
Modified:
trunk/
trunk/cdk/parent/pom.xml
trunk/core/api/pom.xml
trunk/core/commons/pom.xml
trunk/core/impl/checkstyle-suppressions.xml
trunk/core/impl/pom.xml
trunk/core/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
trunk/core/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
trunk/core/impl/src/main/java/org/richfaces/VersionBean.java
trunk/core/impl/src/main/java/org/richfaces/application/InitializationListener.java
trunk/core/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java
trunk/core/impl/src/main/java/org/richfaces/renderkit/SequenceRendererHelper.java
trunk/core/impl/src/main/java/org/richfaces/resource/DefaultResourceCodecData.java
trunk/core/impl/src/main/java/org/richfaces/skin/SkinImpl.java
trunk/core/parent/pom.xml
trunk/examples/core-demo/pom.xml
trunk/examples/iteration-demo/pom.xml
trunk/examples/misc-demo/pom.xml
trunk/examples/repeater-demo/pom.xml
trunk/examples/richfaces-showcase/pom.xml
trunk/ui/output/ui/checkstyle-suppressions.xml
trunk/ui/output/ui/pom.xml
trunk/ui/parent/pom.xml
Log:
Merged revisions 18679-18680,18685 via svnmerge from
https://svn.jboss.org/repos/richfaces/branches/RF-9023
.......
r18679 | jbalunas(a)redhat.com | 2010-08-16 18:07:55 -0400 (Mon, 16 Aug 2010) | 1 line
Fixed 33 checkstyle errors after re-initializing checkstyle check in impl
.......
r18680 | jbalunas(a)redhat.com | 2010-08-16 18:08:48 -0400 (Mon, 16 Aug 2010) | 1 line
RF-9023 & some check style clean up
.......
r18685 | jbalunas(a)redhat.com | 2010-08-16 19:33:56 -0400 (Mon, 16 Aug 2010) | 1 line
RF-9023 further non-core/ui updates for checkstyle changes
.......
Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
- /branches/RF-9023:1-18668 /branches/RF-9040_build_updated_m2:1-18626
+ /branches/RF-9023:1-18690 /branches/RF-9040_build_updated_m2:1-18626
Modified: trunk/cdk/parent/pom.xml
===================================================================
--- trunk/cdk/parent/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/cdk/parent/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -114,17 +114,6 @@
<version>1.0.2</version>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle</artifactId>
- <version>${richfaces.checkstyle.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
<groupId>org.apache.camel</groupId>
<artifactId>guice-maven-plugin</artifactId>
<version>2.2.0</version>
Deleted: trunk/core/api/checkstyle-suppressions.xml
===================================================================
--- trunk/core/api/checkstyle-suppressions.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/api/checkstyle-suppressions.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE suppressions PUBLIC
- "-//Puppy Crawl//DTD Suppressions 1.0//EN"
- "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-
-<suppressions>
- <suppress checks="DoubleCheckedLocking" files="MultipartRequestRegistry.java" />
- <suppress checks="FallThrough" files="JSMin.java" />
- <suppress checks="IllegalCatch" files="UISwitchablePanel.java" />
- <suppress checks="ModifiedControlVariable" files="MultipartRequest.java" />
- <suppress checks="IllegalCatch" files="StagingServer.java" />
- <suppress checks="IllegalCatch" files="PartialViewContextImpl.java" />
- <suppress checks="FallThrough" files="StagingServer.java" />
- <suppress checks="ModifiedControlVariable" files="Cookie.java" />
- <suppress checks="IllegalCatch" files="CacheManager.java" />
- <suppress checks="MissingSwitchDefault" files="JSONTokener.java" />
- <suppress checks="IllegalCatch" files="AjaxViewRoot.java" />
- <suppress checks="FallThrough" files="XMLTokener.java" />
- <suppress checks="IllegalCatch" files="ResourceHandlerImpl.java" />
- <suppress checks="IllegalThrows" files="AbstractThreadedTest.java" />
- <suppress checks="ModifiedControlVariable" files="URLCodec.java" />
-
- <!-- TODO it is hot fix for building process, this files belong to the test-base module,
- and must be removed from here -->
- <suppress checks="IllegalCatch" files="AbstractThreadedTest.java" />
- <suppress checks="IllegalCatch" files="StagingServer.java" />
-
- <!-- TODO it is hot fix for building process, this files belong to the ui/output/trunk/panela/ui module,
- and must be removed from here -->
- <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
-</suppressions>
Modified: trunk/core/api/pom.xml
===================================================================
--- trunk/core/api/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/api/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -80,15 +80,6 @@
<scope>test</scope>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <!-- Trigger checkstyle checking for this module -->
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/core/api</connection>
Deleted: trunk/core/commons/checkstyle-suppressions.xml
===================================================================
--- trunk/core/commons/checkstyle-suppressions.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/commons/checkstyle-suppressions.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE suppressions PUBLIC
- "-//Puppy Crawl//DTD Suppressions 1.0//EN"
- "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-
-<suppressions>
- <suppress checks="DoubleCheckedLocking" files="MultipartRequestRegistry.java" />
- <suppress checks="FallThrough" files="JSMin.java" />
- <suppress checks="IllegalCatch" files="UISwitchablePanel.java" />
- <suppress checks="ModifiedControlVariable" files="MultipartRequest.java" />
- <suppress checks="IllegalCatch" files="StagingServer.java" />
- <suppress checks="IllegalCatch" files="PartialViewContextImpl.java" />
- <suppress checks="FallThrough" files="StagingServer.java" />
- <suppress checks="ModifiedControlVariable" files="Cookie.java" />
- <suppress checks="IllegalCatch" files="CacheManager.java" />
- <suppress checks="MissingSwitchDefault" files="JSONTokener.java" />
- <suppress checks="IllegalCatch" files="AjaxViewRoot.java" />
- <suppress checks="FallThrough" files="XMLTokener.java" />
- <suppress checks="IllegalCatch" files="ResourceHandlerImpl.java" />
- <suppress checks="IllegalThrows" files="AbstractThreadedTest.java" />
- <suppress checks="ModifiedControlVariable" files="URLCodec.java" />
-
- <!-- TODO it is hot fix for building process, this files belong to the test-base module,
- and must be removed from here -->
- <suppress checks="IllegalCatch" files="AbstractThreadedTest.java" />
- <suppress checks="IllegalCatch" files="StagingServer.java" />
-
- <!-- TODO it is hot fix for building process, this files belong to the ui/output/trunk/panela/ui module,
- and must be removed from here -->
- <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
-</suppressions>
Modified: trunk/core/commons/pom.xml
===================================================================
--- trunk/core/commons/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/commons/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -55,15 +55,6 @@
<scope>test</scope>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <!-- Trigger checkstyle checking for this module -->
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/commons/api</connection>
Modified: trunk/core/impl/checkstyle-suppressions.xml
===================================================================
--- trunk/core/impl/checkstyle-suppressions.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/checkstyle-suppressions.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -4,6 +4,10 @@
"-//Puppy Crawl//DTD Suppressions 1.0//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<!-- NOTE: Because of issues with maven checkstyle plugin each suppression
+ file must have all suppressions defined.
+
+ See RF-9077 for details. -->
<suppressions>
<suppress checks="DoubleCheckedLocking" files="MultipartRequestRegistry.java" />
<suppress checks="FallThrough" files="JSMin.java" />
@@ -28,5 +32,5 @@
<!-- TODO it is hot fix for building process, this files belong to the ui/output/trunk/panela/ui module,
and must be removed from here -->
- <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
+ <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
</suppressions>
Modified: trunk/core/impl/pom.xml
===================================================================
--- trunk/core/impl/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -124,8 +124,15 @@
</dependencies>
<build>
-
<plugins>
+ <plugin>
+ <!-- Checkstyle only required here because suppressions needed -->
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
+ </configuration>
+ </plugin>
+
<!--
TODO Centralize this because calendar and context menu use this too
Note: This may be removed by redisgn
Modified: trunk/core/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
===================================================================
--- trunk/core/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java 2010-08-17 00:41:59 UTC (rev 18691)
@@ -50,6 +50,16 @@
private List<GeneralCacheAdministrator> cacheAdministrators = new ArrayList<GeneralCacheAdministrator>(1);
+ public OSCacheCacheFactory() throws ClassNotFoundException {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ if (classLoader == null) {
+ classLoader = OSCacheCacheFactory.class.getClassLoader();
+ }
+
+ //try load cache class to check its presence in classpath
+ Class.forName(GeneralCacheAdministrator.class.getName(), false, classLoader);
+ }
+
private static Properties loadProperties() throws IOException {
Properties properties = new Properties();
URL resource = OSCacheCache.class.getResource("oscache.properties");
@@ -71,16 +81,6 @@
return properties;
}
-
- public OSCacheCacheFactory() throws ClassNotFoundException {
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- if (classLoader == null) {
- classLoader = OSCacheCacheFactory.class.getClassLoader();
- }
-
- //try load cache class to check its presence in classpath
- Class.forName(GeneralCacheAdministrator.class.getName(), false, classLoader);
- }
public Cache createCache(FacesContext facesContext, String cacheName, Map<?, ?> env) {
//TODO - handle cache name
Modified: trunk/core/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
===================================================================
--- trunk/core/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2010-08-17 00:41:59 UTC (rev 18691)
@@ -30,7 +30,6 @@
import org.ajax4jsf.util.ELUtils;
import org.richfaces.application.ServiceTracker;
-import org.richfaces.skin.Skin;
/**
* This class hold all methods for get application init parameters. Created for
@@ -39,11 +38,7 @@
* @author asmirnov
*/
public final class ContextInitParameters {
- /**
- *
- */
- private static final int DEFAULT_TTL = 60 * 60 * 24;
-
+
public static final String[] DATATABLE_USES_VIEW_LOCALE = {"org.richfaces.datatableUsesViewLocale"};
/**
@@ -75,6 +70,7 @@
public static final String EXECUTE_AWT_INITIALIZER = "org.richfaces.executeAWTInitializer";
+ private static final int DEFAULT_TTL = 60 * 60 * 24;
private static final String[] RESOURCES_TTL_ARRAY = { RESOURCES_TTL };
private static final String[] RESOURCES_CACHE_SIZE_ARRAY = { RESOURCES_CACHE_SIZE };
Modified: trunk/core/impl/src/main/java/org/richfaces/VersionBean.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/VersionBean.java 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/src/main/java/org/richfaces/VersionBean.java 2010-08-17 00:41:59 UTC (rev 18691)
@@ -42,8 +42,11 @@
*/
public final class VersionBean {
+ public static final Version VERSION = new Version();
+
private static final org.slf4j.Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
+
/**
* Class for incapsulate version info.
*
@@ -197,8 +200,6 @@
}
}
- public static final Version VERSION = new Version();
-
public String getVendor() {
return VERSION.getImplementationVendor();
}
Modified: trunk/core/impl/src/main/java/org/richfaces/application/InitializationListener.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/application/InitializationListener.java 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/src/main/java/org/richfaces/application/InitializationListener.java 2010-08-17 00:41:59 UTC (rev 18691)
@@ -51,7 +51,8 @@
private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
private static final class AWTInitializer {
-
+ private AWTInitializer() { }
+
private static boolean checkGetSystemClassLoaderAccess() {
try {
ClassLoader.getSystemClassLoader();
@@ -130,8 +131,8 @@
ArrayList<Module> modules = new ArrayList<Module>();
modules.add(new DefaultModule());
try {
- modules.addAll(ServiceLoader.loadServices(Module.class));
- injector.init(modules);
+ modules.addAll(ServiceLoader.loadServices(Module.class));
+ injector.init(modules);
} catch (ServiceException e) {
throw new FacesException(e);
}
Modified: trunk/core/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java 2010-08-17 00:41:59 UTC (rev 18691)
@@ -1,7 +1,5 @@
package org.richfaces.application;
-import java.util.List;
-
import com.google.common.collect.ClassToInstanceMap;
import com.google.common.collect.ImmutableClassToInstanceMap;
import com.google.common.collect.MutableClassToInstanceMap;
Modified: trunk/core/impl/src/main/java/org/richfaces/renderkit/SequenceRendererHelper.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/renderkit/SequenceRendererHelper.java 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/src/main/java/org/richfaces/renderkit/SequenceRendererHelper.java 2010-08-17 00:41:59 UTC (rev 18691)
@@ -40,6 +40,14 @@
private String[] columnClasses = null;
+ public SequenceRendererHelper(UISequence sequence) {
+ super();
+ this.sequence = sequence;
+
+ this.rowClasses = splitClassesString((String) sequence.getAttributes().get("rowClasses"));
+ this.columnClasses = splitClassesString((String) sequence.getAttributes().get("columnClasses"));
+ }
+
private static String[] splitClassesString(String s) {
if (s != null) {
return s.split(",");
@@ -56,14 +64,6 @@
return null;
}
- public SequenceRendererHelper(UISequence sequence) {
- super();
- this.sequence = sequence;
-
- this.rowClasses = splitClassesString((String) sequence.getAttributes().get("rowClasses"));
- this.columnClasses = splitClassesString((String) sequence.getAttributes().get("columnClasses"));
- }
-
public UISequence getSequence() {
return sequence;
}
Modified: trunk/core/impl/src/main/java/org/richfaces/resource/DefaultResourceCodecData.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/resource/DefaultResourceCodecData.java 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/src/main/java/org/richfaces/resource/DefaultResourceCodecData.java 2010-08-17 00:41:59 UTC (rev 18691)
@@ -31,11 +31,6 @@
private DefaultResourceCodec defaultResourceCodec;
- public DefaultResourceCodecData(DefaultResourceCodec defaultResourceCodec) {
- super();
- this.defaultResourceCodec = defaultResourceCodec;
- }
-
private String resourceName;
private String libraryName;
@@ -52,6 +47,11 @@
//lazy evaluated
private Object data = null;
+ public DefaultResourceCodecData(DefaultResourceCodec defaultResourceCodec) {
+ super();
+ this.defaultResourceCodec = defaultResourceCodec;
+ }
+
protected void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
Modified: trunk/core/impl/src/main/java/org/richfaces/skin/SkinImpl.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/skin/SkinImpl.java 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/impl/src/main/java/org/richfaces/skin/SkinImpl.java 2010-08-17 00:41:59 UTC (rev 18691)
@@ -38,40 +38,6 @@
*/
final class SkinImpl extends AbstractSkin {
- private static class MutableInteger {
- private int value;
-
- public int getAndIncrement() {
- return value++;
- }
-
- public int getAndDecrement() {
- return value--;
- }
- }
-
- private String name;
-
- private MutableInteger getCounter(FacesContext context) {
- Map<Object, Object> attr = context.getAttributes();
-
- MutableInteger counter = (MutableInteger) attr.get(MutableInteger.class);
- if (counter == null) {
- counter = new MutableInteger();
- attr.put(MutableInteger.class, counter);
- }
-
- return counter;
- }
-
- private abstract static class Operation {
-
- public abstract Object executeLocal(FacesContext facesContext, SkinImpl skin, String name);
-
- public abstract Object executeBase(FacesContext facesContext, Skin skin, String name);
-
- }
-
private static final Operation RESOLVE = new Operation() {
public Object executeLocal(FacesContext facesContext, SkinImpl skin, String name) {
@@ -114,9 +80,23 @@
}
};
-
+
private final Map<Object, Object> skinParams;
-
+
+ private static class MutableInteger {
+ private int value;
+
+ public int getAndIncrement() {
+ return value++;
+ }
+
+ public int getAndDecrement() {
+ return value--;
+ }
+ }
+
+ private String name;
+
/**
* Skin can instantiate only by factory method.
*
@@ -126,7 +106,27 @@
this.skinParams = properties;
this.name = name;
}
+
+ private MutableInteger getCounter(FacesContext context) {
+ Map<Object, Object> attr = context.getAttributes();
+
+ MutableInteger counter = (MutableInteger) attr.get(MutableInteger.class);
+ if (counter == null) {
+ counter = new MutableInteger();
+ attr.put(MutableInteger.class, counter);
+ }
+
+ return counter;
+ }
+
+ private abstract static class Operation {
+
+ public abstract Object executeLocal(FacesContext facesContext, SkinImpl skin, String name);
+ public abstract Object executeBase(FacesContext facesContext, Skin skin, String name);
+
+ }
+
protected Map<Object, Object> getSkinParams() {
return skinParams;
}
Modified: trunk/core/parent/pom.xml
===================================================================
--- trunk/core/parent/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/core/parent/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -73,25 +73,13 @@
</dependencyManagement>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
+ <plugins>
+ <!-- Trigger checkstyle checking for this module -->
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
-
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/core/parent</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/core/parent</developerConnection>
Modified: trunk/examples/core-demo/pom.xml
===================================================================
--- trunk/examples/core-demo/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/examples/core-demo/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -124,24 +124,6 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Modified: trunk/examples/iteration-demo/pom.xml
===================================================================
--- trunk/examples/iteration-demo/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/examples/iteration-demo/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -141,24 +141,6 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: trunk/examples/misc-demo/pom.xml
===================================================================
--- trunk/examples/misc-demo/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/examples/misc-demo/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -156,24 +156,6 @@
</profiles>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Modified: trunk/examples/repeater-demo/pom.xml
===================================================================
--- trunk/examples/repeater-demo/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/examples/repeater-demo/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -134,24 +134,6 @@
</profiles>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Modified: trunk/examples/richfaces-showcase/pom.xml
===================================================================
--- trunk/examples/richfaces-showcase/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/examples/richfaces-showcase/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -104,22 +104,6 @@
<build>
<finalName>richfaces-showcase</finalName>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle</artifactId>
- <version>${richfaces.checkstyle.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Modified: trunk/ui/output/ui/checkstyle-suppressions.xml
===================================================================
--- trunk/ui/output/ui/checkstyle-suppressions.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/ui/output/ui/checkstyle-suppressions.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -4,6 +4,33 @@
"-//Puppy Crawl//DTD Suppressions 1.0//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<!-- NOTE: Because of issues with maven checkstyle plugin each suppression
+ file must have all suppressions defined.
+
+ See RF-9077 for details. -->
<suppressions>
- <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
+ <suppress checks="DoubleCheckedLocking" files="MultipartRequestRegistry.java" />
+ <suppress checks="FallThrough" files="JSMin.java" />
+ <suppress checks="IllegalCatch" files="UISwitchablePanel.java" />
+ <suppress checks="ModifiedControlVariable" files="MultipartRequest.java" />
+ <suppress checks="IllegalCatch" files="StagingServer.java" />
+ <suppress checks="IllegalCatch" files="PartialViewContextImpl.java" />
+ <suppress checks="FallThrough" files="StagingServer.java" />
+ <suppress checks="ModifiedControlVariable" files="Cookie.java" />
+ <suppress checks="IllegalCatch" files="CacheManager.java" />
+ <suppress checks="MissingSwitchDefault" files="JSONTokener.java" />
+ <suppress checks="IllegalCatch" files="AjaxViewRoot.java" />
+ <suppress checks="FallThrough" files="XMLTokener.java" />
+ <suppress checks="IllegalCatch" files="ResourceHandlerImpl.java" />
+ <suppress checks="IllegalThrows" files="AbstractThreadedTest.java" />
+ <suppress checks="ModifiedControlVariable" files="URLCodec.java" />
+
+ <!-- TODO it is hot fix for building process, this files belong to the test-base module,
+ and must be removed from here -->
+ <suppress checks="IllegalCatch" files="AbstractThreadedTest.java" />
+ <suppress checks="IllegalCatch" files="StagingServer.java" />
+
+ <!-- TODO it is hot fix for building process, this files belong to the ui/output/trunk/panela/ui module,
+ and must be removed from here -->
+ <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
</suppressions>
Modified: trunk/ui/output/ui/pom.xml
===================================================================
--- trunk/ui/output/ui/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/ui/output/ui/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -38,6 +38,13 @@
<build>
<plugins>
<plugin>
+ <!-- Checkstyle only required here because suppressions needed -->
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
</plugin>
Modified: trunk/ui/parent/pom.xml
===================================================================
--- trunk/ui/parent/pom.xml 2010-08-17 00:30:13 UTC (rev 18690)
+++ trunk/ui/parent/pom.xml 2010-08-17 00:41:59 UTC (rev 18691)
@@ -37,7 +37,6 @@
<packaging>pom</packaging>
<properties>
- <richfaces.checkstyle.version>1</richfaces.checkstyle.version>
</properties>
<build>
@@ -77,17 +76,10 @@
</pluginManagement>
<plugins>
+ <!-- Trigger checkstyle checking for this module -->
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle</artifactId>
- <version>${richfaces.checkstyle.version}</version>
- </dependency>
- </dependencies>
</plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
15 years, 9 months
JBoss Rich Faces SVN: r18690 - trunk.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-16 20:30:13 -0400 (Mon, 16 Aug 2010)
New Revision: 18690
Modified:
trunk/
Log:
Initialized merge tracking via "svnmerge" with revisions "1-18668" from
https://svn.jboss.org/repos/richfaces/branches/RF-9023
Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
- /branches/RF-9040_build_updated_m2:1-18626
+ /branches/RF-9023:1-18668 /branches/RF-9040_build_updated_m2:1-18626
15 years, 9 months
JBoss Rich Faces SVN: r18689 - modules/build/parent/trunk.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-16 20:23:15 -0400 (Mon, 16 Aug 2010)
New Revision: 18689
Modified:
modules/build/parent/trunk/pom.xml
Log:
RF-9023 Updates parent
Modified: modules/build/parent/trunk/pom.xml
===================================================================
--- modules/build/parent/trunk/pom.xml 2010-08-17 00:22:48 UTC (rev 18688)
+++ modules/build/parent/trunk/pom.xml 2010-08-17 00:23:15 UTC (rev 18689)
@@ -61,6 +61,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Override the default 2.0.9 from jboss-parent -->
<maven.min.version>2.1.0</maven.min.version>
+ <richfaces.checkstyle.version>2-SNAPSHOT</richfaces.checkstyle.version>
</properties>
<!-- Repository management, including extra repositories if needed -->
@@ -209,8 +210,6 @@
<configuration>
<configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
</configLocation>
- <suppressionsLocation>checkstyle-suppressions.xml
- </suppressionsLocation>
</configuration>
<executions>
<execution>
@@ -221,6 +220,13 @@
</goals>
</execution>
</executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-build-checkstyle</artifactId>
+ <version>${richfaces.checkstyle.version}</version>
+ </dependency>
+ </dependencies>
</plugin>
<!-- dev -->
@@ -393,11 +399,11 @@
<!-- SCM and distribution management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/build/parent/trunk
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/build/parent/trunk
</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/build/parent/trunk
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/build/parent/trunk
</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/root/build/parent/trunk</url>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/build/parent/trunk</url>
</scm>
</project>
15 years, 9 months
JBoss Rich Faces SVN: r18687 - in branches/RF-9023: archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces and 19 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-16 20:07:05 -0400 (Mon, 16 Aug 2010)
New Revision: 18687
Added:
branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/RichBean.java
branches/RF-9023/core/impl/src/test/resources/META-INF/resources/
branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/
branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js
branches/RF-9023/examples/output-demo/src/main/webapp/qunit/accordionHeaders.xhtml
branches/RF-9023/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js
Removed:
branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/TogglePanelBean.java
branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/examples/
branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/
branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js
branches/RF-9023/core/impl/src/test/resources/resources/org.richfaces.resource.test/
Modified:
branches/RF-9023/
branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml
branches/RF-9023/cdk/plugins/annotations/pom.xml
branches/RF-9023/examples/misc-demo/src/main/java/org/richfaces/demo/JQueryBean.java
branches/RF-9023/examples/misc-demo/src/main/webapp/pages/jquery.xhtml
branches/RF-9023/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml
branches/RF-9023/examples/output-demo/src/main/webapp/qunit/accordion.xhtml
branches/RF-9023/examples/output-demo/src/main/webapp/templates/template.xhtml
branches/RF-9023/ui/dist/richfaces-components-ui/pom.xml
branches/RF-9023/ui/misc/ui/src/main/java/org/richfaces/renderkit/JQueryRendererBase.java
branches/RF-9023/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js
branches/RF-9023/ui/misc/ui/src/main/templates/jquery.template.xml
branches/RF-9023/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
Log:
Merged revisions 18670,18673,18675-18678 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r18670 | Alex.Kolonitsky | 2010-08-16 11:48:02 -0400 (Mon, 16 Aug 2010) | 1 line
RF-8790
.......
r18673 | Alex.Kolonitsky | 2010-08-16 13:23:23 -0400 (Mon, 16 Aug 2010) | 1 line
RF-8947 RichFaces SimpleApp Archetype is out of sync with project
.......
r18675 | nbelaevski | 2010-08-16 14:18:03 -0400 (Mon, 16 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-8993
.......
r18676 | nbelaevski | 2010-08-16 14:18:29 -0400 (Mon, 16 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-8993
.......
r18677 | nbelaevski | 2010-08-16 14:50:41 -0400 (Mon, 16 Aug 2010) | 1 line
Fixed unit test failure under MyFaces
.......
r18678 | nbelaevski | 2010-08-16 15:35:17 -0400 (Mon, 16 Aug 2010) | 1 line
Added missing 'provided' scope for CDK/annotations
.......
Property changes on: branches/RF-9023
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-18667 /branches/RF-9040_build_updated_m2:1-18626
+ /branches/RF-9040_build_updated_m2:1-18626 /trunk:1-18685
Copied: branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/RichBean.java (from rev 18678, trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/RichBean.java)
===================================================================
--- branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/RichBean.java (rev 0)
+++ branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/RichBean.java 2010-08-17 00:07:05 UTC (rev 18687)
@@ -0,0 +1,27 @@
+package org.richfaces;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
+import java.io.Serializable;
+
+public class RichBean implements Serializable {
+
+ private static final long serialVersionUID = -2403138958014741653L;
+ private Logger logger;
+ private String name;
+
+ public RichBean() {
+ logger = LoggerFactory.getLogger(RichBean.class);
+ logger.info("post construct: initialize");
+ name = "John";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Deleted: branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/TogglePanelBean.java
===================================================================
--- branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/TogglePanelBean.java 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/richfaces/TogglePanelBean.java 2010-08-17 00:07:05 UTC (rev 18687)
@@ -1,32 +0,0 @@
-package org.richfaces;
-
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-
-import java.io.Serializable;
-
-public class TogglePanelBean implements Serializable {
-
- private static final long serialVersionUID = -2403138958014741653L;
-
- private static final Logger LOGGER = LoggerFactory.getLogger(TogglePanelBean.class);
-
- private String name;
-
- public TogglePanelBean() {
- LOGGER.info("post construct: initialize");
- name = "John";
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void itemChangeActionListener() {
- LOGGER.info("TogglePanelBean.itemChangeActionListener");
- }
-}
Modified: branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -3,38 +3,8 @@
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-facesconfig_2_0.xsd">
<managed-bean>
- <managed-bean-name>togglePanelBean</managed-bean-name>
- <managed-bean-class>org.richfaces.TogglePanelBean</managed-bean-class>
+ <managed-bean-name>richBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.RichBean</managed-bean-class>
<managed-bean-scope>view</managed-bean-scope>
</managed-bean>
-
- <navigation-rule>
- <!-- Examples -->
- <navigation-case>
- <from-outcome>togglePanel</from-outcome>
- <to-view-id>/examples/togglePanel.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>togglePanel/server</from-outcome>
- <to-view-id>/examples/togglePanel-server.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>togglePanel/ajax</from-outcome>
- <to-view-id>/examples/togglePanel-ajax.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>togglePanel/client</from-outcome>
- <to-view-id>/examples/togglePanel-client.xhtml</to-view-id>
- </navigation-case>
-
- <!-- QUnit -->
- <navigation-case>
- <from-outcome>qunit/togglePanel</from-outcome>
- <to-view-id>/qunit/togglePanel.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>qunit/togglePanelItem</from-outcome>
- <to-view-id>/qunit/togglePanelItem.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
</faces-config>
Modified: branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -1,9 +1,9 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
<!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:pa="http://richfaces.org/panels">
+<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:a4j="http://richfaces.org/a4j">
<body>
<ui:composition template="/templates/template.xhtml">
@@ -11,10 +11,17 @@
<ui:define name="title">RichFaces Sample</ui:define>
<ui:define name="body">
- look at left
+ <h:form prependId="false">
+ <h:outputLabel value="Name:" for="nameInput" />
+ <h:inputText id="nameInput" value="${symbol_pound}{richBean.name}">
+ <a4j:ajax event="keyup" render="output" />
+ </h:inputText>
+ <h:panelGroup id="output">
+ <h:outputText value="Hello ${symbol_pound}{richBean.name}!"
+ rendered="${symbol_pound}{not empty richBean.name}" />
+ </h:panelGroup>
+ </h:form>
</ui:define>
-
- <div style="top: auto;"></div>
</ui:composition>
</body>
-</html>
+</html>
\ No newline at end of file
Modified: branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml
===================================================================
--- branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -1,54 +1,16 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
<!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" >
+<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:a4j="http://richfaces.org/a4j">
<h:head>
- <title>
- <ui:define name="title">Application Title</ui:define>
- </title>
-
+ <title><ui:define name="title">Application Title</ui:define></title>
<meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
-
</h:head>
<h:body>
- <ui:insert name="scripts" ></ui:insert>
- <table width="100%">
- <thead>
- <tr>
- <th width="20%" align="left">Content</th>
- <th width="80%" align="left">
- <ui:insert name="body_head">Example</ui:insert>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr valign="top">
- <td>
- <h:form id="nav">
- <p>Examples</p>
- <ul>
- <li><h:commandLink value="divPanel" action="divPanel" /></li>
- <li><h:commandLink value="togglePanel" action="togglePanel" /></li>
- <li><h:commandLink value="togglePanel Ajax" action="togglePanel/ajax" /></li>
- <li><h:commandLink value="togglePanel Client" action="togglePanel/client" /></li>
- <li><h:commandLink value="togglePanel Server" action="togglePanel/server" /></li>
- </ul>
- <p>QUnit</p>
- <ul>
- <li><h:commandLink value="togglePanel" action="qunit/togglePanel" /></li>
- <li><h:commandLink value="togglePanelItem" action="qunit/togglePanelItem" /></li>
- </ul>
- </h:form>
- </td>
- <td>
- <ui:insert name="body">Default content</ui:insert>
- </td>
- </tr>
- </tbody>
- </table>
-
+ <ui:insert name="body">Default content</ui:insert>
</h:body>
</html>
Modified: branches/RF-9023/cdk/plugins/annotations/pom.xml
===================================================================
--- branches/RF-9023/cdk/plugins/annotations/pom.xml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/cdk/plugins/annotations/pom.xml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -13,9 +13,10 @@
<description>That project contains annotations for JSF classes</description>
<name>annotations</name>
<dependencies>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
Copied: branches/RF-9023/core/impl/src/test/resources/META-INF/resources (from rev 18678, trunk/core/impl/src/test/resources/META-INF/resources)
Copied: branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test (from rev 18678, trunk/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test)
Deleted: branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js
===================================================================
--- trunk/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js 2010-08-16 19:35:17 UTC (rev 18678)
+++ branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js 2010-08-17 00:07:05 UTC (rev 18687)
@@ -1 +0,0 @@
-/* that is a dependency of org.richfaces.resource.ResourceHandlerImplTest */
\ No newline at end of file
Copied: branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js (from rev 18678, trunk/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js)
===================================================================
--- branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js (rev 0)
+++ branches/RF-9023/core/impl/src/test/resources/META-INF/resources/org.richfaces.resource.test/libraryResource.js 2010-08-17 00:07:05 UTC (rev 18687)
@@ -0,0 +1 @@
+/* that is a dependency of org.richfaces.resource.ResourceHandlerImplTest */
\ No newline at end of file
Modified: branches/RF-9023/examples/misc-demo/src/main/java/org/richfaces/demo/JQueryBean.java
===================================================================
--- branches/RF-9023/examples/misc-demo/src/main/java/org/richfaces/demo/JQueryBean.java 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/examples/misc-demo/src/main/java/org/richfaces/demo/JQueryBean.java 2010-08-17 00:07:05 UTC (rev 18687)
@@ -39,9 +39,16 @@
private List<String> componentsDataList;
+ private List<String> emphasizedElements;
+
public JQueryBean() {
componentsDataList = new ArrayList<String>();
addComponent();
+
+ emphasizedElements = new ArrayList<String>();
+ for (int i = 0; i < 4; i++) {
+ emphasizedElements.add(UUID.randomUUID().toString());
+ }
}
public List<String> getComponentsDataList() {
@@ -52,4 +59,7 @@
componentsDataList.add(UUID.randomUUID().toString());
}
+ public Object getEmphasizedElements() {
+ return emphasizedElements;
+ }
}
Modified: branches/RF-9023/examples/misc-demo/src/main/webapp/pages/jquery.xhtml
===================================================================
--- branches/RF-9023/examples/misc-demo/src/main/webapp/pages/jquery.xhtml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/examples/misc-demo/src/main/webapp/pages/jquery.xhtml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -44,7 +44,15 @@
<f:ajax render=":liveTestGroup" />
</h:commandButton>
</h:form>
-
+
+ <misc:jQuery name="emphasizeElement" query="siblings().css({'border-width': '0px'}).end().css({'border-width': '1px'})" />
+
+ Click any list item to make selection (imitated by red 1px border):
+ <ul>
+ <ui:repeat value="#{jQueryBean.emphasizedElements}" var="elt">
+ <li style="border-color: red; border-style: solid; border-width: 0px;" onclick="emphasizeElement(this, {})">#{elt}</li>
+ </ui:repeat>
+ </ul>
</h:body>
</f:view>
</html>
Modified: branches/RF-9023/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/RF-9023/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -48,5 +48,9 @@
<from-outcome>qunit/accordion</from-outcome>
<to-view-id>/qunit/accordion.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>qunit/accordionHeaders</from-outcome>
+ <to-view-id>/qunit/accordionHeaders.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
</faces-config>
Modified: branches/RF-9023/examples/output-demo/src/main/webapp/qunit/accordion.xhtml
===================================================================
--- branches/RF-9023/examples/output-demo/src/main/webapp/qunit/accordion.xhtml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/examples/output-demo/src/main/webapp/qunit/accordion.xhtml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -12,15 +12,6 @@
<h:outputScript name="qunit/qunit.js" />
<h:outputScript name="qunit/richfaces-qunit.js" />
- <!--<h:outputScript name="richfaces-event.js" />-->
- <!--<h:outputScript name="richfaces-base-component.js" />-->
- <!--<h:outputScript name="richfaces.js" />-->
- <!--<h:outputScript name="TogglePanel.js" />-->
- <!--<h:outputScript name="TogglePanelItem.js" />-->
- <!--<h:outputScript name="TogglePanelTitledItem.js" />-->
- <!--<h:outputScript name="AccordionItem.js" />-->
- <!--<h:outputScript name="Accordion.js" />-->
-
<h:outputStylesheet name="qunit/qunit.css" />
</ui:define>
@@ -31,50 +22,13 @@
<p>Page</p>
<h:form id="f" style="border:blue solid thin;">
- <pn:accordion id="panel" style="padding: 0px; height: 400px; width: 500px;" switchType="ajax">
+ <pn:accordion id="panel">
<pn:accordionItem header="label 1">content 1</pn:accordionItem>
<pn:accordionItem header="label 2">content 2</pn:accordionItem>
<pn:accordionItem header="label 3">content 3</pn:accordionItem>
</pn:accordion>
</h:form>
-<!-- <h:form id="f" style="border:blue solid thin;">
- <div id="f:panel" style="padding: 0px; height: 400px; width: 500px;" class="rich-panelbar rich-panelbar-b">
- <input type="hidden" id="f:panel-value" />
- <div id="f:name1" class="rich-panelbar rich-panelbar-interior ">
- <div id="f:name1-header" class="rich-panelbar-header">label 1</div>
- <div id="f:name1-content" style="display: block; width: 100%; overflow: auto;"
- class="rich-panelbar-content-exterior">
- content 1
- </div>
- </div>
- <div id="f:name2" class="rich-panelbar rich-panelbar-interior ">
- <div id="f:name2-header" class="rich-panelbar-header">label 2</div>
- <div id="f:name2-content" style="display: none; width: 100%; overflow: auto;"
- class="rich-panelbar-content-exterior">
- content 2
- </div>
- </div>
- <div id="f:name3" class="rich-panelbar rich-panelbar-interior ">
- <div id="f:name3-header" class="rich-panelbar-header ">label 3</div>
- <div id="f:name3-content" style="display: none; width: 100%; overflow: auto;"
- class="rich-panelbar-content-exterior">
- content 3
- </div>
- </div>
- <script type="text/javascript">
- new RichFaces.ui.Accordion("f:panel",{
- "items":[
- new RichFaces.ui.AccordionItem("f:name1",{"togglePanelId":"f:panel","switchMode":"client","name":"name1"} ),
- new RichFaces.ui.AccordionItem("f:name2",{"togglePanelId":"f:panel","switchMode":"client","name":"name2"} ),
- new RichFaces.ui.AccordionItem("f:name3",{"togglePanelId":"f:panel","switchMode":"client","name":"name3"} )] ,
- "ajax":{"status":"null","incId":"1"} ,
- "activeItem":"name1",
- "isKeepHeight": false} )
- </script>
- </div>
- </h:form>-->
-
<p>Result</p>
<div>
<ol id="qunit-tests"></ol>
Copied: branches/RF-9023/examples/output-demo/src/main/webapp/qunit/accordionHeaders.xhtml (from rev 18678, trunk/examples/output-demo/src/main/webapp/qunit/accordionHeaders.xhtml)
===================================================================
--- branches/RF-9023/examples/output-demo/src/main/webapp/qunit/accordionHeaders.xhtml (rev 0)
+++ branches/RF-9023/examples/output-demo/src/main/webapp/qunit/accordionHeaders.xhtml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -0,0 +1,58 @@
+<!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:outputStylesheet name="qunit/qunit.css" />
+ </ui:define>
+
+ <ui:define name="title">Accordion Example</ui:define>
+ <ui:define name="body_head">Accordion Example</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="f" style="border:blue solid thin;">
+ <pn:accordion id="panel" style="padding: 0px; height: 400px; width: 500px;" switchType="client">
+ <pn:accordionItem header="label 1">
+ <f:facet name="headerInactive">headerInactive 1</f:facet>
+ <f:facet name="headerActive">headerActive 1</f:facet>
+ <f:facet name="headerDisable">headerDisable 1</f:facet>
+ content 1
+ </pn:accordionItem>
+ <pn:accordionItem header="label 2" disabled="true">
+ <f:facet name="headerInactive">headerInactive 2</f:facet>
+ <f:facet name="headerActive">headerActive 2</f:facet>
+ <f:facet name="headerDisable">headerDisable 2</f:facet>
+ content 2
+ </pn:accordionItem>
+ <pn:accordionItem header="label 3">
+ <f:facet name="headerInactive">headerInactive 3</f:facet>
+ <f:facet name="headerActive">headerActive 3</f:facet>
+ <f:facet name="headerDisable">headerDisable 3</f:facet>
+ content 3
+ </pn:accordionItem>
+ </pn:accordion>
+ </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-accordion-headers-qunit.js" />
+ </ui:define>
+</ui:composition>
+</body>
+</html>
+
Copied: branches/RF-9023/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js (from rev 18678, trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js)
===================================================================
--- branches/RF-9023/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js (rev 0)
+++ branches/RF-9023/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js 2010-08-17 00:07:05 UTC (rev 18687)
@@ -0,0 +1,64 @@
+/*
+ * 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");
+
+ var ACCORDION_ID = "f:panel";
+
+ test("RichFaces.ui.Accordion change headers", function () {
+ var c = RichFaces.$(ACCORDION_ID);
+
+ ok(c instanceof RichFaces.ui.Accordion, "inctance of RichFaces.ui.Accordion");
+ equals(c.id, ACCORDION_ID, "id");
+
+ equals(c.getItems().length, 3, "getItems().length");
+
+ var items = c.getItems();
+ ok( items[0].__header("active" ).is(":visible"), "1 item: active visible");
+ ok(!items[0].__header("inactive").is(":visible"), "1 item: inactive unvisible");
+ ok(!items[0].__header("disable" ).is(":visible"), "1 item: disabled unvisible");
+
+ ok(!items[1].__header("active" ).is(":visible"), "2 item: active unvisible");
+ ok(!items[1].__header("inactive").is(":visible"), "2 item: inactive unvisible");
+ ok( items[1].__header("disable" ).is(":visible"), "2 item: disabled visible");
+
+ ok(!items[2].__header("active" ).is(":visible"), "3 item: active unvisible");
+ ok( items[2].__header("inactive").is(":visible"), "3 item: inactive visible");
+ ok(!items[2].__header("disable" ).is(":visible"), "3 item: disabled unvisible");
+
+ c.switchToItem(items[2].getName());
+ ok(!items[0].__header("active" ).is(":visible"), "1 item: active unvisible");
+ ok( items[0].__header("inactive").is(":visible"), "1 item: inactive visible");
+ ok(!items[0].__header("disable" ).is(":visible"), "1 item: disabled unvisible");
+
+ ok(!items[1].__header("active" ).is(":visible"), "2 item: active unvisible");
+ ok(!items[1].__header("inactive").is(":visible"), "2 item: inactive unvisible");
+ ok( items[1].__header("disable" ).is(":visible"), "2 item: disabled visible");
+
+ ok( items[2].__header("active" ).is(":visible"), "3 item: active visible");
+ ok(!items[2].__header("inactive").is(":visible"), "3 item: inactive unvisible");
+ ok(!items[2].__header("disable" ).is(":visible"), "3 item: disabled unvisible");
+
+ c.switchToItem(items[0].getName());
+ });
+});
Modified: branches/RF-9023/examples/output-demo/src/main/webapp/templates/template.xhtml
===================================================================
--- branches/RF-9023/examples/output-demo/src/main/webapp/templates/template.xhtml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/examples/output-demo/src/main/webapp/templates/template.xhtml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -52,6 +52,7 @@
<li><h:commandLink value="togglePanel" action="qunit/togglePanel" /></li>
<li><h:commandLink value="togglePanelItem" action="qunit/togglePanelItem" /></li>
<li><h:commandLink value="accordion" action="qunit/accordion" /></li>
+ <li><h:commandLink value="accordionHeaders" action="qunit/accordionHeaders" /></li>
</ul>
</h:form>
</td>
Modified: branches/RF-9023/ui/dist/richfaces-components-ui/pom.xml
===================================================================
--- branches/RF-9023/ui/dist/richfaces-components-ui/pom.xml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/ui/dist/richfaces-components-ui/pom.xml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -68,6 +68,10 @@
<!-- for javadoc generation -->
<dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
</dependency>
Modified: branches/RF-9023/ui/misc/ui/src/main/java/org/richfaces/renderkit/JQueryRendererBase.java
===================================================================
--- branches/RF-9023/ui/misc/ui/src/main/java/org/richfaces/renderkit/JQueryRendererBase.java 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/ui/misc/ui/src/main/java/org/richfaces/renderkit/JQueryRendererBase.java 2010-08-17 00:07:05 UTC (rev 18687)
@@ -34,8 +34,8 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.RendererUtils;
import org.richfaces.component.AbstractJQuery;
+import org.richfaces.component.JQueryAttachType;
import org.richfaces.component.JQueryTiming;
-import org.richfaces.component.JQueryAttachType;
import org.richfaces.component.util.HtmlUtil;
/**
Modified: branches/RF-9023/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js
===================================================================
--- branches/RF-9023/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js 2010-08-17 00:07:05 UTC (rev 18687)
@@ -4,65 +4,75 @@
(function(jquery, richfaces) {
- var evaluateSelector = function(selector) {
+ var evaluate = function(selector) {
var result = selector;
try {
result = eval(selector);
} catch (e) {
//do nothing
}
- return result || "";
+ return result;
};
- var createHandler = function(handler) {
- if (typeof handler == 'function') {
- return handler;
- } else {
- return new Function("event", handler);
+ var evaluateJQuery = function(element, selector) {
+ var result = element || evaluate(selector);
+ if (!(result instanceof jquery)) {
+ result = jquery(result || "");
}
+
+ return result;
};
-
- var bindFunction = function(options) {
-
- var selector = evaluateSelector(options.selector);
- var query = options.query;
-
- if (options.event) {
- var handler = createHandler(query);
-
- if (options.attachType == 'live') {
- jQuery(selector).live(options.event, handler);
- } else if (options.attachType == 'one') {
- jQuery(selector).one(options.event, handler);
+
+ var createEventHandlerFunction = function(opts) {
+ return function() {
+ var selector = evaluateJQuery(null, opts.selector);
+ selector[opts.attachType || "bind"](opts.event, null, new Function("event", opts.query));
+ };
+ };
+
+ var createDirectQueryFunction = function(opts) {
+ var queryFunction = new Function("options", "arguments[1]." + opts.query);
+
+ return function() {
+ var element;
+ var options;
+
+ if (arguments.length == 1) {
+ //function(options) { ...query()... }
+ options = arguments[0];
} else {
- jQuery(selector).bind(options.event, handler);
+ //function(element, options) { ...query()... }
+ element = arguments[0];
+ options = arguments[1];
}
+
+ var selector = evaluateJQuery(element, opts.selector);
+ queryFunction.call(this, options, selector);
+ };
+ };
+
+ var createQueryFunction = function(options) {
+ if (options.event) {
+ return createEventHandlerFunction(options);
} else {
- var f = new Function("__locatedObject", "__locatedObject." + query);
- f.call(this, jQuery(selector));
- //TODO return value?
+ return createDirectQueryFunction(options);
}
};
-
- var bind = function(options) {
- if (options.timing == 'immediate') {
- bindFunction(options);
+
+ var query = function(options) {
+ if (options.timing == 'domready') {
+ jquery(document).ready(createQueryFunction(options));
} else {
- jQuery(document).ready(function() {
- bindFunction(options);
- });
+ createQueryFunction(options).call(this);
}
};
-
+
richfaces.jQuery = {
+
+ createFunction: createQueryFunction,
+
+ query: query
- bind: bind,
-
- createBinder: function(options) {
- return function() {
- bind(options);
- };
- }
};
}(jQuery, RichFaces));
Modified: branches/RF-9023/ui/misc/ui/src/main/templates/jquery.template.xml
===================================================================
--- branches/RF-9023/ui/misc/ui/src/main/templates/jquery.template.xml 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/ui/misc/ui/src/main/templates/jquery.template.xml 2010-08-17 00:07:05 UTC (rev 18687)
@@ -20,10 +20,10 @@
<c:choose>
<c:when test="#{not empty functionName}">
- #{functionName} = RichFaces.jQuery.createBinder(#{options});
+ #{functionName} = RichFaces.jQuery.createFunction(#{options});
</c:when>
<c:otherwise>
- RichFaces.jQuery.bind(#{options});
+ RichFaces.jQuery.query(#{options});
</c:otherwise>
</c:choose>
</script>
Modified: branches/RF-9023/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
===================================================================
--- branches/RF-9023/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-08-16 23:48:07 UTC (rev 18686)
+++ branches/RF-9023/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-08-17 00:07:05 UTC (rev 18687)
@@ -138,7 +138,7 @@
writer.writeAttribute("class", "rf-aci-h-" + state + " " + attributeAsString(component, name), name);
- UIComponent headerFacet = component.getFacet("header");
+ UIComponent headerFacet = component.getFacet("header" + capitalize(state));
if (headerFacet != null && headerFacet.isRendered()) {
headerFacet.encodeAll(facesContext);
} else {
15 years, 9 months
JBoss Rich Faces SVN: r18685 - in branches/RF-9023: examples/core-demo and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-16 19:33:56 -0400 (Mon, 16 Aug 2010)
New Revision: 18685
Modified:
branches/RF-9023/cdk/parent/pom.xml
branches/RF-9023/examples/core-demo/pom.xml
branches/RF-9023/examples/iteration-demo/pom.xml
branches/RF-9023/examples/misc-demo/pom.xml
branches/RF-9023/examples/repeater-demo/pom.xml
branches/RF-9023/examples/richfaces-showcase/pom.xml
Log:
RF-9023 further non-core/ui updates for checkstyle changes
Modified: branches/RF-9023/cdk/parent/pom.xml
===================================================================
--- branches/RF-9023/cdk/parent/pom.xml 2010-08-16 23:09:37 UTC (rev 18684)
+++ branches/RF-9023/cdk/parent/pom.xml 2010-08-16 23:33:56 UTC (rev 18685)
@@ -114,17 +114,6 @@
<version>1.0.2</version>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle</artifactId>
- <version>${richfaces.checkstyle.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
<groupId>org.apache.camel</groupId>
<artifactId>guice-maven-plugin</artifactId>
<version>2.2.0</version>
Modified: branches/RF-9023/examples/core-demo/pom.xml
===================================================================
--- branches/RF-9023/examples/core-demo/pom.xml 2010-08-16 23:09:37 UTC (rev 18684)
+++ branches/RF-9023/examples/core-demo/pom.xml 2010-08-16 23:33:56 UTC (rev 18685)
@@ -124,24 +124,6 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Modified: branches/RF-9023/examples/iteration-demo/pom.xml
===================================================================
--- branches/RF-9023/examples/iteration-demo/pom.xml 2010-08-16 23:09:37 UTC (rev 18684)
+++ branches/RF-9023/examples/iteration-demo/pom.xml 2010-08-16 23:33:56 UTC (rev 18685)
@@ -141,24 +141,6 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: branches/RF-9023/examples/misc-demo/pom.xml
===================================================================
--- branches/RF-9023/examples/misc-demo/pom.xml 2010-08-16 23:09:37 UTC (rev 18684)
+++ branches/RF-9023/examples/misc-demo/pom.xml 2010-08-16 23:33:56 UTC (rev 18685)
@@ -156,24 +156,6 @@
</profiles>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Modified: branches/RF-9023/examples/repeater-demo/pom.xml
===================================================================
--- branches/RF-9023/examples/repeater-demo/pom.xml 2010-08-16 23:09:37 UTC (rev 18684)
+++ branches/RF-9023/examples/repeater-demo/pom.xml 2010-08-16 23:33:56 UTC (rev 18685)
@@ -134,24 +134,6 @@
</profiles>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle
- </artifactId>
- <version>${richfaces.checkstyle.version}
- </version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Modified: branches/RF-9023/examples/richfaces-showcase/pom.xml
===================================================================
--- branches/RF-9023/examples/richfaces-showcase/pom.xml 2010-08-16 23:09:37 UTC (rev 18684)
+++ branches/RF-9023/examples/richfaces-showcase/pom.xml 2010-08-16 23:33:56 UTC (rev 18685)
@@ -104,22 +104,6 @@
<build>
<finalName>richfaces-showcase</finalName>
- <pluginManagement>
- <plugins>
- <plugin>
- <!-- Configure checkstyle report for this module -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-build-checkstyle</artifactId>
- <version>${richfaces.checkstyle.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
15 years, 9 months
JBoss Rich Faces SVN: r18684 - in branches/cdk-8570/cdk: generator/src/main/java/org/richfaces/cdk and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-08-16 19:09:37 -0400 (Mon, 16 Aug 2010)
New Revision: 18684
Added:
branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/AlreadyProcessedException.java
Modified:
branches/cdk-8570/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java
branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/NamingConventions.java
branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/RichFacesConventions.java
branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/RendererProcessor.java
branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java
Log:
CODING IN PROGRESS - issue RF-8909: CDK: renderer-type is not written into .taglib.xml
https://jira.jboss.org/browse/RF-8909
Modified: branches/cdk-8570/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java
===================================================================
--- branches/cdk-8570/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java 2010-08-16 23:07:36 UTC (rev 18683)
+++ branches/cdk-8570/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java 2010-08-16 23:09:37 UTC (rev 18684)
@@ -125,7 +125,7 @@
*
* @return
*/
- public Tag[] tag() default { @Tag };
+ public Tag[] tag() default {};
/**
* <p class="changed_added_4_0">
Modified: branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/NamingConventions.java
===================================================================
--- branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/NamingConventions.java 2010-08-16 23:07:36 UTC (rev 18683)
+++ branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/NamingConventions.java 2010-08-16 23:09:37 UTC (rev 18684)
@@ -153,6 +153,14 @@
* @return
*/
public String inferTaglibName(String uri);
+
+
+ /**
+ * <p class="changed_added_4_0">Infer renderer type by component type or family.</p>
+ * @param id
+ * @return
+ */
+ public FacesId inferRendererType(FacesId id);
}
Modified: branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/RichFacesConventions.java
===================================================================
--- branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/RichFacesConventions.java 2010-08-16 23:07:36 UTC (rev 18683)
+++ branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/RichFacesConventions.java 2010-08-16 23:09:37 UTC (rev 18684)
@@ -32,6 +32,12 @@
@Override
public FacesId inferComponentType(ClassName componentClass) throws InvalidNameException {
+ Name name = inferNameByClass(componentClass, null, null);
+
+ return new FacesId(name.toString());
+ }
+
+ private Name inferNameByClass(ClassName componentClass, Classifier classifier, String markup) {
// check parameters.
if (null == componentClass) {
throw new IllegalArgumentException();
@@ -39,6 +45,22 @@
Name name = Name.create(componentClass.toString());
+ processName(classifier, markup, name);
+ return name;
+ }
+
+ private Name inferNameByType(FacesId type, Classifier classifier, String markup) {
+ // check parameters.
+ if (null == type) {
+ throw new IllegalArgumentException();
+ }
+
+ Name name = Name.create(type.toString());
+
+ processName(classifier, markup, name);
+ return name;
+ }
+ private void processName(Classifier classifier, String markup, Name name) {
// Use base library prefix.
String baseName = this.getBaseName();
@@ -47,32 +69,16 @@
}
// JsfComponent type does not contain class or markup parts.
- name.setClassifier(null);
- name.setMarkup(null);
+ name.setClassifier(classifier);
+ name.setMarkup(markup);
String simpleName = name.getSimpleName();
- // Remove common prefixes.
- for (int i = 0; i < COMPONENT_PREFIXES.length; i++) {
- if (simpleName.startsWith(COMPONENT_PREFIXES[i])) {
- simpleName = simpleName.substring(COMPONENT_PREFIXES[i].length());
+ simpleName = removeCommonPreffix(simpleName);
- break;
- }
- }
+ simpleName = removeCommonSuffix(simpleName);
- // Remove common suffixes.
- for (int i = 0; i < COMPONENT_SUFFIXES.length; i++) {
- if (simpleName.endsWith(COMPONENT_SUFFIXES[i])) {
- simpleName = simpleName.substring(0, simpleName.length() - COMPONENT_SUFFIXES[i].length());
-
- break;
- }
- }
-
name.setSimpleName(simpleName);
-
- return new FacesId(name.toString());
}
@Override
@@ -130,10 +136,6 @@
return baseName;
}
- public FacesId inferRendererFamily(FacesId type) {
- return null;
- }
-
public FacesId inferRendererTypeByTemplatePath(String templateName) {
return FacesId.parseId(templateName.replace('/', '.'));
}
@@ -156,27 +158,23 @@
@Override
public FacesId inferBehaviorType(ClassName targetClass) {
- // check parameters.
- if (null == targetClass) {
- throw new IllegalArgumentException();
- }
+ Name name = inferNameByClass(targetClass, Name.Classifier.component, "html");
- Name name = Name.create(targetClass.toString());
+ return new FacesId(name.toString());
+ }
- // Use base library prefix.
- String baseName = this.getBaseName();
+ private String removeCommonSuffix(String simpleName) {
+ for (int i = 0; i < COMPONENT_SUFFIXES.length; i++) {
+ if (simpleName.endsWith(COMPONENT_SUFFIXES[i])) {
+ simpleName = simpleName.substring(0, simpleName.length() - COMPONENT_SUFFIXES[i].length());
- if (null != baseName) {
- name.setPrefix(baseName);
+ break;
+ }
}
+ return simpleName;
+ }
- // Jsf Behavior type does not contain class or markup parts.
- name.setClassifier(null);
- name.setMarkup(null);
-
- String simpleName = name.getSimpleName();
-
- // Remove common prefixes.
+ private String removeCommonPreffix(String simpleName) {
for (int i = 0; i < COMPONENT_PREFIXES.length; i++) {
if (simpleName.startsWith(COMPONENT_PREFIXES[i])) {
simpleName = simpleName.substring(COMPONENT_PREFIXES[i].length());
@@ -184,19 +182,7 @@
break;
}
}
-
- // Remove common suffixes.
- for (int i = 0; i < COMPONENT_SUFFIXES.length; i++) {
- if (simpleName.endsWith(COMPONENT_SUFFIXES[i])) {
- simpleName = simpleName.substring(0, simpleName.length() - COMPONENT_SUFFIXES[i].length());
-
- break;
- }
- }
-
- name.setSimpleName(simpleName);
-
- return new FacesId(name.toString());
+ return simpleName;
}
@Override
@@ -230,13 +216,20 @@
@Override
public ClassName inferRendererClass(FacesId id) {
- // TODO Auto-generated method stub
- return null;
+ return ClassName.get(inferNameByType(id, Classifier.renderkit, null).toString());
}
+ public FacesId inferRendererFamily(FacesId type) {
+ return FacesId.parseId(inferNameByType(type, null, null).toString());
+ }
+
@Override
public FacesId inferRendererType(ClassName targetClass) {
- // TODO Auto-generated method stub
- return null;
+ return FacesId.parseId(inferNameByClass(targetClass, Classifier.renderkit, null).toString());
}
+
+ @Override
+ public FacesId inferRendererType(FacesId id) {
+ return FacesId.parseId(inferNameByType(id, Classifier.renderkit, null).toString());
+ }
}
Modified: branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/RendererProcessor.java
===================================================================
--- branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/RendererProcessor.java 2010-08-16 23:07:36 UTC (rev 18683)
+++ branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/RendererProcessor.java 2010-08-16 23:09:37 UTC (rev 18684)
@@ -21,8 +21,6 @@
package org.richfaces.cdk.apt.processors;
-import java.io.File;
-import java.io.FileNotFoundException;
import java.lang.annotation.Annotation;
import javax.annotation.processing.SupportedAnnotationTypes;
@@ -33,17 +31,13 @@
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
-import org.richfaces.cdk.FileManager;
import org.richfaces.cdk.Logger;
-import org.richfaces.cdk.Source;
-import org.richfaces.cdk.Sources;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.model.ClassName;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.FacesId;
import org.richfaces.cdk.model.RendererModel;
-import org.richfaces.cdk.templatecompiler.RendererTemplateParser;
import org.richfaces.cdk.util.Strings;
import com.google.inject.Inject;
@@ -62,13 +56,7 @@
@Inject
private Logger log;
- @Inject
- @Source(Sources.RENDERER_TEMPLATES)
- private FileManager sources;
- @Inject
- private RendererTemplateParser templateParser;
-
public void process(Element rendererElement, ComponentLibrary library) {
JsfRenderer annotation = rendererElement.getAnnotation(JsfRenderer.class);
@@ -124,12 +112,6 @@
String template = annotation.template();
if (!Strings.isEmpty(template)) {
rendererModel.setTemplatePath(template);
- try {
- File file = sources.getFile(template);
- templateParser.build(file, rendererModel);
- } catch (FileNotFoundException e) {
- log.error("Template file not found", e);
- }
}
}
Modified: branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
===================================================================
--- branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-08-16 23:07:36 UTC (rev 18683)
+++ branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-08-16 23:09:37 UTC (rev 18684)
@@ -72,6 +72,126 @@
*/
public class ValidatorImpl implements ModelValidator {
+ private final class ComponentTypeCallback implements NamingConventionsCallback {
+ @Override
+ public FacesId inferType(ClassName targetClass) {
+ return namingConventions.inferComponentType(targetClass);
+ }
+
+ @Override
+ public ClassName inferClass(FacesId id) {
+ return namingConventions.inferUIComponentClass(id);
+ }
+
+ @Override
+ public ClassName getDefaultBaseClass() throws CallbackException {
+ return ClassName.get(UIComponentBase.class);
+ }
+
+ @Override
+ public ClassName getDefaultClass() throws CallbackException {
+ throw new CallbackException("Cannot determine component class name");
+ }
+
+ @Override
+ public FacesId inferType() throws CallbackException {
+ throw new CallbackException("Cannot determine component type");
+ }
+ }
+
+ private final class BehaviorTypeCallback implements NamingConventionsCallback {
+ private final BehaviorModel behavior;
+
+ private BehaviorTypeCallback(BehaviorModel behavior) {
+ this.behavior = behavior;
+ }
+
+ @Override
+ public FacesId inferType(ClassName targetClass) {
+ return namingConventions.inferBehaviorType(targetClass);
+ }
+
+ @Override
+ public FacesId inferType() throws CallbackException {
+ throw new CallbackException("Cannot infer type for behavior " + this.behavior);
+ }
+
+ @Override
+ public ClassName inferClass(FacesId id) {
+ return namingConventions.inferBehaviorClass(id);
+ }
+
+ @Override
+ public ClassName getDefaultBaseClass() throws CallbackException {
+ return ClassName.get(ClientBehaviorBase.class);
+ }
+
+ @Override
+ public ClassName getDefaultClass() throws CallbackException {
+ throw new CallbackException("Cannot infer Java class name for behavior " + this.behavior);
+ }
+ }
+
+ private final class RendererTypeCallback implements NamingConventionsCallback {
+ private final ComponentLibrary library;
+ private final RendererModel renderer;
+
+ private RendererTypeCallback(ComponentLibrary library, RendererModel renderer) {
+ this.library = library;
+ this.renderer = renderer;
+ }
+
+ @Override
+ public FacesId inferType(ClassName targetClass) {
+ try {
+ return inferType();
+ } catch (CallbackException e) {
+ return namingConventions.inferRendererType(targetClass);
+ }
+ }
+
+ @Override
+ public FacesId inferType() throws CallbackException {
+ // For renderers with template - try to determine type by template file.
+ if (null != this.renderer.getTemplate()) {
+ for (ComponentModel component : this.library.getComponents()) {
+ if (null != component.getRendererTemplate()
+ && this.renderer.getTemplate().getTemplatePath().endsWith(component.getRendererTemplate())) {
+ if (null != component.getRendererType()) {
+ return component.getRendererType();
+ } else {
+ FacesId rendererType = namingConventions.inferRendererType(component.getId());
+ component.setRendererType(rendererType);
+ return rendererType;
+ }
+ }
+ }
+ // No component found, try to infer from template path.
+ return namingConventions.inferRendererTypeByTemplatePath(this.renderer.getTemplate().getTemplatePath());
+ }
+ // If previvious attempt fall, try to infer renderer type from family.
+ if (null != this.renderer.getFamily()) {
+ return namingConventions.inferRendererType(this.renderer.getFamily());
+ }
+ throw new CallbackException("Cannot determine renderer type");
+ }
+
+ @Override
+ public ClassName inferClass(FacesId id) {
+ return namingConventions.inferRendererClass(id);
+ }
+
+ @Override
+ public ClassName getDefaultClass() throws CallbackException {
+ throw new CallbackException("Cannot determine renderer class name");
+ }
+
+ @Override
+ public ClassName getDefaultBaseClass() throws CallbackException {
+ return ClassName.get(Renderer.class);
+ }
+ }
+
public static final ClassName DEFAULT_COMPONENT_HANDLER = new ClassName(ComponentHandler.class);
public static final ClassName DEFAULT_VALIDATOR_HANDLER = new ClassName(ValidatorHandler.class);
public static final ClassName DEFAULT_CONVERTER_HANDLER = new ClassName(ConverterHandler.class);
@@ -166,33 +286,7 @@
*/
protected void verifyBehaviors(ComponentLibrary library) {
for (final BehaviorModel behavior : library.getBehaviors()) {
- verifyTypes(behavior, new NamingConventionsCallback() {
-
- @Override
- public FacesId inferType(ClassName targetClass) {
- return namingConventions.inferBehaviorType(targetClass);
- }
-
- @Override
- public FacesId inferType() throws CallbackException {
- throw new CallbackException("Cannot infer type for behavior " + behavior);
- }
-
- @Override
- public ClassName inferClass(FacesId id) {
- return namingConventions.inferBehaviorClass(id);
- }
-
- @Override
- public ClassName getDefaultBaseClass() throws CallbackException {
- return ClassName.get(ClientBehaviorBase.class);
- }
-
- @Override
- public ClassName getDefaultClass() throws CallbackException {
- throw new CallbackException("Cannot infer Java class name for behavior " + behavior);
- }
- });
+ verifyTypes(behavior, new BehaviorTypeCallback(behavior));
for (TagModel tag : behavior.getTags()) {
verifyTag(tag, behavior.getId(), DEFAULT_BEHAVIOR_HANDLER);
}
@@ -209,39 +303,13 @@
}
}
- protected void vefifyRenderer(ComponentLibrary library, final RendererModel renderer) {
+ protected void vefifyRenderer(final ComponentLibrary library, final RendererModel renderer) {
// Check type.
- verifyTypes(renderer, new NamingConventionsCallback() {
-
- @Override
- public FacesId inferType(ClassName targetClass) {
- return namingConventions.inferRendererType(targetClass);
- }
-
- @Override
- public FacesId inferType() throws CallbackException {
- throw new CallbackException("Cannot determine renderer type");
- }
-
- @Override
- public ClassName inferClass(FacesId id) {
- return namingConventions.inferRendererClass(id);
- }
-
- @Override
- public ClassName getDefaultClass() throws CallbackException {
- throw new CallbackException("Cannot determine renderer class name");
- }
-
- @Override
- public ClassName getDefaultBaseClass() throws CallbackException {
- return ClassName.get(Renderer.class);
- }
- });
+ verifyTypes(renderer, new RendererTypeCallback(library, renderer));
// Check component type.
for (ComponentModel component : library.getComponents()) {
- if(renderer.getId().equals(component.getRendererType())){
+ if (renderer.getId().equals(component.getRendererType())) {
renderer.getAttributes().addAll(component.getAttributes());
renderer.setFamily(component.getFamily());
}
@@ -347,34 +415,7 @@
*/
protected void verifyComponentType(ComponentModel component) throws InvalidNameException {
// Check JsfComponent type.
- if (verifyTypes(component, new NamingConventionsCallback() {
-
- @Override
- public FacesId inferType(ClassName targetClass) {
- return namingConventions.inferComponentType(targetClass);
- }
-
- @Override
- public ClassName inferClass(FacesId id) {
- return namingConventions.inferUIComponentClass(id);
- }
-
- @Override
- public ClassName getDefaultBaseClass() throws CallbackException {
- return ClassName.get(UIComponentBase.class);
- }
-
- @Override
- public ClassName getDefaultClass() throws CallbackException {
- throw new CallbackException("Cannot determine component class name");
- }
-
- @Override
- public FacesId inferType() throws CallbackException {
- throw new CallbackException("Cannot determine component type");
- }
-
- }) && null == component.getFamily()) {
+ if (verifyTypes(component, new ComponentTypeCallback()) && null == component.getFamily()) {
// Check family.
component.setFamily(namingConventions.inferUIComponentFamily(component.getId()));
}
@@ -409,7 +450,7 @@
if (null == component.getBaseClass()) {
component.setBaseClass(callback.getDefaultBaseClass());
// return;
- }
+ }
if (null == component.getTargetClass()) {
component.setTargetClass(callback.inferClass(component.getId()));
}
Added: branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/AlreadyProcessedException.java
===================================================================
--- branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/AlreadyProcessedException.java (rev 0)
+++ branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/AlreadyProcessedException.java 2010-08-16 23:09:37 UTC (rev 18684)
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.templatecompiler;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class AlreadyProcessedException extends RuntimeException {
+
+}
Property changes on: branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/AlreadyProcessedException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java
===================================================================
--- branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java 2010-08-16 23:07:36 UTC (rev 18683)
+++ branches/cdk-8570/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java 2010-08-16 23:09:37 UTC (rev 18684)
@@ -158,35 +158,41 @@
public void build() throws CdkException {
Iterable<File> sourceFiles = this.sources.getFiles();
for (File file : sourceFiles) {
- build(file, null);
+ build(file);
}
}
- public RendererModel build(File file, RendererModel rendererModel) throws CdkException {
+ public void build(final File file) throws CdkException {
log.debug("RendererTemplateParser.build");
final String absolutePath = file.getAbsolutePath();
log.debug(" - file = " + absolutePath);
- log.debug(" - renderer = " + rendererModel);
-
- RendererModel existedModel = library.accept(new SimpleVisitor<RendererModel, String>() {
- @Override
- public RendererModel visitRender(RendererModel model, String absolutePath) {
- Template template = model.getTemplate();
- if (null != template && absolutePath.equals(template.getTemplatePath())) {
- return model;
- } else {
+ try {
+ RendererModel existedModel = library.accept(new SimpleVisitor<RendererModel, String>() {
+ @Override
+ public RendererModel visitRender(RendererModel model, String absolutePath) {
+ Template template = model.getTemplate();
+ if (null != template) {
+ if (absolutePath.equals(template.getTemplatePath())) {
+ throw new AlreadyProcessedException();
+ }
+ } else if (null != model.getTemplatePath()) {
+ try {
+ if (file.equals(sources.getFile(model.getTemplatePath()))) {
+ return model;
+ }
+ } catch (FileNotFoundException e) {
+ throw new CdkException("Template file defined in Renderer not found: "
+ + model.getTemplatePath(), e);
+ }
+ }
return null;
}
- }
- }, absolutePath);
- if (null != existedModel) {
- log.debug(" - Template was already processed.");
- return existedModel;
+ }, absolutePath);
+ Template template = parseTemplate(file);
+ mergeTemplateIntoModel(template, existedModel);
+ } catch (AlreadyProcessedException e) {
+ log.warn("Template " + absolutePath + "was already processed");
}
-
- Template template = parseTemplate(file);
- template.setTemplatePath(absolutePath);
- return mergeTemplateIntoModel(template, rendererModel);
}
protected RendererModel mergeTemplateIntoModel(Template template, RendererModel renderer) throws CdkException {
@@ -284,7 +290,9 @@
protected Template parseTemplate(File file) throws CdkException {
try {
- return jaxbBinding.unmarshal(file, "http://richfaces.org/cdk/cdk-template.xsd", Template.class);
+ Template template = jaxbBinding.unmarshal(file, "http://richfaces.org/cdk/cdk-template.xsd", Template.class);
+ template.setTemplatePath(file.getAbsolutePath());
+ return template;
} catch (FileNotFoundException e) {
throw new CdkException("Template file not found " + file.getAbsolutePath(), e);
}
15 years, 9 months
JBoss Rich Faces SVN: r18683 - modules/build/parent/branches/RF-9023.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-16 19:07:36 -0400 (Mon, 16 Aug 2010)
New Revision: 18683
Modified:
modules/build/parent/branches/RF-9023/pom.xml
Log:
RF-9023 updates to parent for checkstyle
Modified: modules/build/parent/branches/RF-9023/pom.xml
===================================================================
--- modules/build/parent/branches/RF-9023/pom.xml 2010-08-16 22:56:51 UTC (rev 18682)
+++ modules/build/parent/branches/RF-9023/pom.xml 2010-08-16 23:07:36 UTC (rev 18683)
@@ -61,6 +61,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Override the default 2.0.9 from jboss-parent -->
<maven.min.version>2.1.0</maven.min.version>
+ <richfaces.checkstyle.version>2-SNAPSHOT</richfaces.checkstyle.version>
</properties>
<!-- Repository management, including extra repositories if needed -->
@@ -209,8 +210,6 @@
<configuration>
<configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
</configLocation>
- <suppressionsLocation>checkstyle-suppressions.xml
- </suppressionsLocation>
</configuration>
<executions>
<execution>
@@ -221,6 +220,13 @@
</goals>
</execution>
</executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-build-checkstyle</artifactId>
+ <version>${richfaces.checkstyle.version}</version>
+ </dependency>
+ </dependencies>
</plugin>
<!-- dev -->
@@ -393,11 +399,11 @@
<!-- SCM and distribution management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/build/parent/trunk
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/build/parent/trunk
</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/build/parent/trunk
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/build/parent/trunk
</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/root/build/parent/trunk</url>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/build/parent/trunk</url>
</scm>
</project>
15 years, 9 months
JBoss Rich Faces SVN: r18682 - modules/build/parent/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-16 18:56:51 -0400 (Mon, 16 Aug 2010)
New Revision: 18682
Added:
modules/build/parent/branches/RF-9023/
Log:
RF-9023 Dev branch for parent updates
Copied: modules/build/parent/branches/RF-9023 (from rev 18681, modules/build/parent/trunk)
15 years, 9 months