JBoss Rich Faces SVN: r14603 - branches/community/3.3.X/test-applications/jsp/src/main/java/dataScroller.
by richfaces-svn-commits@lists.jboss.org
Author: Vadim Mikovoz
Date: 2009-06-12 07:36:13 -0400 (Fri, 12 Jun 2009)
New Revision: 14603
Modified:
branches/community/3.3.X/test-applications/jsp/src/main/java/dataScroller/DataScroller.java
Log:
Modified: branches/community/3.3.X/test-applications/jsp/src/main/java/dataScroller/DataScroller.java
===================================================================
--- branches/community/3.3.X/test-applications/jsp/src/main/java/dataScroller/DataScroller.java 2009-06-12 11:16:36 UTC (rev 14602)
+++ branches/community/3.3.X/test-applications/jsp/src/main/java/dataScroller/DataScroller.java 2009-06-12 11:36:13 UTC (rev 14603)
@@ -28,7 +28,7 @@
private boolean ajaxSingle = false;
private String boundaryControls = "auto";
private HtmlDatascroller htmlDatascroller= null;
- private String fastStep = "0";
+ private String fastStep = "2";
private int page = 2;
private Object value = null;
private String stepControls = "auto";
15 years, 7 months
JBoss Rich Faces SVN: r14602 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-06-12 07:16:36 -0400 (Fri, 12 Jun 2009)
New Revision: 14602
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.xml
Log:
RF-7340: a4j:support component description review
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.xml 2009-06-12 09:44:00 UTC (rev 14601)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.xml 2009-06-12 11:16:36 UTC (rev 14602)
@@ -163,7 +163,7 @@
<itemizedlist>
<listitem>
<para>
- <emphasis role="bold">imitation of requests frequency and updates quantity after the responses</emphasis>
+ <emphasis role="bold">limitation of requests frequency and updates quantity after the responses</emphasis>
</para>
<para>
15 years, 7 months
JBoss Rich Faces SVN: r14601 - branches/community/3.3.X/ui/togglePanel/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-06-12 05:44:00 -0400 (Fri, 12 Jun 2009)
New Revision: 14601
Modified:
branches/community/3.3.X/ui/togglePanel/src/test/java/org/richfaces/component/TogglePanelComponentTest.java
Log:
test fixed
Modified: branches/community/3.3.X/ui/togglePanel/src/test/java/org/richfaces/component/TogglePanelComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/togglePanel/src/test/java/org/richfaces/component/TogglePanelComponentTest.java 2009-06-12 00:24:32 UTC (rev 14600)
+++ branches/community/3.3.X/ui/togglePanel/src/test/java/org/richfaces/component/TogglePanelComponentTest.java 2009-06-12 09:44:00 UTC (rev 14601)
@@ -148,7 +148,7 @@
HtmlElement div = page.getHtmlElementById(togglePanel
.getClientId(facesContext));
String classAttr0 = div.getAttributeValue("class");
- assertTrue(classAttr0.contains("rich-tglctrl"));
+ assertTrue(classAttr0.contains("rich-toggle-panel"));
assertNotNull(div);
assertEquals("div", div.getNodeName());
15 years, 7 months
JBoss Rich Faces SVN: r14600 - in branches/jsf2.0/cdk/generator: src/main/java/org/ajax4jsf/builder and 13 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-06-11 20:24:32 -0400 (Thu, 11 Jun 2009)
New Revision: 14600
Added:
branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/
branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java
branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java
branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java
branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java
branches/jsf2.0/cdk/generator/src/test/resources/
branches/jsf2.0/cdk/generator/src/test/resources/org/
branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/
branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/
branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/
branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java
branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java
branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java
branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html
Removed:
branches/jsf2.0/cdk/generator/src/main/java/org/ajax4jsf/builder/component/
branches/jsf2.0/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/html/
branches/jsf2.0/cdk/generator/src/test/java/org/ajax4jsf/builder/
branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/AppTest.java
Modified:
branches/jsf2.0/cdk/generator/pom.xml
Log:
Import APT classes from research project
Modified: branches/jsf2.0/cdk/generator/pom.xml
===================================================================
--- branches/jsf2.0/cdk/generator/pom.xml 2009-06-11 17:48:45 UTC (rev 14599)
+++ branches/jsf2.0/cdk/generator/pom.xml 2009-06-12 00:24:32 UTC (rev 14600)
@@ -18,8 +18,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
<plugin>
@@ -85,5 +85,15 @@
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
</dependency>
+ <dependency>
+ <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ <version>1.0-rc2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.w3c.css</groupId>
+ <artifactId>sac</artifactId>
+ <version>1.3</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -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.apt;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class AptException extends Exception {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ private static final long serialVersionUID = 8023042422371321042L;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ public AptException() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ */
+ public AptException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param cause
+ */
+ public AptException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ * @param cause
+ */
+ public AptException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,95 @@
+/*
+ * $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.apt;
+
+import java.io.File;
+import java.util.Collection;
+
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+
+/**
+ * <p class="changed_added_4_0">That class compiles files from sources and process annotations</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class CdkCompiler {
+
+ private File outputDirectory;
+
+ private Iterable<String> options;
+
+ private final JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
+
+
+ public void process(Iterable<File> sources) throws AptException {
+ ;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the outputDirectory
+ */
+ public File getOutputDirectory() {
+ return outputDirectory;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param outputDirectory the outputDirectory to set
+ */
+ public void setOutputDirectory(File outputDirectory) {
+ this.outputDirectory = outputDirectory;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the options
+ */
+ public Iterable<String> getOptions() {
+ return options;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param options the options to set
+ */
+ public void setOptions(Iterable<String> options) {
+ this.options = options;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the javaCompiler
+ */
+ public JavaCompiler getJavaCompiler() {
+ return javaCompiler;
+ }
+
+}
Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,47 @@
+/*
+ * $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.apt;
+
+import java.util.Set;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.element.TypeElement;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class CdkProcessor extends AbstractProcessor {
+
+ /* (non-Javadoc)
+ * @see javax.annotation.processing.AbstractProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)
+ */
+ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment environment) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,233 @@
+/*
+ * $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.apt;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.tools.FileObject;
+import javax.tools.ForwardingJavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+import javax.tools.JavaFileManager.Location;
+import javax.tools.JavaFileObject.Kind;
+
+/**
+ * <p class="changed_added_4_0">That class wraps {@link StandardJavaFileManager}
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+final class VirtualFileManager extends
+ ForwardingJavaFileManager<StandardJavaFileManager> {
+
+ private final List<JavaFileObject> sources;
+
+ private final ClassLoader classPathLoader;
+
+ private File outputDirectory;
+
+ private File javaSourceDirectory;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @param fileManager
+ */
+ public VirtualFileManager(StandardJavaFileManager fileManager,
+ ClassLoader classPathLoader) {
+ super(fileManager);
+ this.classPathLoader = classPathLoader;
+ this.sources = new ArrayList<JavaFileObject>();
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @param sources
+ */
+ public void addSources(Iterable<File> sources) {
+ for (File file : sources) {
+ this.getSources().add(new VirtualJavaFileObject(file, Kind.SOURCE));
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * javax.tools.ForwardingJavaFileManager#getJavaFileForInput(javax.tools
+ * .JavaFileManager.Location, java.lang.String,
+ * javax.tools.JavaFileObject.Kind)
+ */
+ @Override
+ public JavaFileObject getJavaFileForInput(Location location,
+ String className, Kind kind) throws IOException {
+ if (StandardLocation.CLASS_PATH.equals(location)) {
+ String fileName = className.replace('.', '/') + kind.extension;
+ URL resource = getClassPathLoader().getResource(fileName);
+ try {
+ return new VirtualJavaFileObject(resource, kind);
+ } catch (URISyntaxException e) {
+ return null;
+ }
+ } else if (StandardLocation.SOURCE_PATH.equals(location)) {
+ String fileName = className.replace('.', '/');
+ for (JavaFileObject source : getSources()) {
+ if (source.isNameCompatible(fileName, kind)) {
+ return source;
+ }
+ }
+ }
+ return super.getJavaFileForInput(location, className, kind);
+ }
+
+ @Override
+ public ClassLoader getClassLoader(Location location) {
+ if (StandardLocation.CLASS_PATH.equals(location)
+ || StandardLocation.CLASS_OUTPUT.equals(location)) {
+ return getClassPathLoader();
+ } else {
+ return super.getClassLoader(location);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * javax.tools.ForwardingJavaFileManager#getJavaFileForOutput(javax.tools
+ * .JavaFileManager.Location, java.lang.String,
+ * javax.tools.JavaFileObject.Kind, javax.tools.FileObject)
+ */
+ @Override
+ public JavaFileObject getJavaFileForOutput(Location location,
+ String className, Kind kind, FileObject sibling) throws IOException {
+ JavaFileObject fileForOutput = null;
+ if (StandardLocation.CLASS_OUTPUT.equals(location)
+ && null != getOutputDirectory()) {
+ String fileName = className.replace('.', '/') + kind.extension;
+ File outputFile = new File(getOutputDirectory(), fileName);
+ fileForOutput = new VirtualJavaFileObject(outputFile, kind);
+ }
+ return fileForOutput;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * javax.tools.ForwardingJavaFileManager#hasLocation(javax.tools.JavaFileManager
+ * .Location)
+ */
+ @Override
+ public boolean hasLocation(Location location) {
+ boolean hasLocation;
+ if (StandardLocation.SOURCE_PATH.equals(location)) {
+ hasLocation = null != getJavaSourceDirectory() || !getSources().isEmpty();
+ } else if (StandardLocation.CLASS_OUTPUT.equals(location)) {
+ hasLocation = null != getOutputDirectory();
+ } else {
+ hasLocation = super.hasLocation(location);
+ }
+ return hasLocation;
+ }
+
+ @Override
+ public Iterable<JavaFileObject> list(Location location, String packageName,
+ Set<Kind> kinds, boolean recurse) throws IOException {
+ Iterable<JavaFileObject> list = super.list(location, packageName,
+ kinds, recurse);
+ return list;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @return the classPathLoader
+ */
+ private ClassLoader getClassPathLoader() {
+ return classPathLoader;
+ }
+
+ public void addSource(JavaFileObject source) {
+ this.getSources().add(source);
+
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @return the outputDirectory
+ */
+ public File getOutputDirectory() {
+ return outputDirectory;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @param outputDirectory
+ * the outputDirectory to set
+ */
+ public void setOutputDirectory(File outputDirectory) {
+ this.outputDirectory = outputDirectory;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @return the javaSourceDirectory
+ */
+ public File getJavaSourceDirectory() {
+ return javaSourceDirectory;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @param javaSourceDirectory
+ * the javaSourceDirectory to set
+ */
+ public void setJavaSourceDirectory(File javaSourceDirectory) {
+ this.javaSourceDirectory = javaSourceDirectory;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the sources
+ */
+ public List<JavaFileObject> getSources() {
+ return sources;
+ }
+
+}
\ No newline at end of file
Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,169 @@
+/*
+ * $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.apt;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.charset.Charset;
+
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+
+/**
+ * <p class="changed_added_4_0">This class represents read-only {@link JavaFileObject} created from {@link File} or {@link URL}</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class VirtualJavaFileObject extends SimpleJavaFileObject {
+
+ /**
+ * <p class="changed_added_4_0">base file object. One of {@link file} or {@link url} fields should be set</p>
+ */
+ private final File classFile;
+
+ private final URL url;
+
+ private Charset charset = Charset.defaultCharset();
+
+ /**
+ * <p class="changed_added_4_0">Cached content</p>
+ */
+ private CharSequence content;
+
+ /**
+ * <p class="changed_added_4_0">Create source from {@link File}</p>
+ * @param classFile
+ */
+ public VirtualJavaFileObject(File classFile) {
+ this(classFile, Kind.SOURCE);
+ }
+
+ public VirtualJavaFileObject(File classFile, Kind kind) {
+ super(classFile.toURI(), kind);
+ this.classFile = classFile;
+ url = null;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0">Create file object from URL</p>
+ * @param url
+ * @param kind
+ * @throws URISyntaxException
+ */
+ public VirtualJavaFileObject(URL url, Kind kind) throws URISyntaxException {
+ super(url.toURI(),kind);
+ classFile = null;
+ this.url = url;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.tools.SimpleJavaFileObject#openInputStream()
+ */
+ @Override
+ public InputStream openInputStream() throws IOException {
+ return null != url ? url.openStream() : new FileInputStream(classFile);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.tools.SimpleJavaFileObject#getCharContent(boolean)
+ */
+ @Override
+ public CharSequence getCharContent(boolean ignoreEncodingErrors)
+ throws IOException {
+ if (null == content) {
+ StringBuilder builder = new StringBuilder((int) (4096f * getCharset().newDecoder()
+ .averageCharsPerByte()));
+ InputStream inputStream = openInputStream();
+ if (null != inputStream) {
+ ReadableByteChannel channel = Channels.newChannel(inputStream);
+ for (ByteBuffer buff = ByteBuffer.allocate(4096); channel
+ .read(buff) >= 0; buff.clear()) {
+ buff.flip();
+ builder.append(getCharset().decode(buff));
+ }
+ channel.close();
+ inputStream.close();
+ content = builder.toString();
+ }
+ }
+ return content;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.tools.SimpleJavaFileObject#openReader(boolean)
+ */
+ @Override
+ public Reader openReader(boolean ignoreEncodingErrors)
+ throws IOException {
+ return new InputStreamReader(openInputStream(),getCharset());
+ }
+
+ /* (non-Javadoc)
+ * @see javax.tools.SimpleJavaFileObject#getLastModified()
+ */
+ @Override
+ public long getLastModified() {
+ if(null != classFile){
+ return classFile.lastModified();
+ } else if (null != url) {
+ try {
+ URLConnection connection = url.openConnection();
+ return connection.getLastModified();
+ } catch (IOException e) {
+ return super.getLastModified();
+ }
+ }
+ return super.getLastModified();
+ }
+
+
+ /**
+ * <p class="changed_added_4_0">Set {@link Charset} for read operations</p>
+ * @param charset the charset to set
+ */
+ public void setCharset(Charset charset) {
+ this.charset = charset;
+ // Reset cached content
+ this.content = null;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the charset
+ */
+ public Charset getCharset() {
+ return charset;
+ }
+}
\ No newline at end of file
Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/AppTest.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/AppTest.java 2009-06-11 17:48:45 UTC (rev 14599)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/AppTest.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -1,59 +0,0 @@
-/**
- * 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;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest
- extends TestCase
-{
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public AppTest( String testName )
- {
- super( testName );
- }
-
- /**
- * @return the suite of tests being tested
- */
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
- }
-
- /**
- * Rigourous Test :-)
- */
- public void testApp()
- {
- assertTrue( true );
- }
-}
Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,173 @@
+/*
+ * $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.apt;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticListener;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+import javax.tools.JavaCompiler.CompilationTask;
+import javax.tools.JavaFileObject.Kind;
+
+import junit.framework.TestCase;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class ProcessorTest extends TestCase {
+
+ private static final String INTERFACE_JAVA = "org/richfaces/cdk/apt/TestInterface.java";
+ private static final String SUB_CLASS_JAVA = "org/richfaces/cdk/apt/TestSubClass.java";
+ private static final String CLASS_JAVA = "org/richfaces/cdk/apt/TestClass.java";
+ private static final Set<String> PROCESS_ANNOTATIONS = new HashSet<String>(
+ Arrays.asList(TestAnnotation.class.getName(), TestAnnotation2.class
+ .getName(), TestMethodAnnotation.class.getName(),
+ TestInterfaceAnnotation.class.getName()));
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Test method for
+ * {@link org.richfaces.cdk.apt.CdkProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)}
+ * .
+ *
+ * @throws Exception
+ */
+ public void testProcessSetRoundEnvironment() throws Exception {
+ JavaFileObject classFile = getJavaFileObject(CLASS_JAVA);
+ JavaFileObject subClassFile = getJavaFileObject(SUB_CLASS_JAVA);
+ JavaFileObject interfaceFile = getJavaFileObject(INTERFACE_JAVA);
+ JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
+ StandardJavaFileManager stdFileManager = javaCompiler
+ .getStandardFileManager(null, null, null);
+ VirtualFileManager fileManager = new VirtualFileManager(stdFileManager,this.getClass().getClassLoader());
+ Iterable<? extends JavaFileObject> compilationUnits =
+ Arrays.asList(classFile, subClassFile, interfaceFile);
+ fileManager.addSource(classFile);
+ DiagnosticListener<JavaFileObject> listener = new DiagnosticListener<JavaFileObject>() {
+
+ @Override
+ public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
+ System.out.println("LOG: " + diagnostic.getMessage(null));
+ }
+
+ };
+ ArrayList<String> options = new ArrayList<String>();
+ options.add("-proc:only");
+ options.add("-implicit:none");
+ options.add("-verbose");
+ CompilationTask compilationTask = javaCompiler.getTask(null,
+ fileManager, listener, options, null, compilationUnits);
+ CdkProcessor cdkProcessor = new CdkProcessor() {
+ @Override
+ public boolean process(Set<? extends TypeElement> annotations,
+ RoundEnvironment environment) {
+ if (!environment.processingOver()) {
+ for (TypeElement typeElement : annotations) {
+ System.out.println("Process annotation: "
+ + typeElement.getQualifiedName());
+ Set<? extends Element> annotatedWith = environment
+ .getElementsAnnotatedWith(typeElement);
+ for (Element element : annotatedWith) {
+ System.out.println("annotated element: "
+ + element.getSimpleName());
+ }
+ }
+
+ }
+ return super.process(annotations, environment);
+ }
+
+ @Override
+ public Set<String> getSupportedAnnotationTypes() {
+ return PROCESS_ANNOTATIONS;
+ }
+ };
+ compilationTask.setProcessors(Collections.singletonList(cdkProcessor));
+ compilationTask.call();
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @param name
+ * TODO
+ * @return
+ * @throws URISyntaxException
+ */
+ private JavaFileObject getJavaFileObject(String name)
+ throws URISyntaxException {
+ final File classFile = getJavaFile(name);
+ SimpleJavaFileObject fileObject = new VirtualJavaFileObject(classFile);
+ return fileObject;
+ }
+
+ private File getJavaFile(String name) throws URISyntaxException {
+ ClassLoader classLoader = this.getClass().getClassLoader();
+ URL testResource = classLoader.getResource(name);
+ URI testUri = testResource.toURI();
+ final File classFile = new File(testUri);
+ return classFile;
+ }
+
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,41 @@
+/*
+ * $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.apt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@Inherited
+@Documented
+(a)Target(ElementType.TYPE)
+public @interface TestAnnotation {
+ public String value();
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,41 @@
+/*
+ * $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.apt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@Inherited
+@Documented
+(a)Target(ElementType.TYPE)
+public @interface TestAnnotation2 {
+ public String value();
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,41 @@
+/*
+ * $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.apt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@Inherited
+@Documented
+(a)Target(ElementType.TYPE)
+public @interface TestInterfaceAnnotation {
+
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,41 @@
+/*
+ * $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.apt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@Inherited
+@Documented
+(a)Target(ElementType.METHOD)
+public @interface TestMethodAnnotation {
+ public String value();
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,125 @@
+/*
+ * $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.apt;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.Reader;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.charset.Charset;
+
+import javax.tools.JavaFileObject.Kind;
+
+import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;
+
+import junit.framework.TestCase;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class VirtualFileTest extends TestCase {
+
+ private static final String CONTENT="<html><body>test</body></html>\n";
+
+ /**
+ * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#getLastModified()}.
+ * @throws Exception
+ */
+ public void testGetLastModified() throws Exception {
+ URL resource = getTestResource();
+ File testFile = new File(resource.toURI());
+ long lastModified = testFile.lastModified();
+ assertEquals(lastModified, new VirtualJavaFileObject(resource,Kind.HTML).getLastModified());
+ assertEquals(lastModified, new VirtualJavaFileObject(testFile,Kind.HTML).getLastModified());
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return
+ */
+ protected URL getTestResource() {
+ return this.getClass().getResource("test.html");
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#openInputStream()}.
+ * @throws Exception
+ */
+ public void testOpenInputStream() throws Exception {
+ VirtualJavaFileObject fileObject = createFileObject();
+ InputStream inputStream = fileObject.openInputStream();
+ byte buff[] = new byte[CONTENT.getBytes().length+10];
+ int read = inputStream.read(buff,0,CONTENT.getBytes().length);
+ inputStream.close();
+ String result = new String(buff,0,read);
+ assertEquals(CONTENT, result);
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#getCharContent(boolean)}.
+ * @throws Exception
+ */
+ public void testGetCharContentBoolean() throws Exception {
+ VirtualJavaFileObject fileObject = createFileObject();
+ CharSequence charContent = fileObject.getCharContent(true);
+ assertEquals(CONTENT, charContent.toString());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#openReader(boolean)}.
+ * @throws Exception
+ */
+ public void testOpenReaderBoolean() throws Exception {
+ VirtualJavaFileObject fileObject = createFileObject();
+ Reader reader = fileObject.openReader(true);
+ char buff[] = new char[CONTENT.length()+10];
+ int read = reader.read(buff);
+ reader.close();
+ String result = new String(buff,0,read);
+ assertEquals(CONTENT, result);
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return
+ * @throws URISyntaxException
+ */
+ protected VirtualJavaFileObject createFileObject()
+ throws URISyntaxException {
+ return new VirtualJavaFileObject(getTestResource(),Kind.HTML);
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#setCharset(java.nio.charset.Charset)}.
+ * @throws Exception
+ */
+ public void testSetCharset() throws Exception {
+ VirtualJavaFileObject javaFileObject = createFileObject();
+ javaFileObject.setCharset(Charset.forName("UTF-8"));
+ }
+
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,34 @@
+/*
+ * $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.apt;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@TestAnnotation("foo")
+public class TestClass {
+
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,39 @@
+/*
+ * $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.apt;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@TestInterfaceAnnotation
+public interface TestInterface {
+
+ @TestMethodAnnotation("baz")
+ public String getValue();
+
+ public void setValue(String value);
+
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,52 @@
+/*
+ * $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.apt;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@TestAnnotation2("subclass")
+public class TestSubClass extends TestClass implements TestInterface {
+
+ private String value;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param value the value to set
+ */
+ @TestMethodAnnotation("setter")
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the value
+ */
+ public String getValue() {
+ return value;
+ }
+}
Property changes on: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html 2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1 @@
+<html><body>test</body></html>
Property changes on: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 7 months
JBoss Rich Faces SVN: r14599 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-06-11 13:48:45 -0400 (Thu, 11 Jun 2009)
New Revision: 14599
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.xml
Log:
RF-7340: a4j:support component description review
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.desc.xml 2009-06-11 15:54:30 UTC (rev 14598)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.desc.xml 2009-06-11 17:48:45 UTC (rev 14599)
@@ -9,8 +9,8 @@
</sectioninfo>
<title>Description</title>
- <para>The <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis> component adds an Ajax support to any existing JSF component. It allows a component to generate asynchronous requests on the necessary event demand and with partial update of page content after a response incoming from the server.</para>
+ <para>The <emphasis role="bold"><property><a4j:support></property></emphasis> component enriches any existing JSF or RichFaces component with an Ajax capability by generating an asynchronous Ajax requests for them.
+ The requests are invoked by definite user activity and used for updating and re-rendering page contents partially after a response from server.
+ </para>
</section>
</root>
\ No newline at end of file
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.xml 2009-06-11 15:54:30 UTC (rev 14598)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/support.xml 2009-06-11 17:48:45 UTC (rev 14599)
@@ -36,31 +36,25 @@
</table>
<section>
- <title>Creating on a page</title>
- <para>To use a component, place <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis> as nested to the component requesting Ajax functionality
- and specify an event of a parent component that generates Ajax request
- and the components to be rerendered after a response from the server.</para>
+ <title>Creating the Component with a Page Tag</title>
+ <para>To create the simplest variant on a page nest the <emphasis role="bold"><property><a4j:support></property></emphasis> into a component that is needed an Ajax functionality.
+ Specify an event that will trigger an Ajax request and the components to be rerendered after a response from server.</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[<h:inputText value="#{bean.text}">
- <a4j:support event="onkeyup" reRender="repeater"/>
+ <a4j:support event="onkeyup" reRender="repeater"/>
</h:inputText>
<h:outputText id="repeater" value="#{bean.text}"/>]]></programlisting>
- <para>On every keyup event generated by an input field, a form is submitted on
- the server with the help of Ajax and on a response coming from the
- server, element with <code>repeater</code> id, founded in a DOM tree
- is redrawn according to a new data from the response.</para>
+
+ <para>On every key-up event occuring inside the input field the <emphasis role="bold"><property><a4j:support></property></emphasis> generates an Ajax request that submits the whole Form.
+ The value for the <code>bean.text</code> will be updated in the model and the component with the <code>repeater</code> ID will be redrawn according to a new data after server responce.
+ </para>
</section>
- <section>
+
+ <section>
<title>Creating the Component Dynamically Using Java</title>
- <para>In order to add <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis> in Java code you should add it as <emphasis>
- <property>facet</property>
- </emphasis>, not children:</para>
+ <para>In order to add the <emphasis role="bold"><property><a4j:support></property></emphasis> in Java code you should add it as <emphasis><property>facet</property></emphasis>, not children:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -74,195 +68,150 @@
inputText.getFacets().put("a4jsupport", ajaxSupport);
]]></programlisting>
</section>
- <section>
- <title>Key attributes and ways of usage</title>
- <para><emphasis role="bold">
- <property><a4j:support></property>
- </emphasis> addition is very similar to correspondent event
- redefinition of a component, i.e. </para>
+
+ <section>
+ <title>Details of Usage</title>
+ <para>
+ The <emphasis role="bold"><property><a4j:support></property></emphasis> component created on a page as following
+ </para>
+
+ <programlisting role="XML"><![CDATA[<h:inputText value="#{bean.text}">
+ <a4j:support event="onkeyup" reRender="output" action="#{bean.action}"/>
+</h:inputText>]]></programlisting>
+
+ <para>is decoded in HTML as</para>
+
+ <programlisting role="XML"><![CDATA[<input onkeyup="A4J.AJAX.Submit( Some request parameters )"/>]]></programlisting>
+
+ <para>The <emphasis><property>"onkeyup"</property></emphasis> event calls an utility RichFaces method that submits Form by creating special marks for the RichFaces filter informing that it is an Ajax request.
+ Any quantity of supports that define component behavior could be added to a component.
+ </para>
+
+ <note>
+ <para>A lot of RichFaces components comes with built-in Ajax support (read the Guide to find out what exactly) and have no need in the <emphasis role="bold"><property><a4j:support></property></emphasis>.
+ </para>
+ </note>
+
+ <para>With the help of <emphasis><property>"onsubmit"</property></emphasis> and <emphasis><property>"oncomplete"</property></emphasis> attributes the component allows using JavaScript before
+ (for request sending conditions checking) and after an Ajax response processing termination (for performance of user-defined activities on the client).
+ </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis></para><programlisting role="XML"><![CDATA[<h:selectOneMenu value="#{bean.text}">
+ <f:selectItem itemValue="First Item" itemLabel="First Item"/>
+ <f:selectItem itemValue=" Second Item" itemLabel="Second Item"/>
+ <f:selectItem itemValue=" Third Item" itemLabel="Third Item"/>
+ <a4j:support event="onblur" reRender="panel" onsubmit="if(!confirm('Are you sure to change the option ?')) {form.reset(); return false;}" oncomplete="alert('Value succesfully stored')"/>
+</h:selectOneMenu>]]></programlisting>
+
<para>
- <emphasis role="bold">Example:</emphasis>
+ In example there is the condition checking (confirm) is used before request sending and message printing after the request processing is over.
</para>
- <programlisting role="XML"><![CDATA[...
-<h:inputText value="#{bean.text}">
- <a4j:support event="onkeyup" reRender="output" action="#{bean.action}"/>
-</h:inputText>
-...]]></programlisting>
- <para>Is decoded on a page as:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
+
+ <para>The component allows different Ajax request managing ways for its various optimization in particular conditions such as:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">limitation of the submit area and updating area for the request</emphasis>
+ </para>
+ <para>
+ <emphasis><property>"ajaxSingle"</property></emphasis> is an attribute that allows submission on the server only component sending a request as if the component presented on a separate form;
+ </para>
+
+ <para>
+ <emphasis><property>"limitToList"</property></emphasis> is an attribute that allows to limit areas, which are updated after the responses;
+ only these components defined in the <emphasis><property>"reRender"</property></emphasis>attribute are updated;
+ </para>
+ </listitem>
+ </itemizedlist>
</para>
- <programlisting role="XML"><![CDATA[
-<input onkeyup="A4J.AJAX.Submit( Some request parameters )"/>
-]]></programlisting>
- <para>As you see from the code, the <emphasis>
- <property>"onkeyup"</property>
- </emphasis> event calls a utility RichFaces method that submit a form
- creating a special marks for a filter informing that it is an Ajax
- request. Thus, any supports quantity could be added to every
- component, the supports define component behavior on these events. </para>
- <note>
- <para>The components: <emphasis role="bold">
- <property><a4j:commandLink></property>
- </emphasis>, <emphasis role="bold">
- <property><a4j:commandButton></property>
- </emphasis>, <emphasis role="bold">
- <property><a4j:poll></property>
- </emphasis> and others from RichFaces library are already
- supplied with <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis> functionality and there is no necessity to add
- the support to them. </para>
- </note>
- <para>With the help of <emphasis>
- <property>"onsubmit"</property>
- </emphasis> and <emphasis>
- <property>"oncomplete"</property>
- </emphasis> attributes the component allows using JavaScript before
- (for request sending conditions checking) and after an Ajax response
- processing termination (for performance of user-defined activities on
- the client) </para>
+
<para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<h:selectOneMenu value="#{bean.text}">
- <f:selectItem itemValue="First Item" itemLabel="First Item"/>
- <f:selectItem itemValue=" Second Item" itemLabel="Second Item"/>
- <f:selectItem itemValue=" Third Item" itemLabel="Third Item"/>
- <a4j:support event="onblur" reRender="panel" onsubmit="if(!confirm('Are you sure to change the option ?')) {form.reset(); return false;}" oncomplete="alert('Value succesfully stored')"/>
-</h:selectOneMenu>]]></programlisting>
- <para>In example there is the condition checking (confirm) is used before
- request sending and message printing after the request processing is
- over. </para>
- <para>The components allows different Ajax request managing ways for its various
- optimization in particular conditions such as: <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">Limitation of the
- submit area and updating area
- for the request.</emphasis>
- </para>
- <para><emphasis>
- <property>"ajaxSingle"</property>
- </emphasis> is an attribute that allows
- submission on the server only component
- sending a request, as if the component
- presented on a separate form. </para>
- <para><emphasis>
- <property>"limitToList"</property>
- </emphasis> is an attribute that allows
- to limit areas, which are updated after
- the responses. Only these components
- defined in the <emphasis>
- <property>
- "reRender"
- </property>
- </emphasis>attribute are updated.
- </para>
- </listitem>
- </itemizedlist></para>
- <para>
<emphasis role="bold">Example 1:</emphasis>
</para>
<programlisting role="XML"><![CDATA[<h:form>
- <h:inputText value="#{person.name}">
- <a4j:support event="onkeyup" reRender="test" ajaxSingle="true"/>
- </h:inputText>
- <h:inputText value="#{person.middleName}"/>
+ <h:inputText value="#{person.name}">
+ <a4j:support event="onkeyup" reRender="test" ajaxSingle="true"/>
+ </h:inputText>
+ <h:inputText value="#{person.middleName}"/>
</form>]]></programlisting>
- <para>In this example the request contains only the input component causes the
- request generation, not all the components contained on a form,
- because of <code>ajaxSingle="true"</code> usage. </para>
+
<para>
+ In this example the request contains only the input component causes the request generation and not all the components contained on a form (because <code>ajaxSingle="true"</code>).
+ </para>
+
+ <para>
<emphasis role="bold">Example 2:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[<h:form>
- <a4j:outputPanel ajaxRendered="true">
- <h:messages/>
- </a4j:outputPanel>
- <h:inputText value="#{person.name}">
- <a4j:support event="onkeyup" reRender="test" limitToList="true"/>
- </h:inputText>
- <h:outputText value="#{person.name}" id="test"/>
+ <programlisting role="XML"><![CDATA[<h:form>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages/>
+ </a4j:outputPanel>
+ <h:inputText value="#{person.name}">
+ <a4j:support event="onkeyup" reRender="test" limitToList="true"/>
+ </h:inputText>
+ <h:outputText value="#{person.name}" id="test"/>
</form>]]></programlisting>
- <para>In this example the component <emphasis role="bold">
- <property><h:messages></property>
- </emphasis> is always updated (as it capturing all Ajax requests,
- located in ajaxRendered <emphasis role="bold">
- <property><a4j:outputPanel></property>
- </emphasis>), except the case when a response is sent from the input
- component from the example. On sending this component marks that
- updating area is limited to the defined in it components, it means
- that on its usage with
- <code>limitToList="true"</code> the only component
- updated is the one with <code>id="test"</code>.</para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">Limitation of requests
- frequency and updates quantity after the
- responses. </emphasis>
- </para>
- <para><emphasis>
- <property>"requestDelay"</property>
- </emphasis> is an attribute that defines a time
- interval in seconds minimally permissible between
- responses. </para>
- <para><emphasis>
- <property>"eventsQueue"</property>
- </emphasis> is an attribute for naming of the
- queue where the next response is kept in till its
- processing, but if the next event comes in till
- this time is over, the waiting event is taken
- away, replacing with a new one. </para>
- <para><emphasis>
- <property>"ignoreDupResponces"</property>
- </emphasis> is an attribute that allows to disable
- any updates on the client after an Ajax request if
- another Ajax request is already sent. </para>
- <para><emphasis>
- <property>"timeout"</property>
- </emphasis> is an attribute that allows to set a
- time interval in millisecond to define a maximum
- time period of response wait time. In case of the
- interval interaction, a new request is sent and
- the previous one is canceled. Postprocessing of a
- response isn't performed. </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<h:form>
- <h:inputText value="#{person.name}">
- <a4j:support event="onkeyup" reRender="test" requestDelay="1000" ignoreDupResponces="true" eventsQueue="myQueue"/>
- </h:inputText>
- <h:outputText value="#{person.name}" id="test"/>
+
+ <para>
+ In this example the component <emphasis role="bold"><property><h:messages></property></emphasis> is always updated (as it capturing all Ajax requests,
+ located in ajaxRendered <emphasis role="bold"><property><a4j:outputPanel></property></emphasis>), except the case when a response is sent from the input component from the example.
+ On sending this component marks that updating area is limited to the defined in it components,
+ it means that on its usage with <code>limitToList="true"</code> the only component updated is the one with <code>id="test"</code>.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">imitation of requests frequency and updates quantity after the responses</emphasis>
+ </para>
+
+ <para>
+ <emphasis><property>"requestDelay"</property></emphasis> is an attribute that defines a time interval in seconds minimally permissible between responses;
+ </para>
+
+ <para>
+ <emphasis><property>"eventsQueue"</property></emphasis> is an attribute for naming of the queue where the next response is kept in till its processing,
+ but if the next event comes in till this time is over, the waiting event is taken away, replacing with a new one;
+ </para>
+
+ <para>
+ <emphasis><property>"ignoreDupResponces"</property></emphasis> is an attribute that allows to disable any updates on the client after an Ajax request if another Ajax request is already sent;
+ </para>
+
+ <para>
+ <emphasis><property>"timeout"</property></emphasis> is an attribute that allows to set a time interval in millisecond to define a maximum time period of response wait time.
+ In case of the interval interaction, a new request is sent and the previous one is canceled.
+ Postprocessing of a response isn't performed.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<h:form>
+ <h:inputText value="#{person.name}">
+ <a4j:support event="onkeyup" reRender="test" requestDelay="1000" ignoreDupResponces="true" eventsQueue="myQueue"/>
+ </h:inputText>
+ <h:outputText value="#{person.name}" id="test"/>
</form>]]></programlisting>
- <para>This example clearly shows mentioned above attributes.
- If quick typing in a text field happens, every
- next requests sending is delayed for a second and
- requests quantity is reduced. The requests are
- kept in the queue till its the sending. Moreover,
- if the next request is already sent, the
- rerendering after the previous request is banned,
- and it helps to avoid unnecessary processing on
- the client.</para>
- </listitem>
- </itemizedlist>
- <para> Information about the <emphasis>
- <property>"process"</property>
- </emphasis> attribute usage you can find in the
- <link linkend="process"> "Decide what to process" </link> guide section. </para>
- </section>
-
- <section>
- <title>Relevant resources links</title>
- <para>
- <ulink
- url="http://livedemo.exadel.com/richfaces-demo/richfaces/support.jsf?c=support"
- >On the component LiveDemo page</ulink> you can see the example of <emphasis
- role="bold">
- <property><a4j:support></property>
- </emphasis> usage and sources for the given example. </para>
- </section>
+
+ <para>This example clearly shows mentioned above attributes.
+ If quick typing in a text field happens, every next requests sending is delayed for a second and requests quantity is reduced.
+ The requests are kept in the queue till its the sending.
+ Moreover, if the next request is already sent, the rerendering after the previous request is banned, and it helps to avoid unnecessary processing on the client.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Information about the <emphasis><property>"process"</property></emphasis> attribute usage you can find in the "<link linkend="process">Decide what to process</link>" guide section.
+ </para>
+ </section>
+
+ <section>
+ <title>Relevant resources links</title>
+ <para>
+ Visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/support.jsf?c=support"><a4j:support> demo page</ulink> at RichFaces live demo for examples of component usage and their sources.
+ </para>
+
+ </section>
</chapter>
15 years, 7 months
JBoss Rich Faces SVN: r14598 - branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-06-11 11:54:30 -0400 (Thu, 11 Jun 2009)
New Revision: 14598
Modified:
branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
Log:
RF-7355
Modified: branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2009-06-11 14:56:54 UTC (rev 14597)
+++ branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2009-06-11 15:54:30 UTC (rev 14598)
@@ -62,14 +62,11 @@
this.input.value = this.options.sliderValue;
this.prevInputValue = this.input.value;
this.graggedImageOn = false;
- this.range = $R(Number(defaultOptions.minValue), Number(defaultOptions.maxValue));
this.value = 0;
- this.minimum = this.options.minimum || this.range.start;
- this.maximum = this.options.maximum || this.range.end;
this.digCount = 0;
this.delay = this.options.delay;
if("" == this.input.value){
- this.input.value = this.options.minimum;
+ this.input.value = this.options.minValue;
}
this.step = this.options.step;
@@ -79,7 +76,7 @@
}
this.availableValues = this.calculateAvailableValues();
- this.tip.maxlength = (this.maximum + "").length + (this.digCount != 0 ? this.digCount + 1 : 0);
+ this.tip.maxlength = (this.options.maxValue + "").length + (this.digCount != 0 ? this.digCount + 1 : 0);
if(this.options.showArrows){
this.tipArrowInc.maxlength = this.tip.maxlength;
this.tipArrowDec.maxlength = this.tip.maxlength;
@@ -185,7 +182,7 @@
},
setInitialValue: function(){
- this.setValue(parseFloat(this.options.sliderValue || this.range.start));
+ this.setValue(parseFloat(this.options.sliderValue || this.options.minValue));
this.handle.style.visibility="visible";
this.prevValue = this.value;
this.valueChanged = false;
@@ -203,14 +200,14 @@
calculateAvailableValues : function(){
var values = new Array();
- var value = this.roundFloat(this.minimum);
+ var value = this.roundFloat(this.options.minValue);
var i = 0;
- while (value < this.maximum){
+ while (value < this.options.maxValue){
values[i] = value;
value = this.roundFloat(value + parseFloat(this.step));
i++;
}
- values[i] = this.roundFloat(this.maximum);
+ values[i] = this.roundFloat(this.options.maxValue);
return values;
},
@@ -324,21 +321,21 @@
translateToPx: function(value) {
if(this.options.orientation == "vertical"){
return Math.round(
- ((this.maximumOffset() - this.handleLength)/(this.range.end-this.range.start)) *
- (this.range.end - value) - this.maximumOffset()) + "px";
+ ((this.maximumOffset() - this.handleLength)/(this.options.maxValue-this.options.minValue)) *
+ (this.options.maxValue - value) - this.maximumOffset()) + "px";
}
return Math.round(
- ((this.maximumOffset() - this.handleLength)/(this.range.end-this.range.start)) *
- (value - this.range.start)) + "px";
+ ((this.maximumOffset() - this.handleLength)/(this.options.maxValue-this.options.minValue)) *
+ (value - this.options.minValue)) + "px";
},
translateToValue: function(offset) {
if(this.options.orientation == "vertical"){
- return (this.range.end -((offset/(this.maximumOffset() - this.handleLength) *
- (this.range.end-this.range.start))));
+ return (this.options.maxValue -((offset/(this.maximumOffset() - this.handleLength) *
+ (this.options.maxValue-this.options.minValue))));
}
return ((offset/(this.maximumOffset() - this.handleLength) *
- (this.range.end-this.range.start)) + this.range.start);
+ (this.options.maxValue-this.options.minValue)) + this.options.minValue);
},
maximumOffset: function(){
@@ -474,7 +471,7 @@
increase : function(event){
var v = parseFloat(this.value) + parseFloat(this.step);
- this.setValue(Number( v < this.maximum ? v : this.maximum));
+ this.setValue(Number( v < this.options.maxValue ? v : this.options.maxValue));
this.input.value = this.value;
if (this.eventChanged && this.isValueChanged()){
this.eventChanged(event);
@@ -483,7 +480,7 @@
decrease : function(event){
var v = parseFloat(this.value) - parseFloat(this.step);
- this.setValue(Number(v > this.minimum ? v : this.minimum));
+ this.setValue(Number(v > this.options.minValue ? v : this.options.minValue));
this.input.value = this.value;
if (this.eventChanged && this.isValueChanged()){
this.eventChanged(event);
15 years, 7 months
JBoss Rich Faces SVN: r14597 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-06-11 10:56:54 -0400 (Thu, 11 Jun 2009)
New Revision: 14597
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-7352 Richfaces UserGuide 5.5.1 limitToList = "false" should be limitToList = "true" - corrected
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-06-11 13:55:10 UTC (rev 14596)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-06-11 14:56:54 UTC (rev 14597)
@@ -314,7 +314,7 @@
</emphasis>
<emphasis>
<property>"ajaxRendered"</property>
- </emphasis> attribute. <code>limitToList = "false"</code> means to update
+ </emphasis> attribute. <code>limitToList = "true"</code> means to update
only the area(s) that mentioned in the <emphasis>
<property>"reRender"</property>
</emphasis> attribute explicitly. All output panels with
15 years, 7 months
JBoss Rich Faces SVN: r14596 - in branches/community/3.3.X/ui/inputnumber-slider/src/main: resources/org/richfaces/renderkit/html/script and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-06-11 09:55:10 -0400 (Thu, 11 Jun 2009)
New Revision: 14596
Modified:
branches/community/3.3.X/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
branches/community/3.3.X/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
Log:
RF-7355
Modified: branches/community/3.3.X/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- branches/community/3.3.X/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2009-06-11 13:22:26 UTC (rev 14595)
+++ branches/community/3.3.X/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2009-06-11 13:55:10 UTC (rev 14596)
@@ -89,13 +89,13 @@
<name>width</name>
<classname>java.lang.String</classname>
<description>The width of a slider control. Default value is "200px", for orientation="vertical" value is "200px"</description>
- <defaultvalue><![CDATA["200px"]]></defaultvalue>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property >
<name>height</name>
<classname>java.lang.String</classname>
<description>The height of a slider control. Default value is "20px", for orientation="vertical" value is "20px"</description>
- <defaultvalue><![CDATA["20px"]]></defaultvalue>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name> enableManualInput </name>
Modified: branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2009-06-11 13:22:26 UTC (rev 14595)
+++ branches/community/3.3.X/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2009-06-11 13:55:10 UTC (rev 14596)
@@ -1,25 +1,45 @@
if(!window.Richfaces) window.Richfaces = {};
Richfaces.Slider = Class.create();
Richfaces.Slider.prototype = {
- initialize: function(handle, track, tip, table, handleSelectedClass, increaseSelectedClass, decreaseSelectedClass, options) {
- var slider = this;
- this.handle = $( handle );
- this.tip = $( tip );
- this.track = $( track );
- this.mainTable = $( table );
-
- //this.optionsInputId = options.optionsInputId;
-
- //this.optionInput = $(this.optionsInputId) || document.getElementById(this.optionsInputId);
-
- this.input = $( options.inputId ) || document.getElementsByName(options.inputId)[0];
- if(options.showArrows){
- this.arrowInc = $( options.arrowInc ) || document.getElementsByName(options.arrowInc)[0];
- this.arrowDec = $( options.arrowDec ) || document.getElementsByName(options.arrowDec)[0];
- this.tipArrowInc = $( options.tipArrowInc ) || document.getElementsByName(options.tipArrowInc)[0];
- this.tipArrowDec = $( options.tipArrowDec ) || document.getElementsByName(options.tipArrowDec)[0];
+ initialize: function(id, options) {
+ //default values of options
+ var defaultOptions = {
+ handleSelectedClass: null,
+ disabled: false,
+ required: false,
+ showArrows: false,
+ disabled: false,
+ onchange: null,
+ clientErrorMessage: null,
+ showToolTip: true,
+ step: 1,
+ minValue: 0,
+ maxValue: 100,
+ delay: 200,
+ onslide: null,
+ sliderValue: null,
+ width: "200px",
+ height: "20px",
+ orientation: "horizontal"
+ };
+ Object.extend(defaultOptions, options);
+ this.handle = $( id + "Handle" );
+ this.tip = $( id + "Tip" );
+ this.track = $( id + "Track" );
+ this.mainTable = $( id );
+ var inputId = id + "Input";
+ this.input = $(inputId) || document.getElementsByName(inputId)[0];
+ if(defaultOptions.showArrows){
+ var arrowIncId = id + "ArrowInc";
+ this.arrowInc = $(arrowIncId) || document.getElementsByName(arrowIncId)[0];
+ var arrowDecId = id + "ArrowDec";
+ this.arrowDec = $(arrowDecId) || document.getElementsByName(arrowDecId)[0];
+ var tipArrowIncId = id + "TipArrowInc";
+ this.tipArrowInc = $(tipArrowIncId) || document.getElementsByName(tipArrowIncId)[0];
+ var tipArrowDecId = id + "TipArrowDec";
+ this.tipArrowDec = $(tipArrowDecId) || document.getElementsByName(tipArrowDecId)[0];
}
- this.options= options || {};
+ this.options = defaultOptions;
this.orientation = this.options.orientation;
@@ -35,14 +55,14 @@
this.classes.base = " " + this.trim(this.classes.temp.replace("rich-inslider-handler-vertical",""));
}
- this.classes.handleSelected = " " + handleSelectedClass;
+ this.classes.handleSelected = " " + defaultOptions.handleSelectedClass;
this.table = this.findTableForTrack(this.track);
this.input.value = this.options.sliderValue;
this.prevInputValue = this.input.value;
this.graggedImageOn = false;
- this.range = this.options.range || $R(0,1);
+ this.range = $R(Number(defaultOptions.minValue), Number(defaultOptions.maxValue));
this.value = 0;
this.minimum = this.options.minimum || this.range.start;
this.maximum = this.options.maximum || this.range.end;
@@ -104,8 +124,8 @@
this.eventIncreaseUp = this.increaseUp.bindAsEventListener(this);
this.eventDecreaseUp = this.decreaseUp.bindAsEventListener(this);
- if (this.options.onerr) {
- this.eventError = new Function("event","clientErrorMessage",this.options.onerr);
+ if (this.options.onerror) {
+ this.eventError = new Function("event","clientErrorMessage",this.options.onerror);
}
if (this.options.onchange != ""){
@@ -136,7 +156,7 @@
//Event.observe(window, "load", this.setInitialValue.bindAsEventListener(this)); //FIX RFA-190
//Event.observe($(input), "propertychange", this.setInitialValue.bindAsEventListener(this));
- this.required = options.required;
+ this.required = defaultOptions.required;
this.mainTable.component = this;
this["rich:destructor"] = "destroy";
@@ -347,7 +367,7 @@
if(Event.isLeftClick(event)) {
if(!this.disabled){
this.handle.className = this.classes.arrowSelected + this.classes.base + this.classes.handleSelected;
- if (this.options.currValue){
+ if (this.options.showToolTip){
Element.show(this.tip);
Element.setStyle(this.tip, {top: '-' + (this.tip.offsetHeight+2) + 'px'});
}
@@ -419,7 +439,7 @@
window.document.onmouseup = this.prevMouseUp;
window.document.onmousemove = this.prevMouseMove;
Event.stopObserving(document, "mouseout", this.eventWindowMouseOut, false);
- if (this.options.currValue){
+ if (this.options.showToolTip){
Element.hide(this.tip);
}
if (this.eventChanged && this.isValueChanged()){
@@ -475,7 +495,7 @@
this.arrowButton.className = this.arrowButton.className.replace("Class","SelectedClass").replace("al","al-selected");
window.document.onmouseup = this.eventIncreaseUp.bindAsEventListener(this);
if(!this.disabled){
- if (this.options.currValue){
+ if (this.options.showToolTip){
Element.show(this.tipArrowInc);
}
}
@@ -488,7 +508,7 @@
this.arrowButton.className = this.arrowButton.className.replace("Class","SelectedClass").replace("al","al-selected");
window.document.onmouseup = this.eventDecreaseUp.bindAsEventListener(this);
if(!this.disabled){
- if (this.options.currValue){
+ if (this.options.showToolTip){
Element.show(this.tipArrowDec);
}
}
@@ -498,7 +518,7 @@
increaseUp : function(event){
this._periodicalExecuter.stop();
- if (this.options.currValue){
+ if (this.options.showToolTip){
Element.hide(this.tipArrowInc);
}
this.arrowButton.className = this.arrowButton.className.replace("SelectedClass","Class").replace("al-selected","al");
@@ -507,7 +527,7 @@
decreaseUp : function(event){
this._periodicalExecuter.stop();
- if (this.options.currValue){
+ if (this.options.showToolTip){
Element.hide(this.tipArrowDec);
}
this.arrowButton.className = this.arrowButton.className.replace("SelectedClass","Class").replace("al-selected","al");
@@ -550,7 +570,7 @@
this.input.value = this.value;
if (this.eventError){
- this.eventError(e,this.options.clientErrorMsg);
+ this.eventError(e,this.options.clientErrorMessage);
}
} else {
if (!( e.keyCode >= 37 && e.keyCode <= 40 )){
Modified: branches/community/3.3.X/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
===================================================================
--- branches/community/3.3.X/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2009-06-11 13:22:26 UTC (rev 14595)
+++ branches/community/3.3.X/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2009-06-11 13:55:10 UTC (rev 14596)
@@ -20,7 +20,6 @@
<f:resource name="/org/richfaces/renderkit/html/images/spacer.gif" var="spacer" />
<f:resource name="org.richfaces.renderkit.html.images.SliderArrowImage" var="arrow" />
- <f:resource name="org.richfaces.renderkit.html.images.SliderArrowSelectedImage" var="arrowSelected" />
<jsp:scriptlet>
<![CDATA[
@@ -267,39 +266,26 @@
]]></jsp:scriptlet>
</tr>
<tr><td>
- <script type="text/javascript">
- new Richfaces.Slider(
- "#{clientId}Handle",
- "#{clientId}Track",
- "#{clientId}Tip",
- "#{clientId}",
- "#{component.attributes['handleSelectedClass']}",
- "#{component.attributes['decreaseSelectedClass']}",
- "#{component.attributes['increaseSelectedClass']}",
- {
- range : $R(#{component.attributes['minValue']},#{component.attributes['maxValue']}),
- step : "#{component.attributes['step']}",
- sliderValue : "#{this:getInputValue(context,component)}",
- disabled : #{component.attributes['disabled']},
- currValue : #{component.attributes['showToolTip']},
- inputId : "#{clientId}Input",
- arrowInc : "#{clientId}ArrowInc",
- arrowDec : "#{clientId}ArrowDec",
- tipArrowInc : "#{clientId}TipArrowInc",
- tipArrowDec : "#{clientId}TipArrowDec",
- arrowSelected : "#{arrowSelected}",
- onerr : "#{component.attributes['onerror']}",
- clientErrorMsg : "#{component.attributes['clientErrorMessage']}",
- <f:call name="writeEventHandlerFunction"><f:parameter value="onslide" /></f:call>,
- onchange : "#{component.attributes['onchange']}",
- required : #{component.attributes['required']},
- height : "#{height}",
- width : "#{width}",
- orientation : "vertical",
- showArrows : #{component.attributes['showArrows']},
- delay : "#{component.attributes['delay']}"
- })
- </script>
+ <c:scriptObject var="options">
+ <c:scriptOption attributes="handleSelectedClass, disabled, required, onerror, onchange, clientErrorMessage, showArrows" />
+ <c:scriptOption attributes="showToolTip" defaultValue="true"/>
+ <c:scriptOption attributes="step" defaultValue="1"/>
+ <c:scriptOption attributes="minValue" defaultValue="0" />
+ <c:scriptOption attributes="maxValue" defaultValue="100" />
+ <c:scriptOption attributes="delay" defaultValue="200" />
+ <c:scriptOption attributes="onslide" wrapper="eventHandler" />
+ <c:scriptOption name="sliderValue" value="#{this:getInputValue(context,component)}" />
+ <c:scriptOption variables="width" defaultValue="200px" />
+ <c:scriptOption variables="height" defaultValue="20px" />
+ <c:scriptOption name="orientation" value="vertical" />
+ </c:scriptObject>
+ <script type="text/javascript">
+ new Richfaces.Slider("#{clientId}"
+ <c:if test="#{not empty options}">
+ , <f:writeAsScript value="#{options}" />
+ </c:if>
+ )
+ </script>
</td></tr>
</tbody>
</table>
@@ -500,38 +486,24 @@
</tbody>
</table>
</div>
+ <c:scriptObject var="options">
+ <c:scriptOption attributes="handleSelectedClass, disabled, required, onerror, onchange, clientErrorMessage, showArrows" />
+ <c:scriptOption attributes="showToolTip" defaultValue="true"/>
+ <c:scriptOption attributes="step" defaultValue="1"/>
+ <c:scriptOption attributes="minValue" defaultValue="0" />
+ <c:scriptOption attributes="maxValue" defaultValue="100" />
+ <c:scriptOption attributes="delay" defaultValue="200" />
+ <c:scriptOption attributes="onslide" wrapper="eventHandler" />
+ <c:scriptOption name="sliderValue" value="#{this:getInputValue(context,component)}" />
+ <c:scriptOption variables="width" defaultValue="200px" />
+ <c:scriptOption variables="height" defaultValue="20px" />
+ </c:scriptObject>
<script type="text/javascript">
- new Richfaces.Slider(
- "#{clientId}Handle",
- "#{clientId}Track",
- "#{clientId}Tip",
- "#{clientId}",
- "#{component.attributes['handleSelectedClass']}",
- "#{component.attributes['increaseSelectedClass']}",
- "#{component.attributes['decreaseSelectedClass']}",
- {
- range : $R(#{component.attributes['minValue']},#{component.attributes['maxValue']}),
- step : "#{component.attributes['step']}",
- sliderValue : "#{this:getInputValue(context,component)}",
- disabled : #{component.attributes['disabled']},
- currValue : #{component.attributes['showToolTip']},
- inputId : "#{clientId}Input",
- arrowInc : "#{clientId}ArrowInc",
- arrowDec : "#{clientId}ArrowDec",
- tipArrowInc : "#{clientId}TipArrowInc",
- tipArrowDec : "#{clientId}TipArrowDec",
- arrowSelected : "#{arrowSelected}",
- onerr : "#{component.attributes['onerror']}",
- clientErrorMsg : "#{component.attributes['clientErrorMessage']}",
- <f:call name="writeEventHandlerFunction"><f:parameter value="onslide" /></f:call>,
- onchange : "#{component.attributes['onchange']}",
- required : #{component.attributes['required']},
- width : "#{width}",
- height : "#{height}",
- orientation : "horizontal",
- showArrows : #{component.attributes['showArrows']},
- delay : "#{component.attributes['delay']}"
- })
+ new Richfaces.Slider("#{clientId}"
+ <c:if test="#{not empty options}">
+ , <f:writeAsScript value="#{options}" />
+ </c:if>
+ )
</script>
</td>
</tr>
15 years, 7 months
JBoss Rich Faces SVN: r14595 - branches/community/3.3.X/ui/componentControl/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-06-11 09:22:26 -0400 (Thu, 11 Jun 2009)
New Revision: 14595
Modified:
branches/community/3.3.X/ui/componentControl/src/main/config/component/componentControl.xml
Log:
https://jira.jboss.org/jira/browse/RF- Description of disableDefault attribute behaviour is changed
Modified: branches/community/3.3.X/ui/componentControl/src/main/config/component/componentControl.xml
===================================================================
--- branches/community/3.3.X/ui/componentControl/src/main/config/component/componentControl.xml 2009-06-11 12:08:17 UTC (rev 14594)
+++ branches/community/3.3.X/ui/componentControl/src/main/config/component/componentControl.xml 2009-06-11 13:22:26 UTC (rev 14595)
@@ -35,7 +35,7 @@
<name>disableDefault</name>
<classname>boolean</classname>
<description>
- Disable default action for target event ( append "return false;" to JavaScript )
+ Disable default action for target event. If the attribute is not set, it's made "true" by default if the event oncontextmenu is used and false in all other cases. if the attribute set, its value is used.
</description>
<!-- Has a special dynamic default value -->
</property>
15 years, 7 months
JBoss Rich Faces SVN: r14594 - in branches/community/3.3.X/docs: userguide/en/src/main/docbook/included and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-06-11 08:08:17 -0400 (Thu, 11 Jun 2009)
New Revision: 14594
Modified:
branches/community/3.3.X/docs/faq/en/src/main/docbook/module/RFCfaq.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxValidator.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataGrid.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataList.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/messages.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/progressBar.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/repeat.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/subTable.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/suggestionbox.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
https://jira.jboss.org/jira/browse/RF-7287
"Ajax" acronym is unified (was AJAX, ajax, now Ajax)
Modified: branches/community/3.3.X/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- branches/community/3.3.X/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -984,7 +984,7 @@
<section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
<?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
<title>Why form isn't submitted or setter isn't called after
- AJAX request?</title>
+ Ajax request?</title>
<para>This situation could happen because of conversion/validation errors on
form submission. In order to verify this, it's necessary to
place this updating via an Ajax error message inside a form:</para>
@@ -1191,7 +1191,7 @@
]]></programlisting>
<para>In this case the wrapper component always presents in the DOM tree and its
- inner content could be updated dynamically on AJAX.</para>
+ inner content could be updated dynamically on Ajax.</para>
</section>
<section id="PreventDupRerenderingPoll">
@@ -2683,9 +2683,9 @@
</section>
<section id="ajaxCookie">
<?dbhtml filename="ajaxCookie.html"?>
- <title>How to add cookie in an AJAX Respond?</title>
+ <title>How to add cookie in an Ajax Respond?</title>
<para>
- In order to add cookie in an AJAX Respond you could use bean described below.
+ In order to add cookie in an Ajax Respond you could use bean described below.
</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -2719,7 +2719,7 @@
}
...]]></programlisting>
<para>
- Then you could try to set cookie with AJAX Respond as it is shown in the following example.
+ Then you could try to set cookie with Ajax Respond as it is shown in the following example.
After the cookie "test" is set the value of this cookie appears on a page.
</para>
<para>
@@ -2729,7 +2729,7 @@
<h:form>
<h:outputText id="text" value="Cookie value: #{cookieBean.testCookie}"/>
<br />
- <a4j:commandButton action="#{cookieBean.setTestCookie}" value="Set Cookie by AJAX">
+ <a4j:commandButton action="#{cookieBean.setTestCookie}" value="Set Cookie by Ajax">
<a4j:support event="oncomplete" reRender="text" />
</a4j:commandButton>
</h:form>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxValidator.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxValidator.desc.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxValidator.desc.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -9,7 +9,7 @@
<title>Description</title>
<para>The<emphasis role="bold">
<property><rich:ajaxValidator></property>
- </emphasis>is a component designed to provide ajax validation inside for JSF inputs.</para>
+ </emphasis>is a component designed to provide Ajax validation inside for JSF inputs.</para>
</section>
<section>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -94,7 +94,7 @@
<para>The following example demonstrates how the <emphasis role="bold">
<property><rich:ajaxValidator></property>
- </emphasis> adds AJAX functionality to standard JSF validators. The
+ </emphasis> adds Ajax functionality to standard JSF validators. The
request is sent when the input field loses focus, the action is
determined by the <emphasis>
<property>"event"</property>
@@ -138,7 +138,7 @@
The <emphasis role="bold">
<property><rich:ajaxValidator></property>
</emphasis> component also works perfectly with custom validators
- enhancing their usage with AJAX. </para>
+ enhancing their usage with Ajax. </para>
<para> Custom validation can be performed in two ways: </para>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -241,7 +241,7 @@
<emphasis><property> "onlistcall"</property></emphasis>which is fired before the list opening and gives you a possibility to cancel list popup/update
</para></listitem>
<listitem><para>
- <emphasis><property> "onselect"</property></emphasis>which gives you a possibility to send AJAX request when item is selected
+ <emphasis><property> "onselect"</property></emphasis>which gives you a possibility to send Ajax request when item is selected
</para></listitem>
</itemizedlist>
</para>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -22,7 +22,7 @@
<title>Key Features</title>
<itemizedlist>
<listitem><para>Completely skinned table rows and child elements</para></listitem>
- <listitem><para>Possibility to update a limited set of rows with AJAX</para></listitem>
+ <listitem><para>Possibility to update a limited set of rows with Ajax</para></listitem>
<listitem><para>Possibility to receive values dynamically from a model</para></listitem>
</itemizedlist>
</section>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataGrid.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataGrid.desc.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataGrid.desc.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -22,7 +22,7 @@
<title>Key Features</title>
<itemizedlist>
<listitem><para>A completely skinned table and child elements</para></listitem>
- <listitem><para>Possibility to update a limited set of rows with AJAX</para></listitem>
+ <listitem><para>Possibility to update a limited set of rows with Ajax</para></listitem>
<listitem><para>Possibility to receive values dynamically from a model</para></listitem>
</itemizedlist>
</section>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataList.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataList.desc.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataList.desc.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -22,7 +22,7 @@
<title>Key Features</title>
<itemizedlist>
<listitem><para>A completely skinned list and child elements</para></listitem>
- <listitem><para>Possibility to update a limited set of rows with AJAX</para></listitem>
+ <listitem><para>Possibility to update a limited set of rows with Ajax</para></listitem>
<listitem><para>Possibility to receive values dynamically from a model</para></listitem>
</itemizedlist>
</section>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -22,7 +22,7 @@
<title>Key Features</title>
<itemizedlist>
<listitem><para>A completely skinned list and child elements</para></listitem>
- <listitem><para>Possibility to update a limited set of rows with AJAX</para></listitem>
+ <listitem><para>Possibility to update a limited set of rows with Ajax</para></listitem>
<listitem><para>Possibility to receive values dynamically from a model</para></listitem>
</itemizedlist>
</section>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -25,7 +25,7 @@
<listitem><para>Possibility to insert the complex subcomponents
<property>"colGroup"</property> and
<property>"subTable"</property></para></listitem>
- <listitem><para>Possibility to update a limited set of strings with AJAX</para></listitem>
+ <listitem><para>Possibility to update a limited set of strings with Ajax</para></listitem>
<listitem><para>Possibility to sort and to filter of columns</para></listitem>
<listitem><para><link linkend="sort">Sorting column values</link></para></listitem>
<listitem><para><link linkend="filter">Filtering column values</link></para></listitem>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -299,7 +299,7 @@
</listitem>
</itemizedlist>
- <para>Apart from uploading files to the sever without using AJAX, the Flash module provides
+ <para>Apart from uploading files to the sever without using Ajax, the Flash module provides
a number of useful API functions that can be used to obtain information about the
uploaded file. </para>
@@ -348,7 +348,7 @@
<para> Moreover, embedded Flash module provides a smoother representation of progress bar
- during the uploading process: the polling is performed is not by AJAX, but my means of
+ during the uploading process: the polling is performed is not by Ajax, but my means of
the flash module. </para>
<figure>
<title> Uploading using Flash module <emphasis role="bold">
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/messages.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/messages.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/messages.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -129,7 +129,7 @@
</f:facet>
</rich:messages>]]></programlisting>
- <para>The <emphasis role="bold"><property><rich:messages></property></emphasis> component keeps all messages for all components even after only one ajax-validated component was updated.</para>
+ <para>The <emphasis role="bold"><property><rich:messages></property></emphasis> component keeps all messages for all components even after only one Ajax-validated component was updated.</para>
</section>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/progressBar.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/progressBar.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/progressBar.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -356,12 +356,12 @@
<!--Sorting API -->
<row>
<entry>enable()</entry>
- <entry>Begins polling for ajax mode </entry>
+ <entry>Begins polling for Ajax mode </entry>
</row>
<row>
<entry>disable()</entry>
- <entry>Stops polling for ajax mode</entry>
+ <entry>Stops polling for Ajax mode</entry>
</row>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/repeat.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/repeat.desc.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/repeat.desc.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -10,6 +10,6 @@
<title>Description</title>
<para>The <emphasis role="bold">
<property><a4j:repeat></property>
- </emphasis> component implements a basic iteration component allowing to update a set of its children with AJAX.</para>
+ </emphasis> component implements a basic iteration component allowing to update a set of its children with Ajax.</para>
</section>
</root>
\ No newline at end of file
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/subTable.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/subTable.desc.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/subTable.desc.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -29,7 +29,7 @@
<listitem><para>Completely skinned table rows and child elements</para></listitem>
<listitem><para>Possibility to insert complex columnGroup subcomponents</para></listitem>
<listitem><para>Possibility to combine rows and columns inside</para></listitem>
- <listitem><para>Possibility to update a limited set of rows with AJAX</para></listitem>
+ <listitem><para>Possibility to update a limited set of rows with Ajax</para></listitem>
</itemizedlist>
</section>
</section>
\ No newline at end of file
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/suggestionbox.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/suggestionbox.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/suggestionbox.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -187,7 +187,7 @@
<property>"style"</property>
</emphasis> attributes corresponding to dataTable ones for a table
appearing in popup (for additional information, read JSF Reference)
- and custom attribute managing AJAX requests sending (for additional
+ and custom attribute managing Ajax requests sending (for additional
information, see <ulink
url="http://www.jboss.org/projects/jbossajax4jsf">Ajax4JSF
Project</ulink>).</para>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -478,7 +478,7 @@
<listitem><para>If ever more are detected a warning will appears in server console during rendering.
All the same named queues after the first instance are ignored.</para></listitem>
<listitem><para>View scoped default queue is also created
- for components which have the following ajax attributes: (in this case queue has a component scope)</para>
+ for components which have the following Ajax attributes: (in this case queue has a component scope)</para>
<itemizedlist>
<listitem><para><emphasis><property>"requestDelay" </property></emphasis></para></listitem>
<listitem><para><emphasis><property>"ignoreDupResponce" </property></emphasis></para></listitem>
@@ -842,7 +842,7 @@
<title>JavaScript Interactions</title>
<para> RichFaces allows writing Ajax-enabled JSF application without writing any
Javascript code. However, you can still invoke the JavaScript code if you need.
- There are several ajax attributes that helps to do it. </para>
+ There are several Ajax attributes that helps to do it. </para>
<para>
<emphasis>
<property>"onsubmit"</property>
@@ -874,9 +874,9 @@
<para>
<emphasis> The <property>"oncomplete"</property>
</emphasis> attribute is used for passing JavaScript that would be invoked right
- after the AJAX response returns back and DOM is updated. It is not recommended to
+ after the Ajax response returns back and DOM is updated. It is not recommended to
use use keyword <code>this</code> inside the EL-expression, because it will not
- always point to the component where AJAX request was initiated. </para>
+ always point to the component where Ajax request was initiated. </para>
<para>
<emphasis>
<property>"onbeforedomupdate"</property>
@@ -1201,7 +1201,7 @@
</h:inputText>
...]]></programlisting>
<para> In the example above when the input field with the
- <code>id="name"</code> looses focus, an AJAX request is sent. So only
+ <code>id="name"</code> looses focus, an Ajax request is sent. So only
two input fields (with <code>id="name"</code> and additionally with
<code>id="email"</code>) are processed: decoding,
conversion/validation, value applying phases are executed. The input field with the
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2009-06-11 09:50:25 UTC (rev 14593)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2009-06-11 12:08:17 UTC (rev 14594)
@@ -788,7 +788,7 @@
<section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
<?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
- <title>Why form isn't submitted or setter isn't called after AJAX
+ <title>Why form isn't submitted or setter isn't called after Ajax
request?</title>
<para>This situation could happen because of conversion/validation errors on form
submission. In order to verify this, it's necessary to place this
@@ -972,7 +972,7 @@
]]></programlisting>
<para>In this case the wrapper component always presents in the DOM tree and its
- inner content could be updated dynamically on AJAX.</para>
+ inner content could be updated dynamically on Ajax.</para>
</section>
<section id="PreventDupRerenderingPoll">
15 years, 7 months