Author: lfryc(a)redhat.com
Date: 2010-07-10 14:42:25 -0400 (Sat, 10 Jul 2010)
New Revision: 17827
Added:
root/tests/metamer/trunk/assembler.xml
root/tests/metamer/trunk/readme.txt
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JAjaxBean.java
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JAjaxBean.properties
root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/
root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/input.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/list.xhtml
root/tests/metamer/trunk/src/main/webapp/resources/css/a4jAjax.css
Modified:
root/tests/metamer/trunk/pom.xml
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/Attributes.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandLinkBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JMediaOutputBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/commandButton/list.xhtml
root/tests/metamer/trunk/src/main/webapp/resources/css/list.css
root/tests/metamer/trunk/src/main/webapp/templates/template.xhtml
Log:
https://jira.jboss.org/browse/RFPL-466
* pom.xml refactored because of changes in RF build structure
* added readme.txt describing how to build and deploy the application
* added one page for a4j:ajax
* class Attributes refactored - added two factory methods instead of constructor
* all pages list.xhtml refactored
Added: root/tests/metamer/trunk/assembler.xml
===================================================================
--- root/tests/metamer/trunk/assembler.xml (rev 0)
+++ root/tests/metamer/trunk/assembler.xml 2010-07-10 18:42:25 UTC (rev 17827)
@@ -0,0 +1,22 @@
+<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembl...
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-p...
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <files>
+ <file>
+ <source>pom.xml</source>
+ </file>
+ <file>
+ <source>readme.txt</source>
+ </file>
+ </files>
+
+ <fileSets>
+ <fileSet>
+ <directory>src</directory>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Modified: root/tests/metamer/trunk/pom.xml
===================================================================
--- root/tests/metamer/trunk/pom.xml 2010-07-10 18:31:32 UTC (rev 17826)
+++ root/tests/metamer/trunk/pom.xml 2010-07-10 18:42:25 UTC (rev 17827)
@@ -5,19 +5,23 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.richfaces.examples</groupId>
- <artifactId>examples-aggregator</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>7</version>
</parent>
-
<groupId>org.richfaces.examples</groupId>
<artifactId>testapp</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>RichFaces Examples: Testing Application</name>
<properties>
+
<
snapshotRepository>dav:https://repository.jboss.org/nexus/content/repo...
+ <jetty.port>8080</jetty.port>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <richfaces.checkstyle.version>1</richfaces.checkstyle.version>
</properties>
<dependencyManagement>
@@ -27,38 +31,67 @@
<artifactId>el-api</artifactId>
<version>2.2</version>
</dependency>
+
+ <dependency>
+ <groupId>org.richfaces.ui.dist</groupId>
+ <artifactId>richfaces-components-bom</artifactId>
+ <version>${project.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.5.8</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
+ <!-- RichFaces 4 -->
<dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-ui-core-ui</artifactId>
+ <groupId>org.richfaces.ui.dist</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
</dependency>
- <!--<dependency>
- <groupId>org.richfaces.ui.components</groupId>
- <artifactId>core-ui</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </dependency>-->
- <!--<dependency>
- <groupId>org.richfaces.ui.iteration</groupId>
- <artifactId>datascroller-ui</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </dependency>-->
<dependency>
- <groupId>org.richfaces.ui-sandbox</groupId>
- <artifactId>tables-ui</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <version>${project.version}</version>
</dependency>
+ <!-- Java Server Faces 2 -->
<dependency>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${jsf2.impl.groupid}</groupId>
+ <artifactId>${jsf2.impl.artifactid}</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>2.2</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Simple Logging Facade for Java -->
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <!--<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
@@ -67,30 +100,61 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>5.9</version>
+ <version>5.12.1</version>
<scope>test</scope>
</dependency>
-
<!--<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.2.GA</version>
- <type>jar</type>
<scope>provided</scope>
</dependency>-->
-
- <dependency>
- <groupId>org.glassfish.web</groupId>
- <artifactId>el-impl</artifactId>
- <version>2.2</version>
- <scope>runtime</scope>
- </dependency>
-
</dependencies>
<build>
<finalName>testapp</finalName>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <!-- Configure checkstyle report for this module -->
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-build-checkstyle
+ </artifactId>
+ <version>${richfaces.checkstyle.version}
+ </version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.18</version>
+ <configuration>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <connectors>
+ <connector
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>${jetty.port}</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
<profiles>
@@ -108,13 +172,10 @@
<goal>war</goal>
</goals>
<configuration>
-
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee6
- </webappDirectory>
+
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
<classifier>jee6</classifier>
-
<packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*
- </packagingExcludes>
-
<warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*
- </warSourceExcludes>
+
<packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*</packagingExcludes>
+
<warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*</warSourceExcludes>
</configuration>
</execution>
</executions>
@@ -122,6 +183,37 @@
<classifier>tomcat6</classifier>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>group-sources</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <finalName>sources</finalName>
+ <descriptor>assembler.xml</descriptor>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+
<classesDirectory>${basedir}/target/sources/sources</classesDirectory>
+ <classifier>sources</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
@@ -138,9 +230,38 @@
</plugin>
</plugins>
</build>
+
+ <dependencies>
+ <dependency>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>${jsf2.impl.groupid}</groupId>
+ <artifactId>${jsf2.impl.artifactid}</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
</profile>
</profiles>
+ <repositories>
+ <repository>
+ <id>maven-repository2.dev.java.net</id>
+ <
name>Java.net Repository for Maven 2</name>
+ <
url>http://download.java.net/maven/2</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
</project>
Added: root/tests/metamer/trunk/readme.txt
===================================================================
--- root/tests/metamer/trunk/readme.txt (rev 0)
+++ root/tests/metamer/trunk/readme.txt 2010-07-10 18:42:25 UTC (rev 17827)
@@ -0,0 +1,48 @@
+Testapp is an application intended to test all RichFaces components on their own, inside
other JSF components and in various environments. It contains set of small use-cases
implemented using RichFaces components.
+
+
+1 Building and Running the application
+
+
+1.1. Requirements
+
+- Maven 2.1.0 or later
+- Tomcat 6, JBoss 6
+- JDK 1.6
+
+1.2 Optional Additional Software
+- Eclipse IDE + JBoss Tools (to explore and run the application in IDE).
+- You're free to use any other IDE also but we haven't tested an application in
other environments.
+
+
+1.3 Building the application for Tomcat
+
+To build a binary for Tomcat, you need to run
+
+ mvn clean package
+
+When you see the BUILD SUCCESSFUL message you can deploy the application on the server.
You can deploy it on the server by copying .war file from 'target' folder to
+the TOMCAT_HOME/webapps folder. Then, launch the startup.sh or startup.bat script from
TOMCAT_HOME/bin/ directory to start the server.
+
+
+1.4 Building the application for JEE6 containers
+
+To build a binary for JEE6 container, run
+
+ mvn clean package -P jee6
+
+When you see the BUILD SUCCESSFUL message you can deploy the application on the server.
You can deploy it on the server by copying .war file from 'target' folder to
+the JBOSS_HOME/server/default/deploy folder. Then, launch the run.sh or run.bat script
from JBOSS_HOME/bin/ directory to start the server.
+
+
+1.5 Building and running from Eclipse IDE
+
+In order to explore, run and deploy the application in Eclipse IDE you can use one of the
following options:
+
+ * Just import as maven project if using m2eclipse plugin.
+
+ * without m2eclipse - build it with the following command and import as an existing
project.
+
+ mvn clean install eclipse:clean eclipse:eclipse
+
+
Modified: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/Attributes.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/Attributes.java 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/Attributes.java 2010-07-10
18:42:25 UTC (rev 17827)
@@ -43,7 +43,8 @@
import javax.el.ExpressionFactory;
import javax.el.MethodExpression;
import javax.faces.bean.ManagedBean;
-import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.BehaviorBase;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
@@ -57,7 +58,7 @@
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
-public class Attributes implements Map<String, Object> {
+public final class Attributes implements Map<String, Object> {
private Logger logger;
// K - name of a component attribute, V - value of the component attribute
@@ -79,7 +80,7 @@
* @param beanClass
* class object of a managed bean
*/
- public Attributes(Class<? extends UIComponentBase> componentClass,
Class<?> beanClass) {
+ private Attributes(Class<?> componentClass, Class<?> beanClass) {
logger = LoggerFactory.getLogger(Attributes.class);
logger.info("creating attributes map for " + componentClass);
@@ -114,6 +115,30 @@
}
/**
+ * Constructor for class Attributes.
+ *
+ * @param componentClass
+ * class object of a JSF component whose attributes will be stored
+ * @param beanClass
+ * class object of a managed bean
+ */
+ public static Attributes getUIComponentAttributes(Class<? extends UIComponent>
componentClass, Class<?> beanClass) {
+ return new Attributes(componentClass, beanClass);
+ }
+
+ /**
+ * Constructor for class Attributes.
+ *
+ * @param behaviorClass
+ * class object of a JSF behavior whose attributes will be stored
+ * @param beanClass
+ * class object of a managed bean
+ */
+ public static Attributes getBehaviorAttributes(Class<? extends BehaviorBase>
behaviorClass, Class<?> beanClass) {
+ return new Attributes(behaviorClass, beanClass);
+ }
+
+ /**
* Loads help.
*
* @return map where key is attribute's name and value is help for this
attribute
@@ -280,6 +305,7 @@
set.add("facets");
set.add("facetsAndChildren");
set.add("family");
+ set.add("hints");
set.add("id");
set.add("inView");
set.add("namingContainer");
@@ -287,6 +313,7 @@
set.add("rendererType");
set.add("rendersChildren");
set.add("resourceBundleMap");
+ set.add("stateHelper");
set.add("transient");
return set;
}
Copied: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JAjaxBean.java
(from rev 17826,
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java)
===================================================================
--- root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JAjaxBean.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JAjaxBean.java 2010-07-10
18:42:25 UTC (rev 17827)
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+
+package org.richfaces.testapp.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import org.ajax4jsf.component.behavior.AjaxBehavior;
+
+import org.richfaces.testapp.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:ajax.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jAjaxBean")
+@SessionScoped
+public class A4JAjaxBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String input;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.info("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getBehaviorAttributes(AjaxBehavior.class, getClass());
+ attributes.put("event", "keyup");
+ attributes.put("render", "output");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component
is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the
component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for input.
+ * @return content of the input field on the page
+ */
+ public String getInput() {
+ return input;
+ }
+
+ /**
+ * Setter for input.
+ * @param input new content of the input field on the page
+ */
+ public void setInput(String input) {
+ this.input = input;
+ }
+}
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java 2010-07-10
18:42:25 UTC (rev 17827)
@@ -60,7 +60,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.info("initializing bean " + getClass().getName());
- attributes = new Attributes(UICommandButton.class, getClass());
+ attributes = Attributes.getUIComponentAttributes(UICommandButton.class,
getClass());
attributes.put("value", "command button");
attributes.put("rendered", "true");
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandLinkBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandLinkBean.java 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandLinkBean.java 2010-07-10
18:42:25 UTC (rev 17827)
@@ -60,7 +60,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.info("initializing bean " + getClass().getName());
- attributes = new Attributes(UICommandLink.class, getClass());
+ attributes = Attributes.getUIComponentAttributes(UICommandLink.class,
getClass());
attributes.put("value", "command link");
attributes.put("rendered", "true");
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java 2010-07-10
18:42:25 UTC (rev 17827)
@@ -19,6 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*******************************************************************************/
+
package org.richfaces.testapp.bean;
import java.io.Serializable;
@@ -56,7 +57,7 @@
logger.info("initializing bean " + getClass().getName());
name = "John";
- attributes = new Attributes(UIAjaxLog.class, getClass());
+ attributes = Attributes.getUIComponentAttributes(UIAjaxLog.class, getClass());
attributes.put("rendered", true);
attributes.put("level", "debug");
}
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JMediaOutputBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JMediaOutputBean.java 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JMediaOutputBean.java 2010-07-10
18:42:25 UTC (rev 17827)
@@ -19,6 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*******************************************************************************/
+
package org.richfaces.testapp.bean;
import java.awt.Color;
@@ -63,7 +64,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.info("initializing bean " + getClass().getName());
- attributes = new Attributes(UIMediaOutput.class, getClass());
+ attributes = Attributes.getUIComponentAttributes(UIMediaOutput.class,
getClass());
}
/**
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java 2010-07-10
18:42:25 UTC (rev 17827)
@@ -60,7 +60,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.info("initializing bean " + getClass().getName());
- attributes = new Attributes(HtmlCommandButton.class, getClass());
+ attributes = Attributes.getUIComponentAttributes(HtmlCommandButton.class,
getClass());
attributes.put("value", "command button");
attributes.put("rendered", "true");
Modified: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java 2010-07-10
18:42:25 UTC (rev 17827)
@@ -87,7 +87,8 @@
private void createComponentsMap() {
components = new TreeMap<String, String>();
-
+
+ components.put("a4jAjax", "A4J Ajax");
components.put("a4jCommandLink", "A4J Command Link");
components.put("a4jCommandButton", "A4J Command Button");
components.put("a4jLog", "A4J Log");
Copied:
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JAjaxBean.properties
(from rev 17826, root/tests/metamer/trunk/src/main/webapp/resources/css/list.css)
===================================================================
Added: root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/input.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/input.xhtml
(rev 0)
+++ root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/input.xhtml 2010-07-10
18:42:25 UTC (rev 17827)
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <h:outputStylesheet library="css"
name="a4jAjax.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <h:inputText id="input"
value="#{a4jAjaxBean.input}">
+ <a4j:ajax id="inputAjax"
bypassUpdates="#{a4jAjaxBean.attributes['bypassUpdates']}"
+ data="#{a4jAjaxBean.attributes['data']}"
+
disabled="#{a4jAjaxBean.attributes['disabled']}"
+ event="keyup"
+
execute="#{a4jAjaxBean.attributes['execute']}"
+
immediate="#{a4jAjaxBean.attributes['immediate']}"
+
limitRender="#{a4jAjaxBean.attributes['limitRender']}"
+
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate']}"
+
onbegin="#{a4jAjaxBean.attributes['onbegin']}"
+
oncomplete="#{a4jAjaxBean.attributes['oncomplete']}"
+
onerror="#{a4jAjaxBean.attributes['onerror']}"
+
onevent="#{a4jAjaxBean.attributes['onevent']}"
+
queueId="#{a4jAjaxBean.attributes['queueId']}"
+ render="#{a4jAjaxBean.attributes['render']}"
+ status="#{a4jAjaxBean.attributes['status']}"
+ />
+ </h:inputText>
+
+ <a4j:outputPanel id="output">
+ <h:outputText value="#{a4jAjaxBean.input}"/>
+ </a4j:outputPanel>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{a4jAjaxBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Copied: root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/list.xhtml (from rev
17826, root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml)
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/list.xhtml
(rev 0)
+++ root/tests/metamer/trunk/src/main/webapp/components/a4jAjax/list.xhtml 2010-07-10
18:42:25 UTC (rev 17827)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
+<h:head>
+ <title>A4J Ajax</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+</h:head>
+
+<h:body>
+
+ <h:outputLink value="input.xhtml" styleClass="link">Input
Text</h:outputLink>
+ <div class="description">Simple page that contains h:inputText with
a4j:ajax and input boxes for all its attributes.</div>
+
+</h:body>
+</html>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/list.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/list.xhtml 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/list.xhtml 2010-07-10
18:42:25 UTC (rev 17827)
@@ -11,8 +11,8 @@
<h:body>
- <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
- <div>Simple page that contains ajax command button and input boxes for all
its attributes.</div>
+ <h:outputLink value="simple.xhtml"
styleClass="link">Simple</h:outputLink>
+ <div class="description">Simple page that contains ajax command
button and input boxes for all its attributes.</div>
</h:body>
</html>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml 2010-07-10
18:42:25 UTC (rev 17827)
@@ -10,8 +10,8 @@
<h:body>
- <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
- <div>Simple page that contains ajax command link and input boxes for all
its attributes.</div>
+ <h:outputLink value="simple.xhtml"
styleClass="link">Simple</h:outputLink>
+ <div class="description">Simple page that contains ajax command
link and input boxes for all its attributes.</div>
</h:body>
</html>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml 2010-07-10
18:31:32 UTC (rev 17826)
+++ root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml 2010-07-10
18:42:25 UTC (rev 17827)
@@ -10,8 +10,8 @@
<h:body>
- <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
- <div>Simple page that contains log and input boxes for all its
attributes.</div>
+ <h:outputLink value="simple.xhtml"
styleClass="link">Simple</h:outputLink>
+ <div class="description">Simple page that contains log and input
boxes for all its attributes.</div>
</h:body>
</html>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/list.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/list.xhtml 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/list.xhtml 2010-07-10
18:42:25 UTC (rev 17827)
@@ -10,10 +10,10 @@
<h:body>
- <h3><h:outputLink
value="image.xhtml">Image</h:outputLink></h3>
- <div>Simple page that contains media output (image) and input boxes for all its
attributes.</div>
+ <h:outputLink value="image.xhtml"
styleClass="link">Image</h:outputLink>
+ <div class="description">Simple page that contains media output
(image) and input boxes for all its attributes.</div>
- <h3><h:outputLink
value="flash.xhtml">Flash</h:outputLink></h3>
- <div>Simple page that contains media output (flash) and input boxes for all its
attributes.</div>
+ <h:outputLink value="flash.xhtml"
styleClass="link">Flash</h:outputLink>
+ <div class="description">Simple page that contains media output
(flash) and input boxes for all its attributes.</div>
</h:body>
</html>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/components/commandButton/list.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/commandButton/list.xhtml 2010-07-10
18:31:32 UTC (rev 17826)
+++
root/tests/metamer/trunk/src/main/webapp/components/commandButton/list.xhtml 2010-07-10
18:42:25 UTC (rev 17827)
@@ -11,8 +11,8 @@
<h:body>
- <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
- <div>Simple page that contains standard JSF command button and input boxes
for all its attributes.</div>
+ <h:outputLink value="simple.xhtml"
styleClass="link">Simple</h:outputLink>
+ <div class="description">Simple page that contains standard JSF
command button and input boxes for all its attributes.</div>
</h:body>
</html>
\ No newline at end of file
Copied: root/tests/metamer/trunk/src/main/webapp/resources/css/a4jAjax.css (from rev
17826, root/tests/metamer/trunk/src/main/webapp/resources/css/list.css)
===================================================================
Modified: root/tests/metamer/trunk/src/main/webapp/resources/css/list.css
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/resources/css/list.css 2010-07-10 18:31:32
UTC (rev 17826)
+++ root/tests/metamer/trunk/src/main/webapp/resources/css/list.css 2010-07-10 18:42:25
UTC (rev 17827)
@@ -0,0 +1,9 @@
+.link {
+ font-size: 16px;
+ font-weight: bold;
+}
+
+.description {
+ padding-top: 5px;
+ padding-bottom: 15px;
+}
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/templates/template.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/templates/template.xhtml 2010-07-10 18:31:32
UTC (rev 17826)
+++ root/tests/metamer/trunk/src/main/webapp/templates/template.xhtml 2010-07-10 18:42:25
UTC (rev 17827)
@@ -7,19 +7,15 @@
<meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
<h:outputStylesheet library="css" name="common.css" />
<ui:insert name="head"/>
- <script type="text/javascript">A4J.AJAX.onExpired = function(loc,
expiredMsg){
-
- if(window.confirm("Custom onExpired handler "+expiredMsg+" for a
location: "+loc)){
-
- return loc;
-
- } else {
-
- return false;
-
- }
-
-}</script>
+ <script type="text/javascript">
+ RichFaces.ajax.onExpired = function(loc, expiredMsg){
+ if(window.confirm("Custom onExpired handler "+expiredMsg+" for
a location: "+loc)){
+ return loc;
+ } else {
+ return false;
+ }
+ }
+ </script>
</h:head>
<h:body>