JBoss Rich Faces SVN: r15175 - branches/community/3.3.X/test-applications/facelets/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-08-14 04:20:51 -0400 (Fri, 14 Aug 2009)
New Revision: 15175
Modified:
branches/community/3.3.X/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
Log:
Modified: branches/community/3.3.X/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/3.3.X/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2009-08-14 06:21:49 UTC (rev 15174)
+++ branches/community/3.3.X/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2009-08-14 08:20:51 UTC (rev 15175)
@@ -67,11 +67,7 @@
org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL
</param-name>
<param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.LIBRARIES</param-name>
- <param-value>/WEB-INF/myTags.taglib.xml</param-value>
- </context-param>
+ </context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
15 years, 4 months
JBoss Rich Faces SVN: r15174 - in root/cdk/trunk/plugins/generator: src/main/script and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-08-14 02:21:49 -0400 (Fri, 14 Aug 2009)
New Revision: 15174
Modified:
root/cdk/trunk/plugins/generator/pom.xml
root/cdk/trunk/plugins/generator/src/main/script/SchemaAttributesParserTask.groovy
Log:
change build configuration to avoid rebuild of the same schema attributes.
Modified: root/cdk/trunk/plugins/generator/pom.xml
===================================================================
--- root/cdk/trunk/plugins/generator/pom.xml 2009-08-14 01:11:58 UTC (rev 15173)
+++ root/cdk/trunk/plugins/generator/pom.xml 2009-08-14 06:21:49 UTC (rev 15174)
@@ -36,7 +36,7 @@
<version>1.0-rc-5</version>
<executions>
<execution>
- <phase>generate-resources</phase>
+ <phase>process-resources</phase>
<goals>
<goal>execute</goal>
</goals>
Modified: root/cdk/trunk/plugins/generator/src/main/script/SchemaAttributesParserTask.groovy
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/script/SchemaAttributesParserTask.groovy 2009-08-14 01:11:58 UTC (rev 15173)
+++ root/cdk/trunk/plugins/generator/src/main/script/SchemaAttributesParserTask.groovy 2009-08-14 06:21:49 UTC (rev 15174)
@@ -78,11 +78,15 @@
log.info("Writing serialized attributes to: " + outputFileName);
File outputFile = new File(outputFileName);
-
- outputFile.getParentFile().mkdirs();
-
+
if (outputFile.exists()) {
+ File inputFile = new File(sourceSchemaFileName);
+ if(outputFile.lastModified() > inputFile.lastModified()){
+ return;
+ }
outputFile.delete();
+ } else {
+ outputFile.getParentFile().mkdirs();
}
outputFile.createNewFile();
15 years, 4 months
JBoss Rich Faces SVN: r15173 - in root/cdk/trunk/plugins/annotations: src/main/java/org/richfaces/cdk/annotations and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-08-13 21:11:58 -0400 (Thu, 13 Aug 2009)
New Revision: 15173
Added:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Converter.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facets.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Fires.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java
Modified:
root/cdk/trunk/plugins/annotations/pom.xml
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java
Log:
new annotations added.
Modified: root/cdk/trunk/plugins/annotations/pom.xml
===================================================================
--- root/cdk/trunk/plugins/annotations/pom.xml 2009-08-14 00:52:46 UTC (rev 15172)
+++ root/cdk/trunk/plugins/annotations/pom.xml 2009-08-14 01:11:58 UTC (rev 15173)
@@ -25,5 +25,11 @@
</plugins>
</build>
<dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java 2009-08-14 00:52:46 UTC (rev 15172)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -44,4 +44,6 @@
boolean readOnly() default false;
String name() default "";
+
+ Class<?> type() default Object.class;
}
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,57 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface Attributes {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Attributes";
+
+ /**
+ * <p class="changed_added_4_0">
+ * To avoid copy/paste routine for standard or other useful attributes, their definitions could be
+ * stored in faces-config.xml extensions and reused from different
+ * components.
+ * </p>
+ *
+ * @return references to XML files that contain attributes definitions.
+ */
+ public Attribute[] value();
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java 2009-08-14 00:52:46 UTC (rev 15172)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -62,4 +62,14 @@
* @return
*/
public String className() default "";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Family of the component. If this value an empty, it will be inferred.
+ * </p>
+ *
+ * @return component family.
+ */
+ public String family() default "";
+
}
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Converter.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Converter.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Converter.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,57 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface Converter {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Converter";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Type of the renderer. If this value an empty, component type will be inferred from class name.
+ * </p>
+ *
+ * @return converter type.
+ */
+ public String id() default "";
+
+ public Class<?> forClass() default Object.class;
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Converter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,56 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface Event {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Event";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Name of the listener interface class.
+ * </p>
+ *
+ * @return component type.
+ */
+ public String listener() default "";
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,50 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.METHOD)
+@Inherited
+public @interface Facet {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Facets";
+
+ /**
+ * <p class="changed_added_4_0">The name of that facet.</p>
+ * @return
+ */
+ String value() default "";
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facets.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facets.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facets.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,57 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface Facets {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Facets";
+
+ /**
+ * <p class="changed_added_4_0">
+ * To avoid copy/paste routine for standard or other useful attributes, their definitions could be
+ * stored in faces-config.xml extensions and reused from different
+ * components.
+ * </p>
+ *
+ * @return references to XML files that contain attributes definitions.
+ */
+ public Facet[] value();
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facets.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Fires.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Fires.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Fires.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,50 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.faces.event.FacesEvent;
+
+/**
+ * <p class="changed_added_4_0">This annotation defines events that are fired by component.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface Fires {
+
+ /**
+ * <p class="changed_added_4_0">Array of all {@link FacesEvent} inherited classes that could be fired by component.</p>
+ * @return
+ */
+ public Class<? extends FacesEvent>[] value();
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Fires.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,56 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface Renderer {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Renderer";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Type of the renderer. If this value an empty, component type will be inferred from class name.
+ * </p>
+ *
+ * @return component type.
+ */
+ public String type() default "";
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,56 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface RendererTemplate {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.RendererTemplate";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Type of the renderer. If this value an empty, component type will be inferred from class name.
+ * </p>
+ *
+ * @return component type.
+ */
+ public String value() default "";
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java 2009-08-14 01:11:58 UTC (rev 15173)
@@ -0,0 +1,57 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface RendererTemplates {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.RendererTemplates";
+
+ /**
+ * <p class="changed_added_4_0">
+ * To avoid copy/paste routine for standard or other useful attributes, their definitions could be
+ * stored in faces-config.xml extensions and reused from different
+ * components.
+ * </p>
+ *
+ * @return references to XML files that contain attributes definitions.
+ */
+ public RendererTemplate[] value();
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months
JBoss Rich Faces SVN: r15172 - in root/cdk/trunk/plugins/generator/src: main/java/org/richfaces/cdk/apt and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-08-13 20:52:46 -0400 (Thu, 13 Aug 2009)
New Revision: 15172
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/CdkConfiguration.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/LibraryModelWrapper.java
Removed:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkWriter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
Log:
Base FreMarker template renderer.
Improve model.
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkWriter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkWriter.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkWriter.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -36,7 +36,7 @@
String getName();
}
- public void init(CdkContext context);
+ public void init(CdkContext context) throws CdkException;
public void render(ComponentLibrary library) throws CdkException;
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -103,7 +103,7 @@
for (SourceType type : StandardSources.values()) {
ComponentLibrary model = buildModel(type);
if (null != library) {
- library.apply(model);
+ library.merge(model);
} else {
library = model;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -34,6 +34,7 @@
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.TypeParameterElement;
import javax.lang.model.element.VariableElement;
@@ -43,6 +44,7 @@
import javax.lang.model.util.ElementFilter;
import org.richfaces.cdk.CdkContext;
+import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.InvalidNameException;
import org.richfaces.cdk.util.PropertyUtils;
@@ -139,13 +141,17 @@
return processingEnv.getElementUtils().getDocComment(element);
}
- public String getTypeName() {
- return type.toString();
+ public TypeMirror getType() {
+ return type;
}
- public String getTypeParameters() {
- // TODO - analyze type parameters for getter/setter methods.
- return null;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the exists
+ */
+ public boolean isExists() {
+ return exists;
}
}
@@ -232,6 +238,7 @@
// Have an annotation, infer property name.
String name;
TypeMirror propertyType;
+ boolean exists = false;
if (ElementKind.METHOD.equals(childElement.getKind())) {
ExecutableElement method = (ExecutableElement) childElement;
propertyType = method.getReturnType();
@@ -255,22 +262,26 @@
// exception ?
continue;
}
- // TODO - Get method type parameters.
+ exists = method.getModifiers().contains(Modifier.ABSTRACT);
// List<? extends TypeParameterElement> typeParameters = method.getTypeParameters();
} else if (ElementKind.FIELD
.equals(childElement.getKind())) {
name = childElement.getSimpleName().toString();
propertyType = childElement.asType();
+ // TODO - find getter/setter, check them for abstract.
+ exists = true;
} else {
continue;
}
BeanProperty property = new BeanProperty(name);
property.type = propertyType;
property.element = childElement;
+ property.exists = exists;
// TODO - merge properties with same name ?
properties.add(property);
}
}
return properties;
}
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -31,10 +31,14 @@
import javax.lang.model.element.Element;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.MirroredTypeException;
+import javax.lang.model.type.MirroredTypesException;
+import javax.lang.model.type.TypeMirror;
import org.richfaces.cdk.CdkContext;
import org.richfaces.cdk.NamingConventions;
import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.Attributes;
import org.richfaces.cdk.annotations.Component;
import org.richfaces.cdk.annotations.Family;
import org.richfaces.cdk.model.ClassDescription;
@@ -86,7 +90,7 @@
// Create/get component instance.
org.richfaces.cdk.model.Component componentModel = library
.createComponent(componentType, uiComponentClass, baseClassName);
- // Component Family.
+ // Component Family. TODO - get it from 'COMPONENT_FAMILY' field or infer by NamingConventios.
Family family = component.getAnnotation(Family.class);
componentModel.setFamily(Strings.isEmpty(family.value())?componentType:family.value());
// JavaDoc comments
@@ -97,13 +101,29 @@
Set<BeanProperty> properties = getBeanPropertiesAnnotatedWith(Attribute.class, component);
// TODO - encapsulate attribute builder into utility class.
for (BeanProperty beanProperty : properties) {
- Property atribute = componentModel.addAtribute(beanProperty.getName());
+ Property atribute = componentModel.addAttribute(beanProperty.getName());
// Documentation
atribute.setDescription(beanProperty.getDocComment());
// Type.
- atribute.setType(new ClassDescription(beanProperty.getTypeName()));
+ atribute.setType(createClassDescription(beanProperty.getType()));
// Flags.
+ atribute.setExists(beanProperty.isExists());
}
+ Attributes attributes = component.getAnnotation(Attributes.class);
+ if(null != attributes){
+ Attribute[] attributes2 = attributes.value();
+ for (Attribute attributeAnnotation : attributes2) {
+ Property attribute = componentModel.addAttribute(attributeAnnotation.name());
+ attribute.setExists(false);
+ try {
+ Class<?> type = attributeAnnotation.type();
+ attribute.setType(library.createClassDescription(type.getName()));
+ } catch(MirroredTypeException ex){
+ attribute.setType(createClassDescription(ex.getTypeMirror()));
+ }
+ // TODO - process additional properties.
+ }
+ }
// TODO - Process standard information for parent classes and intrfaces.
} catch (InvalidNameException e) {
// rise error and continue.
@@ -120,4 +140,8 @@
return library;
}
+ protected ClassDescription createClassDescription(TypeMirror mirror){
+ return getLibrary().createClassDescription(mirror.toString());
+ }
+
}
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/CdkConfiguration.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/CdkConfiguration.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/CdkConfiguration.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -0,0 +1,73 @@
+/*
+ * $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.freemarker;
+
+import org.richfaces.cdk.CdkContext;
+
+import freemarker.template.Configuration;
+import freemarker.template.TemplateHashModel;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class CdkConfiguration extends Configuration {
+
+ private final CdkContext context;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the context
+ */
+ protected CdkContext getContext() {
+ return context;
+ }
+
+ public CdkConfiguration(CdkContext context) {
+ super();
+ this.context = context;
+ // TODO set proper template loader.
+ setClassForTemplateLoading(context.getClass(), "/META-INF/templates");
+ // TODO create an object wrapper for library model.
+ setObjectWrapper(new LibraryModelWrapper());
+ // Add context variables
+ this.setSharedVariable("context", new TemplateHashModel() {
+
+ @Override
+ public TemplateModel get(String key) throws TemplateModelException {
+ // TODO - define context parameters that could be exposed to template.
+ return null;
+ }
+
+ @Override
+ public boolean isEmpty() throws TemplateModelException {
+ return false;
+ }
+ });
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/CdkConfiguration.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -0,0 +1,108 @@
+/*
+ * $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.freemarker;
+
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.richfaces.cdk.CdkContext;
+import org.richfaces.cdk.CdkException;
+import org.richfaces.cdk.CdkWriter;
+import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.JsfComponent;
+import org.richfaces.cdk.model.LibraryVisitor;
+
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+
+/**
+ * <p class="changed_added_4_0">Base class for all output file buildes that use FreeMarker as template engine.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public abstract class FreeMarkerRenderer<C extends JsfComponent,P> implements CdkWriter,LibraryVisitor<Boolean, P> {
+
+ private CdkContext context;
+ private Configuration configuration;
+ private Template template;
+
+ @Override
+ public void init(CdkContext context) throws CdkException {
+ this.context = context;
+ this.configuration = new CdkConfiguration(context);
+ try {
+ template = configuration.getTemplate(getTemplateName());
+ } catch (IOException e) {
+ throw new CdkException(e);
+ }
+ }
+
+ @Override
+ public void render(ComponentLibrary library) throws CdkException {
+ library.accept(this, getVisitorParameter());
+ }
+
+ private P getVisitorParameter() {
+ return null;
+ }
+
+ @Override
+ public Boolean visit(JsfComponent c, P param) {
+ if(isMyComponent(c)){
+ return processComponent((C)c, param);
+ }
+ return null;
+ }
+
+ protected boolean processComponent(C c, P param) {
+ try {
+ FileWriter out = new FileWriter(getOutputFile(c));
+ template.process(c, out);
+ out.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (TemplateException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } finally {
+ }
+ return false;
+ }
+
+ protected abstract String getOutputFile(C c);
+
+ protected abstract boolean isMyComponent(JsfComponent c);
+
+ protected abstract String getTemplateName();
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the context
+ */
+ protected CdkContext getContext() {
+ return context;
+ }
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/LibraryModelWrapper.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/LibraryModelWrapper.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/LibraryModelWrapper.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -0,0 +1,44 @@
+/*
+ * $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.freemarker;
+
+import freemarker.template.DefaultObjectWrapper;
+import freemarker.template.ObjectWrapper;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class LibraryModelWrapper extends DefaultObjectWrapper implements
+ ObjectWrapper {
+
+ @Override
+ public TemplateModel wrap(Object obj) throws TemplateModelException {
+ // TODO wrap specified model classes.
+ return super.wrap(obj);
+ }
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/LibraryModelWrapper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -1,17 +0,0 @@
-package org.richfaces.cdk.model;
-
-public class Attribute {
-
- private String type;
-
- private String family;
-
- private String className;
-
- private String superClass;
-
- private String renderKit;
-
- private String template;
-
-}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -33,8 +33,19 @@
* @author asmirnov(a)exadel.com
*
*/
-public class ClassDescription {
+public class ClassDescription implements JsfComponent {
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ private static final long serialVersionUID = -846623207703750456L;
+
+ public static final class Type extends JsfType {
+ public Type(String type) {
+ super(type);
+ }
+ }
+
private static final ImmutableMap<String, String> primitiveTypes = ImmutableMap
.<String, String> builder().put(boolean.class.getName(),
Boolean.class.getName()).put(byte.class.getName(),
@@ -46,13 +57,24 @@
Float.class.getName()).put(double.class.getName(),
Double.class.getName()).build();
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
private final String name;
+ private final Type type ;
+
private final boolean primitive;
private final String boxingClassName;
private ClassDescription superClass;
+
+ /**
+ * <p class="changed_added_4_0">Type parameters for that class</p>
+ * TODO append type parameters to key.
+ */
+ private String typeParameters;
/**
* <p class="changed_added_4_0">
@@ -69,8 +91,14 @@
boxingClassName = name;
primitive = false;
}
+ this.type = new Type(name);
}
+ @Override
+ public JsfType getType() {
+ return type;
+ }
+
/**
* <p class="changed_added_4_0">
* </p>
@@ -93,6 +121,22 @@
}
/**
+ * <p class="changed_added_4_0"></p>
+ * @return the typeParameters
+ */
+ public String getTypeParameters() {
+ return typeParameters;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param typeParameters the typeParameters to set
+ */
+ public void setTypeParameters(String typeParameters) {
+ this.typeParameters = typeParameters;
+ }
+
+ /**
* <p class="changed_added_4_0">
* </p>
*
@@ -127,4 +171,46 @@
return name;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (!(obj instanceof ClassDescription)) {
+ return false;
+ }
+ ClassDescription other = (ClassDescription) obj;
+ if (name == null) {
+ if (other.name != null) {
+ return false;
+ }
+ } else if (!name.equals(other.name)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -21,6 +21,7 @@
* <p class="changed_added_4_0">Component type</p>
*/
private final Type type;
+
/**
* <p class="changed_added_4_0">component family</p>
@@ -177,7 +178,7 @@
return Collections.unmodifiableCollection(attributes.values());
}
- public Property addAtribute(String attributeName) {
+ public Property addAttribute(String attributeName) {
Property attribute;
if(attributes.containsKey(attributeName)){
attribute = attributes.get(attributeName);
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -29,11 +29,17 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Set;
import org.richfaces.cdk.model.Component.Type;
import org.richfaces.cdk.util.Strings;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
/**
* <p class="changed_added_4_0">
@@ -55,16 +61,9 @@
*/
private static final long serialVersionUID = -6055670836731899832L;
- /**
- * <p class="changed_added_4_0">
- * JSF components in that library
- * </p>
- */
- private final Map<Component.Type, Component> components = Maps.newHashMap();
+ private final Set<Component> componentsSet = Sets.newHashSet();
- private final Collection<Component> componentsSet = Collections
- .unmodifiableCollection(components.values());
-
+ private final Set<ClassDescription> classes = Sets.newHashSet();
/**
* <p class="changed_added_4_0">
* JSF renderer associated with that library
@@ -87,8 +86,6 @@
*/
private final TagLibrary tagLibrary;
-
-
/**
* <p class="changed_added_4_0">
* </p>
@@ -106,10 +103,29 @@
*
* @param otherLibrary
*/
- public void apply(ComponentLibrary otherLibrary) {
+ public void merge(ComponentLibrary otherLibrary) {
// TODO Auto-generated method stub
}
+ public <R,P> R accept(LibraryVisitor<R, P> visitor,P param){
+ R result = accept(componentsSet,visitor, param, null);
+ result = accept(renderers,visitor, param, result);
+ result = accept(converters,visitor, param, result);
+ result = accept(validators,visitor, param, result);
+ result = accept(listeners,visitor, param, result);
+ return result;
+ }
+
+ private <R,P,T extends JsfComponent> R accept(Iterable<T> components, LibraryVisitor<R, P> visitor,P param, R result){
+ for (T t : components) {
+ R accept = t.accept(visitor, param);
+ if(null != accept){
+ result = accept;
+ }
+ }
+ return result;
+ }
+
/**
* <p class="changed_added_4_0">
* </p>
@@ -133,43 +149,77 @@
*/
public Component getComponent(String type, boolean create) {
Component.Type componentType = new Component.Type(type);
- Component component = components.get(componentType);
- if (null == component && create) {
- component = new Component(componentType);
- components.put(componentType, component);
+ Component component = null;
+ try {
+ component = find(componentsSet, componentType);
+ } catch (NoSuchElementException e) {
+ if (create) {
+ component = new Component(componentType);
+ componentsSet.add(component);
+ }
}
return component;
}
/**
- * <p class="changed_added_4_0">Create a new component description.</p>
- * @param type component type.
- * @param className final component class name.
- * @param superClassName name of the component superclass. May be empty or null for already existed components.
- * @return
+ * <p class="changed_added_4_0">
+ * Create a new component description.
+ * </p>
+ *
+ * @param type
+ * component type.
+ * @param className
+ * final component class name.
+ * @param superClassName
+ * name of the component superclass. May be empty or null for
+ * already existed components.
+ * @return
*/
- public Component createComponent(String type, String className, String superClassName) {
+ public Component createComponent(String type, String className,
+ String superClassName) {
Component component = getComponent(type, true);
ClassDescription componentClass;
- if(!Strings.isEmpty(className)){
- componentClass = new ClassDescription(className);
- if(!Strings.isEmpty(superClassName) && !className.equals(superClassName)){
- componentClass.setSuperClass(new ClassDescription(superClassName));
+ if (!Strings.isEmpty(className)) {
+ componentClass = createClassDescription(className);
+ if (!Strings.isEmpty(superClassName)
+ && !className.equals(superClassName)) {
+ componentClass
+ .setSuperClass(createClassDescription(superClassName));
}
- } else if(!Strings.isEmpty(superClassName)) {
- componentClass = new ClassDescription(superClassName);
+ } else if (!Strings.isEmpty(superClassName)) {
+ componentClass = createClassDescription(superClassName);
} else {
- // Do not modify class descriptions because it would be already existed component.
+ // Do not modify class descriptions because it would be already
+ // existed component.
return component;
}
component.setComponentClass(componentClass);
return component;
}
-
+
/**
* <p class="changed_added_4_0">
+ * Gets or creates {@link ClassDescription} object.
* </p>
*
+ * @param className
+ * @return
+ */
+ public ClassDescription createClassDescription(String className) {
+ ClassDescription result;
+ try {
+ result = find(classes, new ClassDescription.Type(className));
+ } catch (NoSuchElementException e) {
+ result = new ClassDescription(className);
+ classes.add(result);
+ }
+ return result;
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
* @return the renderers
*/
public List<Renderer> getRenderers() {
@@ -226,5 +276,34 @@
return tagLibrary;
}
+ // Utility methods.
+ /**
+ * <p class="changed_added_4_0">
+ * Find element in the model collection.
+ * </p>
+ *
+ * @param <T>
+ * type of element to find.
+ * @param collection
+ * of elements.
+ * @param key
+ * for search.
+ * @return existing element in the collection.
+ * @throws NoSuchElementException
+ * if there was no such element in collection.
+ */
+ private <T extends JsfComponent> T find(Iterable<T> collection,
+ final JsfType key) throws NoSuchElementException {
+ return Iterables.find(collection, new Predicate<T>() {
+
+ @Override
+ public boolean apply(T input) {
+
+ return key.equals(input.getType());
+ }
+
+ });
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -46,6 +46,11 @@
*/
private String displayname;
+ /**
+ * <p class="changed_added_4_0">Is that bean property exists in the class or should be generated ?</p>
+ */
+ private boolean exists;
+
/**
* <p class="changed_added_4_0"></p>
@@ -111,6 +116,22 @@
this.type = type;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the exists
+ */
+ public boolean isExists() {
+ return exists;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param exists the exists to set
+ */
+ public void setExists(boolean exists) {
+ this.exists = exists;
+ }
+
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java 2009-08-13 16:45:29 UTC (rev 15171)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java 2009-08-14 00:52:46 UTC (rev 15172)
@@ -289,19 +289,17 @@
assertEquals(3, beanProperties.size());
BeanProperty property = Iterables.get(beanProperties,2);
assertEquals("foo", property.getName());
- assertEquals("int", property.getTypeName());
+ assertEquals("int", property.getType().toString());
assertNull(property.getDocComment());
- assertNull(property.getTypeParameters());
property = Iterables.get(beanProperties,1);
assertEquals("testValue", property.getName());
- assertEquals("java.util.List<java.lang.String>", property.getTypeName());
+ assertEquals("java.util.List<java.lang.String>", property.getType().toString());
assertEquals(" Test Attribute\n", property.getDocComment());
- assertNull(property.getTypeParameters());
property = Iterables.get(beanProperties,0);
assertEquals("barValue", property.getName());
- assertEquals("java.util.List<M>", property.getTypeName());
+ assertEquals("java.util.List<M>", property.getType().toString());
assertEquals(" Bar Attribute\n", property.getDocComment());
// assertEquals("<M>" ,property.getTypeParameters());
15 years, 4 months
JBoss Rich Faces SVN: r15171 - root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-13 12:45:29 -0400 (Thu, 13 Aug 2009)
New Revision: 15171
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js
Log:
https://jira.jboss.org/jira/browse/RF-7648
Modified: root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js
===================================================================
--- root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js 2009-08-13 15:21:55 UTC (rev 15170)
+++ root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js 2009-08-13 16:45:29 UTC (rev 15171)
@@ -37,45 +37,104 @@
//
//utils.js
- richfaces.console = (function(jQuery) {
+ richfaces.log = (function(jQuery) {
+ var LOG_LEVELS = {'debug': 1, 'info': 2, 'warn': 3, 'error': 4};
+ var LOG_LEVEL_COLORS = {'debug': 'darkblue', 'info': 'blue', 'warn': 'gold', 'error': 'red'};
+ var DEFAULT_LOG_LEVEL = LOG_LEVELS['info'];
+ var currentLogLevel = DEFAULT_LOG_LEVEL;
+
+ var consoleInitialized = false;
+
+ var setLevel = function(level) {
+ currentLogLevel = LOG_LEVELS[level] || DEFAULT_LOG_LEVEL;
+ if (consoleInitialized) {
+ getConsole().find("select.rich-log-element").val(currentLogLevel);
+ }
+ clear();
+ };
+
+ var setLevelFromSelect = function(iLevel) {
+ currentLogLevel = iLevel || DEFAULT_LOG_LEVEL;
+ };
+
+ var clear = function() {
+ if (window.console && useBrowserConsole) {
+ window.console.clear();
+ } else {
+ var console = getConsole();
+ console.children().not(".rich-log-element").remove();
+ }
+ };
+
var getConsole = function() {
- var console = jQuery('#richfaces\\.console');
+ var console = jQuery('#richfaces\\.log');
if (console.length == 0) {
- console = jQuery("<div id='richfaces.console'><button>Clear</button></div>").appendTo("body");
+ console = jQuery("<div id='richfaces.log'></div>").appendTo("body");
}
- console.find("button:first").click(function() {jQuery(this).nextAll().remove();});
+
+ if (!consoleInitialized) {
+ consoleInitialized = true;
+
+ var clearBtn = console.find("button.rich-log-element");
+ if (clearBtn.length == 0) {
+ clearBtn = jQuery("<button class='rich-log-element'>Clear</button>").appendTo(console);
+ }
+ clearBtn.click(clear);
+
+ var levelSelect = console.find("select.rich-log-element");
+ if (levelSelect.length == 0) {
+ levelSelect = jQuery("<select class='rich-log-element' />").appendTo(console);
+ }
+
+ if (levelSelect.children().length == 0) {
+ for (var level in LOG_LEVELS) {
+ jQuery("<option value='" + LOG_LEVELS[level]+ "'>" + level + "</option>").appendTo(levelSelect);
+ }
+ }
+
+ levelSelect.val(currentLogLevel);
+ levelSelect.change(function(event) { clear(); setLevelFromSelect(parseInt(jQuery(this).val(), 10)); return false;});
+ }
+
return console;
};
- var LOG_LEVEL_COLORS = {'debug': 'darkblue', 'info': 'blue', 'warn': 'yellow', 'error': 'red'};
-
+ var useBrowserConsole = false;
+
var formatMessage = function(level, message) {
return level + '[' + new Date().toLocaleTimeString() + ']: ' + message;
};
- var appendLogEntry = function(level, text) {
- jQuery("<div style='color: " + LOG_LEVEL_COLORS[level] + "'></div>").appendTo(getConsole()).text(text);
+ var appendConsoleEntry = function(level, text, console) {
+ jQuery("<div style='color: " + LOG_LEVEL_COLORS[level] + "'></div>").appendTo(console).text(text);
};
- var useFirebugConsole = true;
+ var appendBrowserConsoleEntry = function(level, text) {
+ window.console[level]();
+ };
- var loggers = {};
- for (var logLevel in LOG_LEVEL_COLORS) {
- loggers[logLevel] = (function() {
- var _logLevel = logLevel;
-
- if (window.console && useFirebugConsole) {
- return function(message) {
- window.console[_logLevel](formatMessage(_logLevel, message));
- };
- } else {
- return function() {
- appendLogEntry(_logLevel, formatMessage(_logLevel, message))
- };
+ var appendMessage = function(level, message) {
+ if (window.console && useBrowserConsole) {
+ var text = formatMessage(level, message);
+ appendBrowserConsoleEntry(level, text);
+ } else {
+ var console = getConsole();
+ if (LOG_LEVELS[level] >= currentLogLevel) {
+ var text = formatMessage(level, message);
+ appendConsoleEntry(level, text, console);
}
- }());
+ }
+ };
+
+ var methods = {setLevel: setLevel, clear: clear};
+ for (var logLevel in LOG_LEVELS) {
+ var f = function(text) {
+ appendMessage(arguments.callee.logLevel, text);
+ };
+ f.logLevel = logLevel;
+ methods[logLevel] = f;
}
- return loggers;
+ return methods;
}(jQuery));
/**
@@ -121,7 +180,7 @@
value = eval(macro) ;
}
} catch (e) {
- richfaces.console.warn("Exception: " + e.message + "\n[" + macro + "]");
+ richfaces.log.warn("Exception: " + e.message + "\n[" + macro + "]");
}
}
15 years, 4 months
JBoss Rich Faces SVN: r15170 - root.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-08-13 11:21:55 -0400 (Thu, 13 Aug 2009)
New Revision: 15170
Added:
root/assembly.xml
Modified:
root/pom.xml
Log:
Richfaces assembly
Added: root/assembly.xml
===================================================================
--- root/assembly.xml (rev 0)
+++ root/assembly.xml 2009-08-13 15:21:55 UTC (rev 15170)
@@ -0,0 +1,59 @@
+<assembly>
+ <id>assembly</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <moduleSets>
+ <moduleSet>
+ <includeSubModules>true</includeSubModules>
+ <includes>
+ <include>org.richfaces.framework:richfaces-api</include>
+ <include>org.richfaces.framework:richfaces-impl</include>
+ <include>org.richfaces:ui</include>
+ </includes>
+
+ <sources>
+ <outputDirectoryMapping>dist</outputDirectoryMapping>
+ <excludeSubModuleDirectories>true</excludeSubModuleDirectories>
+ <fileSets>
+ <fileSet>
+ <directory>target</directory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ <excludes>
+ <exclude>*-sources.jar</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+ </sources>
+ </moduleSet>
+ <moduleSet>
+ <includeSubModules>true</includeSubModules>
+ <includes>
+ <include>org.richfaces.examples:photoalbum</include>
+ <include>org.richfaces.examples:richfaces-demo</include>
+ <include>org.richfaces.examples.components:core-demo</include>
+ </includes>
+
+ <sources>
+ <outputDirectoryMapping>examples</outputDirectoryMapping>
+ <excludeSubModuleDirectories>false</excludeSubModuleDirectories>
+ <fileSets>
+ <fileSet>
+ <directory>target</directory>
+ <includes>
+ <include>*.ear</include>
+ <include>*.war</include>
+ </includes>
+ <excludes>
+ <exclude>*-sources.ear</exclude>
+ <exclude>*-sources.war</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+ </sources>
+ </moduleSet>
+ </moduleSets>
+</assembly>
\ No newline at end of file
Modified: root/pom.xml
===================================================================
--- root/pom.xml 2009-08-13 14:34:51 UTC (rev 15169)
+++ root/pom.xml 2009-08-13 15:21:55 UTC (rev 15170)
@@ -1,36 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>root</artifactId>
- <version>1.0</version>
- <packaging>pom</packaging>
- <name>All modules aggregator</name>
-
- <modules>
- <module>framework/${framework.svn.dir}</module>
- <!-- module>cdk/${cdk.svn.dir}</module -->
- <module>ui/${ui.svn.dir}</module>
- <module>examples/${examples.svn.dir}</module>
- </modules>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0</version>
+ <packaging>pom</packaging>
+ <name>All modules aggregator</name>
- <profiles>
- <profile>
- <id>trunk</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <properties>
- <framework.svn.dir>trunk</framework.svn.dir>
- <cdk.svn.dir>trunk</cdk.svn.dir>
- <ui.svn.dir>trunk</ui.svn.dir>
- <examples.svn.dir>trunk</examples.svn.dir>
- </properties>
- </profile>
- </profiles>
+ <modules>
+ <module>framework/${framework.svn.dir}</module>
+ <!--<module>cdk/${cdk.svn.dir}</module>-->
+ <module>ui/${ui.svn.dir}</module>
+ <module>examples/${examples.svn.dir}</module>
+ </modules>
+ <profiles>
+ <profile>
+ <id>trunk</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <framework.svn.dir>trunk</framework.svn.dir>
+ <cdk.svn.dir>trunk</cdk.svn.dir>
+ <ui.svn.dir>trunk</ui.svn.dir>
+ <examples.svn.dir>trunk</examples.svn.dir>
+ </properties>
+ </profile>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptor>assembly.xml</descriptor>
+ </configuration>
+ <executions>
+ <execution>
+ <id>richfaces-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
15 years, 4 months
JBoss Rich Faces SVN: r15168 - in root/cdk/trunk/plugins: generator and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-13 10:27:45 -0400 (Thu, 13 Aug 2009)
New Revision: 15168
Added:
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/maven/MavenVelocityCompilationContext.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/BuildLibraryMojo.java
Modified:
root/cdk/trunk/plugins/annotations/
root/cdk/trunk/plugins/generator/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/BaseTagBodyConsumer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/BaseTemplateConsumer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/ChooseTagBodyConsumer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/StructuralTagBodyConsumer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/TemplateBodyConsumer.java
root/cdk/trunk/plugins/generator/src/main/xsd/cdk-template.xsd
root/cdk/trunk/plugins/generator/src/main/xsd/xhtml-el.xsd
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/maven/MavenCompilationContext.java
Log:
Fixed for template compiler
Mojo for template compiler
Property changes on: root/cdk/trunk/plugins/annotations
___________________________________________________________________
Name: svn:ignore
+ .classpath
.project
.settings
target
Property changes on: root/cdk/trunk/plugins/generator
___________________________________________________________________
Name: svn:ignore
- target
.settings
.project
.classpath
.clover
+ target
.settings
.project
.classpath
.clover
bin
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/BaseTagBodyConsumer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/BaseTagBodyConsumer.java 2009-08-13 13:12:36 UTC (rev 15167)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/BaseTagBodyConsumer.java 2009-08-13 14:27:45 UTC (rev 15168)
@@ -58,13 +58,16 @@
MethodBodyStatement ifStatement = createIfExpression(startElement);
statement.addToBody(ifStatement);
- return new BaseTagBodyConsumer(ifStatement);
+ return new StructuralTagBodyConsumer(ifStatement);
} else if ("choose".equals(name.getLocalPart())) {
MethodBodyStatement whenStatement = new MethodBodyStatement();
statement.addToBody(whenStatement);
return new ChooseTagBodyConsumer(whenStatement);
+ } else if ("call".equals(name.getLocalPart())) {
+ statement.addToBody(createCallExpression(startElement));
+ } else {
+ throw new IllegalArgumentException();
}
-
} else {
statement.addToBody(createStartElement(startElement));
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/BaseTemplateConsumer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/BaseTemplateConsumer.java 2009-08-13 13:12:36 UTC (rev 15167)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/BaseTemplateConsumer.java 2009-08-13 14:27:45 UTC (rev 15168)
@@ -302,4 +302,10 @@
return new MethodBodyStatement(MessageFormat.format("return {0}.class;", componentClassName));
}
+ protected MethodBodyStatement createCallExpression(StartElement startElement) {
+ Attribute expressionAttribute = startElement.getAttributeByName(new QName("expression"));
+ String expressionValue = expressionAttribute.getValue();
+ return new MethodBodyStatement(expressionValue);
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/ChooseTagBodyConsumer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/ChooseTagBodyConsumer.java 2009-08-13 13:12:36 UTC (rev 15167)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/ChooseTagBodyConsumer.java 2009-08-13 14:27:45 UTC (rev 15168)
@@ -69,7 +69,7 @@
statement.addToBody(bodyStatement);
statements.add(bodyStatement);
- return new BaseTagBodyConsumer(bodyStatement);
+ return new StructuralTagBodyConsumer(bodyStatement);
} else {
throw new IllegalArgumentException();
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/StructuralTagBodyConsumer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/StructuralTagBodyConsumer.java 2009-08-13 13:12:36 UTC (rev 15167)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/StructuralTagBodyConsumer.java 2009-08-13 14:27:45 UTC (rev 15168)
@@ -20,8 +20,6 @@
*/
package org.richfaces.builder.templates;
import javax.xml.namespace.QName;
-import javax.xml.stream.events.Characters;
-import javax.xml.stream.events.EndElement;
import javax.xml.stream.events.StartElement;
import org.richfaces.builder.model.MethodBodyStatement;
@@ -30,46 +28,20 @@
* @author Nick Belaevski
*
*/
-public class StructuralTagBodyConsumer extends BaseTemplateConsumer {
+public class StructuralTagBodyConsumer extends BaseTagBodyConsumer {
- private MethodBodyStatement statement;
-
public StructuralTagBodyConsumer(MethodBodyStatement methodBodyStatement) {
- super();
-
- this.statement = methodBodyStatement;
+ super(methodBodyStatement);
}
@Override
- public void consumeCharacters(Characters characters) {
- String trimmedText = characters.getData().trim();
-
- if (trimmedText.length() != 0) {
- statement.addToBody(createWriteText(characters));
- }
- }
-
- @Override
- public void consumeEndElement(EndElement endElement) {
- QName name = endElement.getName();
-
- if (isCdkNamespace(name) && name.getLocalPart().equals("body")) {
- throw new IllegalArgumentException();
- } else {
- statement.addToBody(createEndElement(endElement));
- }
- }
-
- @Override
public Consumer consumeStartElement(StartElement startElement) {
QName name = startElement.getName();
- if (isCdkNamespace(name) && name.getLocalPart().equals("body")) {
+ if (isCdkNamespace(name)&& name.getLocalPart().equals("body")) {
throw new IllegalArgumentException();
} else {
- statement.addToBody(createStartElement(startElement));
+ return super.consumeStartElement(startElement);
}
-
- return this;
}
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/TemplateBodyConsumer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/TemplateBodyConsumer.java 2009-08-13 13:12:36 UTC (rev 15167)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/TemplateBodyConsumer.java 2009-08-13 14:27:45 UTC (rev 15168)
@@ -7,6 +7,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.xml.namespace.QName;
+import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.Characters;
import javax.xml.stream.events.EndElement;
import javax.xml.stream.events.StartElement;
@@ -116,6 +117,8 @@
MethodBodyStatement chooseStatement = new MethodBodyStatement();
statements.add(chooseStatement);
return new ChooseTagBodyConsumer(chooseStatement);
+ } else if ("call".equals(name.getLocalPart())) {
+ statements.add(createCallExpression(startElement));
}
} else {
statements.add(createStartElement(startElement));
Modified: root/cdk/trunk/plugins/generator/src/main/xsd/cdk-template.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/xsd/cdk-template.xsd 2009-08-13 13:12:36 UTC (rev 15167)
+++ root/cdk/trunk/plugins/generator/src/main/xsd/cdk-template.xsd 2009-08-13 14:27:45 UTC (rev 15168)
@@ -50,6 +50,7 @@
</xs:element>
<xs:element ref="if" />
<xs:element ref="choose" />
+ <xs:element ref="call" />
</xs:choice>
</xs:group>
@@ -87,4 +88,9 @@
</xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:element name="call">
+ <xs:complexType>
+ <xs:attribute name="expression" form="unqualified" />
+ </xs:complexType>
+ </xs:element>
</xs:schema>
Modified: root/cdk/trunk/plugins/generator/src/main/xsd/xhtml-el.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/xsd/xhtml-el.xsd 2009-08-13 13:12:36 UTC (rev 15167)
+++ root/cdk/trunk/plugins/generator/src/main/xsd/xhtml-el.xsd 2009-08-13 14:27:45 UTC (rev 15168)
@@ -2694,6 +2694,7 @@
</xs:group>
<xs:complexType name="area.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="attrs"></xs:attributeGroup>
<xs:attributeGroup ref="focus"></xs:attributeGroup>
<xs:attribute default="rect" name="shape" type="Shape"></xs:attribute>
@@ -2718,12 +2719,14 @@
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="base.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attribute name="href" type="URI"></xs:attribute>
<xs:attribute name="target" type="FrameTarget"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="basefont.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attribute name="id" type="ID" />
<xs:attribute use="required" name="size" type="xs:anySimpleType" />
<xs:attribute name="color" type="Color" />
@@ -2731,6 +2734,7 @@
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="br.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="coreattrs"></xs:attributeGroup>
<xs:attribute default="none" name="clear">
<xs:simpleType>
@@ -2752,6 +2756,7 @@
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="col.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="attrs"></xs:attributeGroup>
<xs:attribute default="1" name="span" type="Number"></xs:attribute>
<xs:attribute name="width" type="MultiLength"></xs:attribute>
@@ -2911,6 +2916,7 @@
</xs:sequence>
</xs:group>
<xs:complexType name="img.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="attrs"></xs:attributeGroup>
<xs:attribute use="required" name="src" type="URI"></xs:attribute>
<xs:attribute use="required" name="alt" type="Text"></xs:attribute>
@@ -2942,6 +2948,7 @@
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="input.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="attrs"></xs:attributeGroup>
<xs:attributeGroup ref="focus"></xs:attributeGroup>
<xs:attribute default="text" name="type" type="InputType"></xs:attribute>
@@ -2964,12 +2971,14 @@
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="isindex.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="coreattrs"></xs:attributeGroup>
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attribute name="prompt" type="Text"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="link.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="attrs"></xs:attributeGroup>
<xs:attribute name="charset" type="Charset"></xs:attribute>
<xs:attribute name="href" type="URI"></xs:attribute>
@@ -3027,6 +3036,7 @@
</xs:group>
<xs:complexType name="meta.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attribute name="http-equiv" type="xs:anySimpleType"></xs:attribute>
@@ -3124,6 +3134,7 @@
</xs:group>
<xs:complexType name="option.content" mixed="true">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="attrs"></xs:attributeGroup>
<xs:attribute name="selected">
<xs:simpleType>
@@ -3145,6 +3156,7 @@
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="param.content">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attribute use="required" name="name" type="xs:anySimpleType">
</xs:attribute>
@@ -3230,6 +3242,7 @@
</xs:group>
<xs:complexType name="style.content" mixed="true">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attribute use="required" name="type" type="ContentType"></xs:attribute>
@@ -3332,6 +3345,7 @@
</xs:choice>
</xs:group>
<xs:complexType name="title.content" mixed="true">
+ <xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/maven/MavenCompilationContext.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/maven/MavenCompilationContext.java 2009-08-13 13:12:36 UTC (rev 15167)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/maven/MavenCompilationContext.java 2009-08-13 14:27:45 UTC (rev 15168)
@@ -21,12 +21,7 @@
package org.richfaces.builder.maven;
-import org.apache.velocity.Template;
-import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.exception.ParseErrorException;
-import org.apache.velocity.exception.ResourceNotFoundException;
import org.richfaces.cdk.AbstractCdkContext;
-import org.richfaces.cdk.CdkException;
/**
* @author shura
@@ -35,16 +30,14 @@
public class MavenCompilationContext extends AbstractCdkContext {
private MavenLogger logger;
- private VelocityEngine engine;
/**
* @param logger
* @throws CompilationException
*/
- public MavenCompilationContext(MavenLogger logger,ClassLoader loader,VelocityEngine engine) {
+ public MavenCompilationContext(MavenLogger logger, ClassLoader loader) {
super(loader);
this.logger = logger;
- this.engine = engine;
}
/* (non-Javadoc)
@@ -103,20 +96,4 @@
logger.warn(content, error);
}
-
- /* (non-Javadoc)
- * @see org.richfaces.templatecompiler.builder.CompilationContext#getTemplate(java.lang.String)
- */
- public Template getTemplate(String name) throws CdkException {
- try {
- return engine.getTemplate(name);
- } catch (ResourceNotFoundException e) {
- throw new CdkException(e.getLocalizedMessage());
- } catch (ParseErrorException e) {
- throw new CdkException(e.getLocalizedMessage());
- } catch (Exception e) {
- throw new CdkException(e.getLocalizedMessage());
- }
- }
-
}
Added: root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/maven/MavenVelocityCompilationContext.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/maven/MavenVelocityCompilationContext.java (rev 0)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/maven/MavenVelocityCompilationContext.java 2009-08-13 14:27:45 UTC (rev 15168)
@@ -0,0 +1,58 @@
+/**
+ * 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.builder.maven;
+
+import org.apache.velocity.Template;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
+import org.richfaces.cdk.CdkException;
+
+/**
+ * @author shura
+ *
+ */
+public class MavenVelocityCompilationContext extends MavenCompilationContext {
+
+ private VelocityEngine engine;
+
+ public MavenVelocityCompilationContext(MavenLogger logger,ClassLoader loader,VelocityEngine engine) {
+ super(logger, loader);
+ this.engine = engine;
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.templatecompiler.builder.CompilationContext#getTemplate(java.lang.String)
+ */
+ public Template getTemplate(String name) throws CdkException {
+ try {
+ return engine.getTemplate(name);
+ } catch (ResourceNotFoundException e) {
+ throw new CdkException(e.getLocalizedMessage());
+ } catch (ParseErrorException e) {
+ throw new CdkException(e.getLocalizedMessage());
+ } catch (Exception e) {
+ throw new CdkException(e.getLocalizedMessage());
+ }
+ }
+
+}
Added: root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/BuildLibraryMojo.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/BuildLibraryMojo.java (rev 0)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/BuildLibraryMojo.java 2009-08-13 14:27:45 UTC (rev 15168)
@@ -0,0 +1,145 @@
+/**
+ * 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.builder.mojo;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.PrintWriter;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.richfaces.builder.model.JavaClass;
+import org.richfaces.builder.render.JavaClassRenderer;
+import org.richfaces.builder.templates.TemplateReader;
+
+/**
+ * @author Nick Belaevski
+ * @goal build
+ */
+public class BuildLibraryMojo extends AbstractCDKMojo {
+
+ /**
+ * templatesDirectory
+ * @parameter expression="${basedir}/src/main/templates"
+ */
+ private File templatesDirectory;
+
+ /**
+ * sourceFileIncludes
+ * @parameter
+ */
+ private String[] templateFileIncludes = {"**/*.template.xml"};
+
+ /**
+ * sourceFileExcludes
+ * @parameter
+ */
+ private String[] templatesFileExcludes = null;
+
+ /**
+ * @param templatesDirectory the templatesDirectory to set
+ */
+ public void setTemplatesDirectory(File templatesDirectory) {
+ this.templatesDirectory = templatesDirectory;
+ }
+
+ /**
+ * @param templateFileIncludes the templateFileIncludes to set
+ */
+ public void setTemplateFileIncludes(String[] templateFileIncludes) {
+ this.templateFileIncludes = templateFileIncludes;
+ }
+
+ /**
+ * @param templatesFileExcludes the templatesFileExcludes to set
+ */
+ public void setTemplatesFileExcludes(String[] templatesFileExcludes) {
+ this.templatesFileExcludes = templatesFileExcludes;
+ }
+
+ private String[] doScan(String[] includes, String[] excludes, File rootFolder)
+ throws MojoExecutionException {
+ try {
+ DirectoryScanner directoryScanner = new DirectoryScanner();
+ directoryScanner.setFollowSymlinks(true);
+ directoryScanner.setBasedir(rootFolder);
+ directoryScanner.setExcludes(excludes);
+ directoryScanner.setIncludes(includes);
+ directoryScanner.addDefaultExcludes();
+
+ directoryScanner.scan();
+
+ return directoryScanner.getIncludedFiles();
+ } catch (IllegalStateException e) {
+ throw new MojoExecutionException(
+ "Error scanning source root: \'" + rootFolder + "\'", e );
+ }
+ }
+
+ private Iterable<File> findTemplateFiles() throws MojoExecutionException {
+ Set<File> sourceFiles = new HashSet<File>();
+ if (templatesDirectory.exists() && templatesDirectory.isDirectory()) {
+ for (String fileName : doScan(templateFileIncludes, templatesFileExcludes, templatesDirectory)) {
+ sourceFiles.add(new File(templatesDirectory, fileName));
+ }
+ }
+
+ return sourceFiles;
+ }
+
+ protected void compileTemplates() throws MojoExecutionException, MojoFailureException {
+ try {
+ Iterable<File> templates = findTemplateFiles();
+ for (File file : templates) {
+ JavaClass javaClass = TemplateReader.parse(new FileInputStream(file));
+
+ String fullName = javaClass.getFullName();
+
+ File outFile = new File(outputJavaDirectory,
+ fullName.replace('.', '/') + ".java");
+
+ if (outFile.exists()) {
+ outFile.delete();
+ }
+
+ outFile.getParentFile().mkdirs();
+
+ new JavaClassRenderer().render(javaClass, new PrintWriter(outFile));
+ }
+ } catch (Exception e) {
+ throw new MojoExecutionException(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ outputJavaDirectory.mkdirs();
+ outputResourcesDirectory.mkdirs();
+ outputTestsDirectory.mkdirs();
+
+ compileTemplates();
+ }
+
+}
15 years, 4 months
JBoss Rich Faces SVN: r15167 - root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-13 09:12:36 -0400 (Thu, 13 Aug 2009)
New Revision: 15167
Modified:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
Log:
initial
Modified: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2009-08-13 12:53:44 UTC (rev 15166)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2009-08-13 13:12:36 UTC (rev 15167)
@@ -1,344 +1,8 @@
package org.ajax4jsf.component.behavior;
-import java.util.Set;
+import javax.faces.component.behavior.ClientBehaviorBase;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.component.behavior.ClientBehavior;
-import javax.faces.component.behavior.ClientBehaviorContext;
-import javax.faces.component.behavior.ClientBehaviorHint;
-import javax.faces.context.FacesContext;
-import javax.faces.event.BehaviorEvent;
+public class AjaxBehavior extends ClientBehaviorBase {
-import org.ajax4jsf.Messages;
-import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.component.AjaxSupport;
-import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.richfaces.util.RichfacesLogger;
-import org.slf4j.Logger;
-
-public class AjaxBehavior extends AjaxActionComponent implements ClientBehavior, AjaxSupport {
-
- // ~ Static fields/initializers
- // ---------------------------------------------
-
- public static final String COMPONENT_TYPE = "org.ajax4jsf.Support";
- public static final String COMPONENT_FAMILY = "org.ajax4jsf.AjaxSupport";
- public static final String DEFAULT_RENDERER_TYPE = "org.ajax4jsf.components.AjaxSupportRenderer";
- public static final String AJAX_SUPPORT_SET = "com.exadel.components.ajax.support.";
- private static final Logger logger = RichfacesLogger.RENDERKIT.getLogger(); // may be another
-
- @Override
- public void setValueExpression(String name, ValueExpression binding) {
- // var - not allowed name. must be literal.
- if ("var".equals(name)) {
- throw new FacesException(Messages.getMessage(
- Messages.VAR_MUST_BE_LITERAL,
- getClientId(getFacesContext())));
- }
- if ("event".equals(name)) {
- throw new FacesException(Messages.getMessage(
- Messages.EVENT_MUST_BE_LITERAL,
- getClientId(getFacesContext())));
- }
- super.setValueExpression(name, binding);
- }
-
- /**
- * Create Special <code>ValueBinding</code> for build JavaScrept event
- * code in parent component from this.
- *
- * @return <code>EventValueBinding</code> based on properties of current
- * component
- */
- private ValueExpression getEventValueBinding() {
- if (logger.isDebugEnabled()) {
- logger.debug(Messages.getMessage(Messages.CREATE_JAVASCRIPT_EVENT,
- getId()));
- }
-
-// return new EventValueExpression(this);
- return null; //stub!!!
- }
-
- /**
- * @return JavaScript eventString. Rebuild on every call, since can be in
- * loop ( as in dataTable ) with different parameters.
- */
- public String getEventString() {
- StringBuffer buildOnEvent = new StringBuffer();
- String onsubmit = getOnsubmit();
- // Insert script to call before submit ajax request.
- if (null != onsubmit) {
- buildOnEvent.append(onsubmit).append(";");
- }
- buildOnEvent.append(AjaxRendererUtils.buildOnEvent(this,
- getFacesContext(), getEvent(), true));
- String script = buildOnEvent.toString();
- return script;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.component.UIComponentBase#decode(javax.faces.context.FacesContext)
- */
- public void decode(FacesContext context) {
- // Due to JSF RI 1.1 bug, clear cached clientId
- setId(getId());
- super.decode(context);
- }
-
- /**
- * After nornal setting <code>parent</code> property in case of created
- * component set Ajax properties for parent.
- *
- * @see javax.faces.component.UIComponentBase#setParent(javax.faces.component.UIComponent)
- */
- public void setParent(UIComponent parent) {
- super.setParent(parent);
- if (null != parent && parent.getFamily() != null) {
- if (logger.isDebugEnabled()) {
- logger.debug(Messages.getMessage(Messages.CALLED_SET_PARENT,
- parent.getClass().getName()));
- }
- // TODO If this comopnent configured, set properties for parent
- // component.
- // NEW created component have parent, restored view - null in My
- // faces.
- // and SUN RI not call at restore saved view.
- // In other case - set in restoreState method.
- // if (parent.getParent() != null)
- {
- if (logger.isDebugEnabled()) {
- logger.debug(Messages
- .getMessage(Messages.DETECT_NEW_COMPONENT));
- }
- setParentProperties(parent);
-
- }
- }
- }
-
- public void setParentProperties(UIComponent parent) {
- ValueExpression valueBinding;
- if (null != getEvent()) {
- if (logger.isDebugEnabled()) {
- logger.debug(Messages.getMessage(
- Messages.SET_VALUE_BINDING_FOR_EVENT, getEvent()));
- }
- // for non action/data components, or for non-default events - build
- // listener for this instance.
- valueBinding = getEventValueBinding();
- parent.setValueExpression(getEvent(), valueBinding);
-
- }
- }
-
- protected UIComponent getSingleComponent() {
- return getParent();
- }
-
- public void decode(FacesContext context, UIComponent component) {
- // TODO Auto-generated method stub
-
- }
-
- public Set<ClientBehaviorHint> getHints() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getScript(ClientBehaviorContext behaviorContext) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void broadcast(BehaviorEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- public Object getData() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getEventsQueue() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getFocus() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getOnbeforedomupdate() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getOncomplete() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object getProcess() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object getReRender() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public int getRequestDelay() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String getSimilarityGroupingId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getStatus() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public int getTimeout() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public boolean isAjaxSingle() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isBypassUpdates() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isIgnoreDupResponses() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isLimitToList() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setAjaxSingle(boolean single) {
- // TODO Auto-generated method stub
-
- }
-
- public void setBypassUpdates(boolean bypass) {
- // TODO Auto-generated method stub
-
- }
-
- public void setData(Object data) {
- // TODO Auto-generated method stub
-
- }
-
- public void setEventsQueue(String newvalue) {
- // TODO Auto-generated method stub
-
- }
-
- public void setFocus(String focus) {
- // TODO Auto-generated method stub
-
- }
-
- public void setIgnoreDupResponses(boolean newvalue) {
- // TODO Auto-generated method stub
-
- }
-
- public void setLimitToList(boolean submitForm) {
- // TODO Auto-generated method stub
-
- }
-
- public void setOnbeforedomupdate(String beforeUpdate) {
- // TODO Auto-generated method stub
-
- }
-
- public void setOncomplete(String oncomplete) {
- // TODO Auto-generated method stub
-
- }
-
- public void setProcess(Object targetId) {
- // TODO Auto-generated method stub
-
- }
-
- public void setReRender(Object targetId) {
- // TODO Auto-generated method stub
-
- }
-
- public void setRequestDelay(int newvalue) {
- // TODO Auto-generated method stub
-
- }
-
- public void setSimilarityGroupingId(String similarityGroupingId) {
- // TODO Auto-generated method stub
-
- }
-
- public void setStatus(String status) {
- // TODO Auto-generated method stub
-
- }
-
- public void setTimeout(int timeout) {
- // TODO Auto-generated method stub
-
- }
-
- public String getEvent() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getOnsubmit() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isDisableDefault() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setDisableDefault(boolean newvalue) {
- // TODO Auto-generated method stub
-
- }
-
- public void setEvent(String event) {
- // TODO Auto-generated method stub
-
- }
-
- public void setOnsubmit(String newOnsubmit) {
- // TODO Auto-generated method stub
-
- }
-
}
15 years, 4 months
JBoss Rich Faces SVN: r15166 - root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-13 08:53:44 -0400 (Thu, 13 Aug 2009)
New Revision: 15166
Modified:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
Log:
Modified: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2009-08-13 12:38:00 UTC (rev 15165)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2009-08-13 12:53:44 UTC (rev 15166)
@@ -1,13 +1,10 @@
package org.ajax4jsf.component.behavior;
-import java.io.Serializable;
import java.util.Set;
-import javax.el.ELContext;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
import javax.faces.component.behavior.ClientBehavior;
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.component.behavior.ClientBehaviorHint;
@@ -15,340 +12,333 @@
import javax.faces.event.BehaviorEvent;
import org.ajax4jsf.Messages;
-import org.ajax4jsf.component.AjaxContainer;
+import org.ajax4jsf.component.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxSupport;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.ajax4jsf.renderkit.RendererUtils;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
-public class AjaxBehavior extends UIComponentBase implements ClientBehavior {
+public class AjaxBehavior extends AjaxActionComponent implements ClientBehavior, AjaxSupport {
- private static final String COMPONENT_FAMILY = "javax.faces.Output";
- public static final String COMPONENT_TYPE = "org.ajax4jsf.AjaxStatus";
+ // ~ Static fields/initializers
+ // ---------------------------------------------
+
+ public static final String COMPONENT_TYPE = "org.ajax4jsf.Support";
+ public static final String COMPONENT_FAMILY = "org.ajax4jsf.AjaxSupport";
+ public static final String DEFAULT_RENDERER_TYPE = "org.ajax4jsf.components.AjaxSupportRenderer";
+ public static final String AJAX_SUPPORT_SET = "com.exadel.components.ajax.support.";
-
+ private static final Logger logger = RichfacesLogger.RENDERKIT.getLogger(); // may be another
+
@Override
- public String getFamily() {
- return COMPONENT_FAMILY;
+ public void setValueExpression(String name, ValueExpression binding) {
+ // var - not allowed name. must be literal.
+ if ("var".equals(name)) {
+ throw new FacesException(Messages.getMessage(
+ Messages.VAR_MUST_BE_LITERAL,
+ getClientId(getFacesContext())));
+ }
+ if ("event".equals(name)) {
+ throw new FacesException(Messages.getMessage(
+ Messages.EVENT_MUST_BE_LITERAL,
+ getClientId(getFacesContext())));
+ }
+ super.setValueExpression(name, binding);
}
/**
- * id of form for wich status will displayed
- *
- */
- private String _for;
-
+ * Create Special <code>ValueBinding</code> for build JavaScrept event
+ * code in parent component from this.
+ *
+ * @return <code>EventValueBinding</code> based on properties of current
+ * component
+ */
+ private ValueExpression getEventValueBinding() {
+ if (logger.isDebugEnabled()) {
+ logger.debug(Messages.getMessage(Messages.CREATE_JAVASCRIPT_EVENT,
+ getId()));
+ }
+
+// return new EventValueExpression(this);
+ return null; //stub!!!
+ }
+
/**
- * @param new value of id of form for wich status will displayed to set
- *
- */
- public void setFor(String _for) {
- this._for = _for;
- }
+ * @return JavaScript eventString. Rebuild on every call, since can be in
+ * loop ( as in dataTable ) with different parameters.
+ */
+ public String getEventString() {
+ StringBuffer buildOnEvent = new StringBuffer();
+ String onsubmit = getOnsubmit();
+ // Insert script to call before submit ajax request.
+ if (null != onsubmit) {
+ buildOnEvent.append(onsubmit).append(";");
+ }
+ buildOnEvent.append(AjaxRendererUtils.buildOnEvent(this,
+ getFacesContext(), getEvent(), true));
+ String script = buildOnEvent.toString();
+ return script;
+ }
- /**
- * @return value or result of valueBinding of id of form for wich status will displayed
- *
- */
- public String getFor()
- {
- return (String) getValueOrBinding(_for, "for");
- }
-
- /**
- * Text to output on start request
- */
- private String _startText = null;
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.component.UIComponentBase#decode(javax.faces.context.FacesContext)
+ */
+ public void decode(FacesContext context) {
+ // Due to JSF RI 1.1 bug, clear cached clientId
+ setId(getId());
+ super.decode(context);
+ }
- /**
- * setter method for property
- * @param new value of Text to output on start request to set
- */
- public void setStartText(String startText) {
- this._startText = startText;
- }
+ /**
+ * After nornal setting <code>parent</code> property in case of created
+ * component set Ajax properties for parent.
+ *
+ * @see javax.faces.component.UIComponentBase#setParent(javax.faces.component.UIComponent)
+ */
+ public void setParent(UIComponent parent) {
+ super.setParent(parent);
+ if (null != parent && parent.getFamily() != null) {
+ if (logger.isDebugEnabled()) {
+ logger.debug(Messages.getMessage(Messages.CALLED_SET_PARENT,
+ parent.getClass().getName()));
+ }
+ // TODO If this comopnent configured, set properties for parent
+ // component.
+ // NEW created component have parent, restored view - null in My
+ // faces.
+ // and SUN RI not call at restore saved view.
+ // In other case - set in restoreState method.
+ // if (parent.getParent() != null)
+ {
+ if (logger.isDebugEnabled()) {
+ logger.debug(Messages
+ .getMessage(Messages.DETECT_NEW_COMPONENT));
+ }
+ setParentProperties(parent);
- /**
- * @return value or result of valueBinding of Text to output on start request
- */
- public String getStartText() {
- return (String) getValueOrBinding(_startText, "startText");
- }
-
- /**
- * Text to display on complete request
- */
- private String _stopText = null;
+ }
+ }
+ }
- /**
- * setter method for property
- * @param new value of Text to display on complete request to set
- */
- public void setStopText(String stopText) {
- this._stopText = stopText;
- }
+ public void setParentProperties(UIComponent parent) {
+ ValueExpression valueBinding;
+ if (null != getEvent()) {
+ if (logger.isDebugEnabled()) {
+ logger.debug(Messages.getMessage(
+ Messages.SET_VALUE_BINDING_FOR_EVENT, getEvent()));
+ }
+ // for non action/data components, or for non-default events - build
+ // listener for this instance.
+ valueBinding = getEventValueBinding();
+ parent.setValueExpression(getEvent(), valueBinding);
- /**
- * @return value or result of valueBinding of Text to display on complete request
- */
- public String getStopText() {
- return (String) getValueOrBinding(_stopText, "stopText");
- }
-
- /**
- * Style for display on start request
- */
- private String _startStyle = null;
+ }
+ }
- /**
- * setter method for property
- * @param new value of Style for display on start request to set
- */
- public void setStartStyle(String startStyle) {
- this._startStyle = startStyle;
- }
+ protected UIComponent getSingleComponent() {
+ return getParent();
+ }
- /**
- * @return value or result of valueBinding of Style for display on start request
- */
- public String getStartStyle() {
- return (String) getValueOrBinding(_startStyle, "startStyle");
- }
- /**
- * Style for displaying on complete
- */
- private String _stopStyle = null;
+ public void decode(FacesContext context, UIComponent component) {
+ // TODO Auto-generated method stub
+
+ }
- /**
- * setter method for property
- * @param new value of Style for displaying on complete to set
- */
- public void setStopStyle(String stopStyle) {
- this._stopStyle = stopStyle;
- }
+ public Set<ClientBehaviorHint> getHints() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * @return value or result of valueBinding of Style for displaying on complete
- */
- public String getStopStyle() {
- return (String) getValueOrBinding(_stopStyle, "stopStyle");
- }
- /**
- * Style class for display on request
- */
- private String _startStyleClass = null;
+ public String getScript(ClientBehaviorContext behaviorContext) {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * setter method for property
- * @param new value of Style class for display on request to set
- */
- public void setStartStyleClass(String startStyleClass) {
- this._startStyleClass = startStyleClass;
- }
+ public void broadcast(BehaviorEvent event) {
+ // TODO Auto-generated method stub
+
+ }
- /**
- * @return value or result of valueBinding of Style class for display on request
- */
- public String getStartStyleClass() {
- return (String) getValueOrBinding(_startStyleClass, "startStyleClass");
- }
- /**
- * Style class for display on complete request
- */
- private String _stopStyleClass = null;
+ public Object getData() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * setter method for property
- * @param new value of Style class for display on complete request to set
- */
- public void setStopStyleClass(String stopStyleClass) {
- this._stopStyleClass = stopStyleClass;
- }
-
- /**
- * @return value or result of valueBinding of Style class for display on complete request
- */
- public String getStopStyleClass() {
- return (String) getValueOrBinding(_stopStyleClass, "stopStyleClass");
- }
+ public String getEventsQueue() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * Force id to render in Html as is
- */
- private boolean _forceId = false;
- private boolean _forceIdSet = false;
+ public String getFocus() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * setter method for property
- * @param new value of Force id to render in Html as is to set
- */
- public void setForceId(boolean forceId) {
- this._forceId = forceId;
- this._forceIdSet = true;
- }
+ public String getOnbeforedomupdate() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * @return value or result of valueBinding of Force id to render in Html as is
- */
- public boolean isForceId() {
- return isValueOrBinding(_forceId, _forceIdSet, "forceId");
- }
-
-
-
-
- private String _clientId = null;
+ public String getOncomplete() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /* (non-Javadoc)
- * @see javax.faces.component.UIComponentBase#getClientId(javax.faces.context.FacesContext)
- */
- public String getClientId(FacesContext context) {
- if (null == _clientId) {
- String forValue = getFor();
- UIComponent container;
- if (null != forValue) {
- container = RendererUtils.getInstance().findComponentFor(this, forValue);
- // 'for' attribute must be pointed to real container in view tree
- if (null == container || !(container instanceof AjaxContainer)) {
- throw new FacesException(
- Messages.getMessage(Messages.FOR_TARGETS_NO_AJAX_CONTAINER, getId()));
- }
- _clientId = container.getClientId(context) + ":status";
+ public Object getProcess() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- } else if (isForceId()) {
- _clientId = getRenderer(context).convertClientId(context,
- this.getId());
- } else if (null !=(container = (UIComponent) AjaxRendererUtils.findAjaxContainer(context,this))) {
- _clientId = container.getClientId(context) + ":status";
- } else {
- _clientId = super.getClientId(context);
- }
- }
- return _clientId;
+ public Object getReRender() {
+ // TODO Auto-generated method stub
+ return null;
}
-
- /* (non-Javadoc)
- * reset clientId for calculate
- * @see javax.faces.component.UIComponentBase#setId(java.lang.String)
- */
- public void setId(String arg0) {
- super.setId(arg0);
- _clientId = null;
+ public int getRequestDelay() {
+ // TODO Auto-generated method stub
+ return 0;
}
- /* (non-Javadoc)
- * @see javax.faces.component.UIComponentBase#restoreState(javax.faces.context.FacesContext, java.lang.Object)
- */
- public void restoreState(FacesContext context, Object state)
- {
- State myState = (State) state;
- _for = myState._for;
- _startText = myState._startText;
- _stopText = myState._stopText;
- _startStyle = myState._startStyle;
- _stopStyle = myState._stopStyle;
- _startStyleClass = myState._startStyleClass;
- _stopStyleClass = myState._stopStyleClass;
- _forceId = myState._forceId;
- _forceIdSet = myState._forceIdSet;
- super.restoreState(context, myState.superState);
- }
+ public String getSimilarityGroupingId() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /* (non-Javadoc)
- * @see javax.faces.component.UIComponentBase#saveState(javax.faces.context.FacesContext)
- */
- public Object saveState(FacesContext context)
- {
- State state = new State();
- state._for = _for;
- state._startText = _startText;
- state._stopText = _stopText;
- state._startStyle = _startStyle;
- state._stopStyle = _stopStyle;
- state._startStyleClass = _startStyleClass;
- state._stopStyleClass = _stopStyleClass;
- state._forceId = _forceId;
- state._forceIdSet = _forceIdSet;
- state.superState = super.saveState(context);
- return state;
- }
-
- /**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:25 $
- * Memento pattern state class for save-restore component.
- */
- public static class State implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = 317266574102385358L;
- Object superState;
- String _for;
- String _startText;
- String _stopText;
- String _startStyle;
- String _stopStyle;
- String _startStyleClass;
- String _stopStyleClass;
- boolean _forceIdSet;
- boolean _forceId;
- }
-
- /**
- * @param field - value of field to get.
- * @param name - name of field, to get from ValueBinding
- * @return boolean value, based on field or valuebinding.
- */
- private boolean isValueOrBinding(boolean field, boolean fieldSet, String name){
- if( fieldSet ){
- return field;
- }
- ValueExpression vb = getValueExpression(name);
- if (null != vb) {
- return ((Boolean)vb.getValue(getELContext())).booleanValue();
- } else {
- return false;
- }
+ public String getStatus() {
+ // TODO Auto-generated method stub
+ return null;
+ }
- }
-
- public void decode(FacesContext context, UIComponent component) {
- //TODO should be implemented soon
- }
+ public int getTimeout() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
- public Set<ClientBehaviorHint> getHints() {
- //TODO should be implemented soon
- return null;
- }
+ public boolean isAjaxSingle() {
+ // TODO Auto-generated method stub
+ return false;
+ }
- public String getScript(ClientBehaviorContext behaviorContext) {
- //TODO should be implemented soon
- return null;
- }
+ public boolean isBypassUpdates() {
+ // TODO Auto-generated method stub
+ return false;
+ }
- public void broadcast(BehaviorEvent event) {
- //TODO should be implemented soon
- }
-
- /**
- * @param field - value of field to get.
- * @param name - name of field, to get from ValueBinding
- * @return field or value of binding expression.
- */
- private Object getValueOrBinding(Object field, String name){
- if( null != field){
- return field;
- }
- ValueExpression ve = getValueExpression(name);
- if (null != ve) {
- return ve.getValue(getELContext());
- } else {
- return null;
- }
- }
-
- private ELContext getELContext() {
- return getFacesContext().getELContext();
- }
+ public boolean isIgnoreDupResponses() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+ public boolean isLimitToList() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setAjaxSingle(boolean single) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setBypassUpdates(boolean bypass) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setData(Object data) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setEventsQueue(String newvalue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setFocus(String focus) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setIgnoreDupResponses(boolean newvalue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setLimitToList(boolean submitForm) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setOnbeforedomupdate(String beforeUpdate) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setOncomplete(String oncomplete) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setProcess(Object targetId) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setReRender(Object targetId) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setRequestDelay(int newvalue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSimilarityGroupingId(String similarityGroupingId) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setStatus(String status) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setTimeout(int timeout) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getEvent() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getOnsubmit() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isDisableDefault() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setDisableDefault(boolean newvalue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setEvent(String event) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setOnsubmit(String newOnsubmit) {
+ // TODO Auto-generated method stub
+
+ }
+
}
15 years, 4 months