Author: alexsmirnov
Date: 2007-06-29 16:20:22 -0400 (Fri, 29 Jun 2007)
New Revision: 1424
Added:
branches/refactor1/samples/seamIntegration/
branches/refactor1/samples/seamIntegration/.exadelproject
branches/refactor1/samples/seamIntegration/pom.xml
branches/refactor1/samples/seamIntegration/src/
branches/refactor1/samples/seamIntegration/src/main/
branches/refactor1/samples/seamIntegration/src/main/java/
branches/refactor1/samples/seamIntegration/src/main/java/org/
branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/
branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java
branches/refactor1/samples/seamIntegration/src/main/resources/
branches/refactor1/samples/seamIntegration/src/main/resources/hibernate.cfg.xml
branches/refactor1/samples/seamIntegration/src/main/resources/import.sql
branches/refactor1/samples/seamIntegration/src/main/resources/logging.properties
branches/refactor1/samples/seamIntegration/src/main/resources/seam.properties
branches/refactor1/samples/seamIntegration/src/main/webapp/
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml.l4t
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
branches/refactor1/samples/seamIntegration/src/main/webapp/index.jsp
branches/refactor1/samples/seamIntegration/src/main/webapp/pages/
branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.jsp
branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml
branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
branches/refactor1/samples/seamIntegration/src/test/
branches/refactor1/samples/seamIntegration/src/test/java/
branches/refactor1/samples/seamIntegration/src/test/java/org/
branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/
branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/BeanTest.java
branches/refactor1/samples/tomahawkCompability/
branches/refactor1/samples/tomahawkCompability/.exadelproject
branches/refactor1/samples/tomahawkCompability/pom.xml
branches/refactor1/samples/tomahawkCompability/src/
branches/refactor1/samples/tomahawkCompability/src/main/
branches/refactor1/samples/tomahawkCompability/src/main/java/
branches/refactor1/samples/tomahawkCompability/src/main/java/org/
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Container.java
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/ControlResultsController.java
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TestTreeModel.java
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TreeBacker.java
branches/refactor1/samples/tomahawkCompability/src/main/resources/
branches/refactor1/samples/tomahawkCompability/src/main/webapp/
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml
branches/refactor1/samples/tomahawkCompability/src/main/webapp/index.jsp
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp
branches/refactor1/samples/tomahawkCompability/src/test/
branches/refactor1/samples/tomahawkCompability/src/test/java/
branches/refactor1/samples/tomahawkCompability/src/test/java/org/
branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/
branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java
branches/refactor1/samples/useCases/
branches/refactor1/samples/useCases/.exadelproject
branches/refactor1/samples/useCases/pom.xml
branches/refactor1/samples/useCases/src/
branches/refactor1/samples/useCases/src/main/
branches/refactor1/samples/useCases/src/main/java/
branches/refactor1/samples/useCases/src/main/java/control/
branches/refactor1/samples/useCases/src/main/java/control/test/
branches/refactor1/samples/useCases/src/main/java/control/test/ControlBackingBean.java
branches/refactor1/samples/useCases/src/main/java/control/test/Data.java
branches/refactor1/samples/useCases/src/main/java/org/
branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/
branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/A4jTestBean.java
branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/Bean.java
branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/MessageBean.java
branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
branches/refactor1/samples/useCases/src/main/resources/
branches/refactor1/samples/useCases/src/main/resources/logging.properties
branches/refactor1/samples/useCases/src/main/webapp/
branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/
branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t
branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml
branches/refactor1/samples/useCases/src/main/webapp/css/
branches/refactor1/samples/useCases/src/main/webapp/css/global.css
branches/refactor1/samples/useCases/src/main/webapp/index.jsp
branches/refactor1/samples/useCases/src/main/webapp/pages/
branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp
branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/index.jsp
branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml
branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml
branches/refactor1/samples/useCases/src/test/
branches/refactor1/samples/useCases/src/test/java/
branches/refactor1/samples/useCases/src/test/java/org/
branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/
branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java
branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/
branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java
Removed:
branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java
Modified:
branches/refactor1/samples/pom.xml
Log:
continue refactoring. Restore core UI sample
Modified: branches/refactor1/samples/pom.xml
===================================================================
--- branches/refactor1/samples/pom.xml 2007-06-29 19:42:46 UTC (rev 1423)
+++ branches/refactor1/samples/pom.xml 2007-06-29 20:20:22 UTC (rev 1424)
@@ -59,11 +59,16 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>ajax4jsf</artifactId>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>impl</artifactId>
<version>3.1.0-SNAPSHOT</version>
</dependency>
<dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>1.1.12</version>
@@ -233,8 +238,8 @@
</build>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>ajax4jsf</artifactId>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>impl</artifactId>
<version>3.1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
@@ -248,6 +253,21 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>${myfaces}</version>
Added: branches/refactor1/samples/seamIntegration/.exadelproject
===================================================================
--- branches/refactor1/samples/seamIntegration/.exadelproject (rev
0)
+++ branches/refactor1/samples/seamIntegration/.exadelproject 2007-06-29 20:20:22 UTC (rev
1424)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="seamIntegration"
ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./src/main/webapp/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder"
LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+ LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../java" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../resources" NAME="src2"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../test/java" NAME="src3"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../../target/classes"
NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.eclipse.project%" NAME="seamIntegration"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml"
SERVLET_VERSION="2.4">
+ <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT"
SRC="src,src2,src3" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: branches/refactor1/samples/seamIntegration/pom.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/pom.xml (rev 0)
+++ branches/refactor1/samples/seamIntegration/pom.xml 2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.ajax4jsf</groupId>
+ <version>1.1.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>seamIntegration</artifactId>
+ <packaging>war</packaging>
+ <name>seamIntegration Maven Webapp</name>
+ <build>
+ <finalName>seamIntegration</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.1.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.2.3.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>seam</artifactId>
+ <version>1.2.1.ga</version>
+ <systemPath>${seamHome}/jboss-seam.jar</systemPath>
+ <scope>system</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>seam-ui</artifactId>
+ <version>1.2.1.ga</version>
+ <systemPath>${seamHome}/jboss-seam-ui.jar</systemPath>
+ <scope>system</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>el-impl</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>1.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,80 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.ajax4jsf;
+
+import java.io.Serializable;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.End;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author $Autor$
+ *
+ */
+@Name("seamBean") @Scope(ScopeType.CONVERSATION) public class Bean implements
Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4209339000953631111L;
+ private String text;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ @Begin
+ public String start() {
+ return "start";
+ }
+
+ @End
+ public String stop() {
+ return "stop";
+ }
+
+ public String clearSession(){
+ ExternalContext externalContext =
FacesContext.getCurrentInstance().getExternalContext();
+ HttpSession session = (HttpSession) externalContext.getSession(false);
+ if(null != session){
+ session.setMaxInactiveInterval(10);
+ }
+ return null;
+ }
+}
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/resources/hibernate.cfg.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/resources/hibernate.cfg.xml
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/main/resources/hibernate.cfg.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,17 @@
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory name="java:/bookingDatabase">
+ <property name="show_sql">false</property>
+ <property
name="connection.datasource">java:/DefaultDS</property>
+ <property name="hbm2ddl.auto">create-drop</property>
+ <property
name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+ <property
name="transaction.flush_before_completion">true</property>
+ <property
name="connection.release_mode">after_statement</property>
+ <property
name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property
name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+
+ </session-factory>
+</hibernate-configuration>
Added: branches/refactor1/samples/seamIntegration/src/main/resources/import.sql
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/resources/import.sql
(rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/resources/import.sql 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,22 @@
+insert into Customer (username, password, name) values ('gavin',
'foobar', 'Gavin King')
+insert into Customer (username, password, name) values ('demo', 'demo',
'Demo User')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (1, 120,
'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta',
'GA', '30305', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (2, 180,
'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA',
'30305', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (3, 450,
'W Hotel', 'Union Square, Manhattan', 'NY', 'NY',
'10011', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (4, 450,
'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY',
'10011', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (5, 250,
'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC',
'20036', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (6, 300,
'70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY',
'10011', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (8, 300,
'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL',
'33131', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (9, 80,
'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire',
'WI', '54703', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (10, 90,
'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau
Claire', 'WI', '54701', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 160,
'Marriot Downtown', '55 Fourth Street', 'San Francisco',
'CA', '94103', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (12, 200,
'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona',
'Catalunya', '08019', 'Spain')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (13, 210,
'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '',
'63405', 'Israel')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (14, 240,
'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo',
'', '105', 'Japan')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (15, 130,
'Hotel Beaulac', ' Esplanade L�opold-Robert 2', 'Neuchatel',
'', '2000', 'Switzerland')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (16, 140,
'Conrad Treasury Place', 'William & George Streets',
'Brisbane', 'QLD', '4001', 'Australia')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (17, 230,
'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal',
'Quebec', 'H3G1H6', 'Canada')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (18, 460,
'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA',
'30326', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (19, 220,
'Swissotel', '68 Market Street', 'Sydney', 'NSW',
'2000', 'Australia')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (20, 250,
'Meli� White House', 'Albany Street', 'Regents Park London',
'', 'NW13UP', 'Great Britain')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 210,
'Hotel Allegro', '171 West Randolph Street', 'Chicago',
'IL', '60601', 'USA')
Added: branches/refactor1/samples/seamIntegration/src/main/resources/logging.properties
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/resources/logging.properties
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/main/resources/logging.properties 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,22 @@
+handlers org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level ALL
+org.apache.juli.FileHandler.directory ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix ajax4jsf.
+
+java.util.logging.ConsoleHandler.level ALL
+java.util.logging.ConsoleHandler.formatter java.util.logging.SimpleFormatter
+
+facelets.level=ALL
+com.sun.faces.level=INFO
+org.apache.myfaces.level=ALL
+org.ajax4jsf.level=ALL
+javax.enterprise.resource.webcontainer.jsf.level=INFO
+com.exadel.level=ALL
+org.jboss.seam.level=FINE
+
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/resources/seam.properties
===================================================================
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components
xmlns="http://jboss.com/products/seam/components"
+
xmlns:core="http://jboss.com/products/seam/core"
+
xmlns:security="http://jboss.com/products/seam/security"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-1.2.xsd
+
http://jboss.com/products/seam/security
http://jboss.com/products/seam/security-1.2.xsd
+
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-1.2.xsd">
+
+ <core:init debug="true" />
+
+ <core:manager conversation-timeout="120000"
+ concurrent-request-timeout="500" conversation-id-parameter="cid"
+ conversation-is-long-running-parameter="clr" />
+ <!--
+ <core:hibernate-session-factory name="hibernateSessionFactory"/>
+ -->
+ <core:microcontainer installed="false" />
+
+</components>
Added:
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <lifecycle>
+ <phase-listener>
+ org.jboss.seam.jsf.SeamPhaseListener
+ </phase-listener>
+ </lifecycle>
+ <application>
+ <!-- el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver-->
+ </application>
+
+</faces-config>
Added:
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
---
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml.l4t
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <listener>
+ <listener-class>
+ org.jboss.seam.servlet.SeamListener
+ </listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>
+ org.jboss.seam.servlet.ResourceServlet
+ </servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/index.jsp
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/index.jsp
(rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/index.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/pages/index.jsf" />
+ </body>
+
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.jsp
(rev 0)
+++ branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/main/webapp/pages/index.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <f:view>
+
+ </f:view>
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
===================================================================
--- branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,37 @@
+<!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:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html">
+ <head><title>Simple repeater in seam</title></head>
+ <body>
+ <h1>Simple ajax repeater</h1>
+ <h:form>
+ <h:panelGrid columns="3" border="1">
+ <h:inputText value="#{seamBean.text}">
+ <a4j:support reRender="out,conversation"
event="onkeyup"></a4j:support>
+ </h:inputText>
+ <h:outputText id="out"
value="#{seamBean.text}"></h:outputText>
+ <h:outputText value="All form submit."></h:outputText>
+ <h:inputText value="#{bean.text}">
+ <a4j:support reRender="out,outs,conversation"
event="onkeyup"></a4j:support>
+ </h:inputText>
+ <h:outputText id="outs"
value="#{bean.text}"></h:outputText>
+ <h:outputText value="AJAX Single submit."></h:outputText>
+ <h:outputText id="conversation" value="Conversation ID:
#{conversation.id}"></h:outputText>
+ <a4j:commandButton action="#{seamBean.start}" value="Start
conversation" reRender="out,conversation"></a4j:commandButton>
+ <a4j:commandButton action="#{seamBean.stop}" value="Stop
conversation" reRender="out,conversation"></a4j:commandButton>
+ </h:panelGrid>
+ <a4j:commandButton action="#{seamBean.clearSession}" value="Set
session expiration to 10 sec"
reRender="out,conversation"></a4j:commandButton>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages></h:messages>
+ </a4j:outputPanel>
+ <a4j:status startText="Request..."
stopText=""></a4j:status>
+ <h2>Non-Ajax conversation</h2>
+ <h:commandButton action="#{seamBean.start}" value="Start
conversation" reRender="out,conversation"></h:commandButton>
+ <h:commandButton action="#{seamBean.stop}" value="Stop
conversation" reRender="out,conversation"></h:commandButton>
+ <h:commandButton value="Refresh"
reRender="out,conversation"></h:commandButton>
+ </h:form>
+ <a4j:log hotkey="M"></a4j:log>
+ </body>
+</html>
Added:
branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/BeanTest.java
===================================================================
--- branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/BeanTest.java
(rev 0)
+++
branches/refactor1/samples/seamIntegration/src/test/java/org/ajax4jsf/BeanTest.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}
Added: branches/refactor1/samples/tomahawkCompability/.exadelproject
===================================================================
--- branches/refactor1/samples/tomahawkCompability/.exadelproject
(rev 0)
+++ branches/refactor1/samples/tomahawkCompability/.exadelproject 2007-06-29 20:20:22 UTC
(rev 1424)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="tomahawkCompability"
ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./src/main/webapp/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder"
LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+ LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../java" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../resources" NAME="src2"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../test/java" NAME="src3"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../../target/classes"
NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.eclipse.project%"
NAME="tomahawkCompability"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml"
SERVLET_VERSION="2.4">
+ <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT"
SRC="src,src2,src3" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: branches/refactor1/samples/tomahawkCompability/pom.xml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/pom.xml (rev
0)
+++ branches/refactor1/samples/tomahawkCompability/pom.xml 2007-06-29 20:20:22 UTC (rev
1424)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<project>
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.ajax4jsf</groupId>
+ <version>1.1.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>tomahawkCompability</artifactId>
+ <packaging>war</packaging>
+ <name>tomahawkCompability Maven Webapp</name>
+ <properties>
+ <tomahawk>1.1.5</tomahawk>
+ </properties>
+ <build>
+ <finalName>tomahawkCompability</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>tomahawk</artifactId>
+ <version>${tomahawk}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added:
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,84 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+ private int counter;
+
+ private List containers ;
+
+ public Bean() {
+ containers = new ArrayList();
+ boolean availible=false;
+ boolean changed=true;
+ for(int i=0;i<10;i++){
+ Container c = new Container();
+ c.setContainerNumber(i);
+ c.setAvailable(availible);
+ c.setChanged(changed);
+ availible = ! availible;
+ changed = ! changed;
+ containers.add(c);
+ }
+ }
+ /**
+ * @return the counter
+ */
+ public int getCounter() {
+ return counter;
+ }
+
+ /**
+ * @param counter the counter to set
+ */
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+
+ public String inc() {
+ counter++;
+ return null;
+ }
+ public String dec() {
+ counter--;
+ return null;
+ }
+ /**
+ * @return the containers
+ */
+ public List getContainers() {
+ return containers;
+ }
+ /**
+ * @param containers the containers to set
+ */
+ public void setContainers(List containers) {
+ this.containers = containers;
+ }
+}
\ No newline at end of file
Added:
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Container.java
===================================================================
---
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Container.java
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Container.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,51 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class Container {
+ private boolean available;
+ private boolean changed;
+ private int containerNumber;
+ /**
+ * @return the available
+ */
+ public boolean isAvailable() {
+ return available;
+ }
+ /**
+ * @param available the available to set
+ */
+ public void setAvailable(boolean available) {
+ this.available = available;
+ }
+ /**
+ * @return the changed
+ */
+ public boolean isChanged() {
+ return changed;
+ }
+ /**
+ * @param changed the changed to set
+ */
+ public void setChanged(boolean changed) {
+ this.changed = changed;
+ }
+ /**
+ * @return the containerNumber
+ */
+ public int getContainerNumber() {
+ return containerNumber;
+ }
+ /**
+ * @param containerNumber the containerNumber to set
+ */
+ public void setContainerNumber(int containerNumber) {
+ this.containerNumber = containerNumber;
+ }
+
+}
Added:
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/ControlResultsController.java
===================================================================
---
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/ControlResultsController.java
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/ControlResultsController.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,24 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import javax.faces.event.ActionEvent;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ControlResultsController {
+ public String addRow() {
+ return null;
+ }
+
+ public String removeElement() {
+ return null;
+ }
+
+ public void updateValue(ActionEvent e) {
+
+ }
+}
Added:
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TestTreeModel.java
===================================================================
---
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TestTreeModel.java
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TestTreeModel.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,88 @@
+package org.ajax4jsf;
+import org.apache.myfaces.custom.tree2.TreeNodeBase;
+
+/**
+ *
+ */
+
+/**
+ * @author asmirnov
+ *
+ */
+public class TestTreeModel extends TreeNodeBase {
+
+ private String url;
+
+ private String target="/xxx";
+ private String description="Node";
+ private boolean urlNode=true;
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8653793302556194481L;
+
+
+ public TestTreeModel() {
+ super();
+ setLeaf(false);
+ setType("desktop");
+ }
+
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * @return the target
+ */
+ public String getTarget() {
+ return target;
+ }
+
+ /**
+ * @param target the target to set
+ */
+ public void setTarget(String target) {
+ this.target = target;
+ }
+
+ /**
+ * @return the url
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ * @param url the url to set
+ */
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ * @return the urlNode
+ */
+ public boolean isUrlNode() {
+ return urlNode;
+ }
+
+ /**
+ * @param urlNode the urlNode to set
+ */
+ public void setUrlNode(boolean urlNode) {
+ this.urlNode = urlNode;
+ }
+
+}
Added:
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TreeBacker.java
===================================================================
---
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TreeBacker.java
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/java/org/ajax4jsf/TreeBacker.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,65 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import javax.faces.component.UIComponent;
+
+import org.apache.myfaces.custom.tree2.TreeModel;
+import org.apache.myfaces.custom.tree2.TreeModelBase;
+import org.apache.myfaces.custom.tree2.TreeNode;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class TreeBacker {
+
+ UIComponent tree;
+
+ TreeModel treeModel;
+
+ /**
+ * @return the tree
+ */
+ public UIComponent getTree() {
+ return tree;
+ }
+
+ /**
+ * @param tree the tree to set
+ */
+ public void setTree(UIComponent tree) {
+ this.tree = tree;
+ }
+
+ /**
+ * @return the treeModel
+ */
+ public TreeModel getTreeModel() {
+ if (treeModel == null) {
+ TreeNode rootNode = new TestTreeModel();
+ for(int i=0;i<5;i++){
+ rootNode.getChildren().add(new TestTreeModel());
+ }
+ treeModel = new TreeModelBase(rootNode );
+ }
+
+ return treeModel;
+ }
+
+ /**
+ * @param treeModel the treeModel to set
+ */
+ public void setTreeModel(TreeModel treeModel) {
+ this.treeModel = treeModel;
+ }
+
+ /**
+ *
+ */
+ public TreeBacker() {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Added:
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>beanB</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>treeBacker</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.TreeBacker</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>controlResultsController</managed-bean-name>
+
<managed-bean-class>org.ajax4jsf.ControlResultsController</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <render-kit>
+ <renderer>
+ <component-family>javax.faces.Form</component-family>
+ <renderer-type>javax.faces.Form</renderer-type>
+
<renderer-class>org.ajax4jsf.renderkit.html.AjaxFormRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>javax.faces.Command</component-family>
+ <renderer-type>javax.faces.Link</renderer-type>
+
<renderer-class>org.ajax4jsf.renderkit.html.HtmlCommandLinkRenderer</renderer-class>
+ </renderer>
+ </render-kit>
+</faces-config>
Added:
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
---
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Added:
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,10 @@
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>
+ org.ajax4jsf:loader=tomahawkCompability
+ <loader-repository-config>
+ java2ParentDelegation=false
+ </loader-repository-config>
+ </loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>MyFacesExtensionsFilter</filter-name>
+
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
+ <init-param>
+ <param-name>maxFileSize</param-name>
+ <param-value>20m</param-value>
+ </init-param>
+ </filter>
+ <!-- extension mapping for adding <script/>, <link/>, and other resource
tags to JSF-pages -->
+ <filter-mapping>
+ <filter-name>MyFacesExtensionsFilter</filter-name>
+ <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry
-->
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <!-- extension mapping for serving page-independent resources (javascript,
stylesheets, images, etc.) -->
+<filter-mapping>
+ <filter-name>MyFacesExtensionsFilter</filter-name>
+ <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
+</filter-mapping><filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/index.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/index.jsp
(rev 0)
+++ branches/refactor1/samples/tomahawkCompability/src/main/webapp/index.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/faces/pages/tabbedPanel.jsp" />
+ </body>
+
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/dataTable.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,61 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"
%>
+<%@ taglib
uri="http://myfaces.apache.org/tomahawk"
prefix="t"%>
+<html>
+ <head>
+ <title>Tomahawk extended data table</title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+<t:dataTable id="containers" value="#{bean.containers}"
+ var="GIContainers" styleClass="normalText" border="1"
+ cellspacing="0" cellpadding="0"
rowIndexVar="rowIndex">
+ <t:column>
+ <f:facet name="header">?????</f:facet>
+
+ <h:inputText id="container"
+ styleClass="#{(GIContainers.available) ? ((GIContainers.changed) ?
'redText' : '') : 'strikeText'}"
+ size="5" maxlength="17"
value="#{GIContainers.containerNumber}">
+ <a4j:support event="onchange" ajaxSingle="true"
+ reRender="containers"
+ actionListener="#{controlResultsController.updateValue}">
+ <a4j:actionparam name="rowIndex" value="#{rowIndex}"
/>
+ <a4j:actionparam name="changeTable" value="containers"
/>
+ </a4j:support>
+ <f:validateLength maximum="17" />
+ </h:inputText>
+ </t:column>
+ <t:column>
+ <f:facet name="header">??? ?? ?????????</f:facet>
+
+ <h:inputText size="5" maxlength="17"
+ styleClass="#{(GIContainers.available) ? ((GIContainers.changed) ?
'redText' : '') : 'strikeText'}"
+ value="#{GIContainers.containerNumber}">
+ <f:validateLength maximum="17" />
+ </h:inputText>
+ </t:column>
+ <t:column>
+ <f:facet name="header">
+ <a4j:commandLink immediate="true"
+ action="#{controlResultsController.addRow}"
+ reRender="containers">
+ <h:graphicImage style="border: none"
value="/images/plus.gif" />
+ <a4j:actionparam name="plusTable"
value="containers"></a4j:actionparam>
+ </a4j:commandLink>
+ </f:facet>
+
+ <a4j:commandLink reRender="containers" immediate="true"
+ style="text-decoration : none"
+ action="#{controlResultsController.removeElement}">
+ <h:graphicImage style="border: none;"
value="/images/minus.gif" />
+ <a4j:actionparam name="rowIndex"
value="#{rowIndex}"></a4j:actionparam>
+ <a4j:actionparam name="minusTable"
value="containers"></a4j:actionparam>
+ </a4j:commandLink>
+ </t:column>
+ </t:dataTable>
+ </h:form>
+ </f:view>
+ </body>
+</html>
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <f:view>
+
+ </f:view>
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/response.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,13 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"
%>
+<html>
+ <head>
+ <title>Response page</title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Added:
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tabbedPanel.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,46 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j"%>
+<%@ taglib
uri="http://myfaces.apache.org/tomahawk"
prefix="t"%>
+<html>
+<head>
+<title>A4J form sample page</title>
+</head>
+<body>
+<h1>Ajax submitted form with Tomahawk components</h1>
+<f:view>
+ <a4j:form id="ajaxform-with-defis" ajaxSubmit="true"
reRender="tabs,counter">
+ <h:panelGrid columns="2" border="1">
+ <h:commandButton action="#{bean.inc}" value="Increment" />
+ <h:commandLink value="Decrement"
action="#{bean.dec}"></h:commandLink>
+ <h:outputText value="Counter:" />
+ <h:outputText id="counter" value="#{bean.counter}" />
+ </h:panelGrid>
+ <h:panelGroup id="tabs">
+ <t:panelTabbedPane serverSideTabSwitch="true">
+ <t:panelTab label="A">
+ <h:inputText id="a" value="First" />
+ <h:outputLabel value="First tab input"
for="a"></h:outputLabel>
+ </t:panelTab>
+ <t:panelTab label="B">
+ <h:inputText id="b" value="First" />
+ <h:outputLabel value="Second tab input"
for="b"></h:outputLabel>
+ </t:panelTab>
+ </t:panelTabbedPane>
+ </h:panelGroup>
+ </a4j:form>
+ <h2>Same form without user-provided ID</h2>
+ <f:subview id="subview">
+ <a4j:form ajaxSubmit="true" reRender="counterB"
onsubmit="alert('onsubmit');">
+ <h:panelGrid columns="2" border="1">
+ <h:commandButton action="#{beanB.inc}" value="Increment" />
+ <h:commandLink value="Decrement"
action="#{beanB.dec}"></h:commandLink>
+ <h:outputText value="Counter:" />
+ <h:outputText id="counterB" value="#{beanB.counter}" />
+ </h:panelGrid>
+ </a4j:form>
+ </f:subview>
+ <a4j:log hotkey="M"/>
+</f:view>
+</body>
+</html>
Added: branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp
===================================================================
--- branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/main/webapp/pages/tree2.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,37 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j"%>
+<%@ taglib
uri="http://myfaces.apache.org/tomahawk"
prefix="t"%>
+
+<html>
+<head>
+<title>Response page</title>
+</head>
+<body>
+<f:view>
+ <a4j:form id="menuForm" ajaxSubmit="true"
requestDelay="100"
+ reRender="treePanel" ignoreDupResponses="true">
+ <a4j:log hotkey="M" popup="true" level="ALL" />
+ <a4j:outputPanel ajaxRendered="true" layout="inline"
id="treePanel">
+ <t:tree2 binding="#{treeBacker.tree}" id="serverTree"
+ showRootNode="true" showNav="true"
value="#{treeBacker.treeModel}"
+ var="node" varNodeToggler="t"
clientSideToggle="false">
+ <f:facet name="desktop">
+ <h:panelGroup>
+ <t:graphicImage value="/resources/images/desktop.png"
border="0" />
+ <a4j:commandLink rendered="#{node.urlNode}"
+ styleClass="#{t.nodeSelected ? 'nodeSelected':'node'}"
+ actionListener="#{t.setNodeSelected}">
+ <h:outputLink value="#{node.url}"
target="#{node.target}">
+ <h:outputText value="#{node.description}"
+ styleClass="nodeFolder" />
+ </h:outputLink>
+ </a4j:commandLink>
+ </h:panelGroup>
+ </f:facet>
+ </t:tree2>
+ </a4j:outputPanel>
+ </a4j:form>
+</f:view>
+</body>
+</html>
Added:
branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java
===================================================================
---
branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java
(rev 0)
+++
branches/refactor1/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}
Added: branches/refactor1/samples/useCases/.exadelproject
===================================================================
--- branches/refactor1/samples/useCases/.exadelproject (rev 0)
+++ branches/refactor1/samples/useCases/.exadelproject 2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="useCases" ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./src/main/webapp/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder"
LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+ LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../java" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../resources" NAME="src2"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../test/java" NAME="src3"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../../target/classes"
NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.eclipse.project%" NAME="useCases"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml"
SERVLET_VERSION="2.4">
+ <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT"
SRC="src,src2,src3" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: branches/refactor1/samples/useCases/pom.xml
===================================================================
--- branches/refactor1/samples/useCases/pom.xml (rev 0)
+++ branches/refactor1/samples/useCases/pom.xml 2007-06-29 20:20:22 UTC (rev 1424)
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>useCases</artifactId>
+ <packaging>war</packaging>
+ <name>useCases Maven Webapp</name>
+ <build>
+ <finalName>useCases</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>com.uwyn</groupId>
+ <artifactId>jhighlight</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added:
branches/refactor1/samples/useCases/src/main/java/control/test/ControlBackingBean.java
===================================================================
---
branches/refactor1/samples/useCases/src/main/java/control/test/ControlBackingBean.java
(rev 0)
+++
branches/refactor1/samples/useCases/src/main/java/control/test/ControlBackingBean.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,141 @@
+/*
+ * ControlBackingBean.java
+ *
+ * Created on May 2, 2007, 2:00 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package control.test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.faces.event.ActionEvent;
+import org.ajax4jsf.ajax.html.HtmlAjaxRepeat;
+
+/**
+ *
+ * @author Administrador
+ */
+public class ControlBackingBean {
+
+ private List<Data> companyData;
+
+ private List<Data> agencyData;
+
+ private List<Data> selectData;
+
+ private Data selectedCompany;
+
+ private Data selectedAgency;
+
+ private HtmlAjaxRepeat selectDataList = new HtmlAjaxRepeat();
+
+ private Set<Integer> keys;
+
+ /** Creates a new instance of ControlBackingBean */
+ public ControlBackingBean() {
+ setCompanyData(new ArrayList<Data>());
+ getCompanyData().add(new Data("01","Company 01"));
+ getCompanyData().add(new Data("02","Company 02"));
+ getCompanyData().add(new Data("03","Company 03"));
+
+ setSelectedCompany(getCompanyData().get(0));
+
+ setAgencyData(new ArrayList<Data>());
+ getAgencyData().add(new Data("04","Agency 01"));
+ getAgencyData().add(new Data("05","Agency 02"));
+ getAgencyData().add(new Data("06","Agency 03"));
+
+ setSelectedAgency(getAgencyData().get(0));
+ }
+
+ public String commandAction() {
+ System.out.println("<<< commandAction >>>");
+ return null;
+ }
+
+ public void commandActionListener(ActionEvent event) {
+ setSelectData(new ArrayList<Data>());
+ setKeys(new HashSet<Integer>());
+ String component = event.getComponent().getId();
+ if (component.indexOf("company") >= 0) {
+ setSelectData(this.companyData);
+ } else {
+ setSelectData(this.agencyData);
+ }
+
+ for (int i=0; i < getSelectData().size(); i++) {
+ getKeys().add(i);
+ }
+ }
+
+ public String selectAction() {
+ System.out.println("<<< selectAction >>>");
+ return null;
+ }
+
+ public void selectActionListener(ActionEvent event) {
+ System.out.println("<<< selectActionListener >>>");
+ }
+
+ public List<Data> getCompanyData() {
+ return companyData;
+ }
+
+ public void setCompanyData(List<Data> companyData) {
+ this.companyData = companyData;
+ }
+
+ public List<Data> getAgencyData() {
+ return agencyData;
+ }
+
+ public void setAgencyData(List<Data> agencyData) {
+ this.agencyData = agencyData;
+ }
+
+ public Data getSelectedCompany() {
+ return selectedCompany;
+ }
+
+ public void setSelectedCompany(Data selectedCompany) {
+ this.selectedCompany = selectedCompany;
+ }
+
+ public Data getSelectedAgency() {
+ return selectedAgency;
+ }
+
+ public void setSelectedAgency(Data selectedAgency) {
+ this.selectedAgency = selectedAgency;
+ }
+
+ public HtmlAjaxRepeat getSelectDataList() {
+ return selectDataList;
+ }
+
+ public void setSelectDataList(HtmlAjaxRepeat selectDataList) {
+ this.selectDataList = selectDataList;
+ }
+
+ public Set<Integer> getKeys() {
+ return keys;
+ }
+
+ public void setKeys(Set<Integer> keys) {
+ this.keys = keys;
+ }
+
+ public List<Data> getSelectData() {
+ return selectData;
+ }
+
+ public void setSelectData(List<Data> selectData) {
+ this.selectData = selectData;
+ }
+
+}
Added: branches/refactor1/samples/useCases/src/main/java/control/test/Data.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/control/test/Data.java
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/control/test/Data.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,44 @@
+/*
+ * Data.java
+ *
+ * Created on May 2, 2007, 1:57 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package control.test;
+
+/**
+ *
+ * @author Administrador
+ */
+public class Data {
+
+ private String code;
+ private String desc;
+
+ public Data(String code, String desc) {
+ this.code = code;
+ this.desc = desc;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ public void setDesc(String desc) {
+ this.desc = desc;
+ }
+
+
+
+}
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/A4jTestBean.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/A4jTestBean.java
(rev 0)
+++
branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/A4jTestBean.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,45 @@
+package org.ajax4jsf;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+public class A4jTestBean {
+
+ private String param = "Not set yet";
+ private boolean checked;
+
+ public String getParam() {
+ return param;
+ }
+
+ public void setParam(String param) {
+ this.param = param;
+ }
+
+ private void checkMap() {
+ Map<String, String> params =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ for (String key : params.keySet()) {
+ System.out.println(key + "=" + params.get(key));
+ }
+ }
+
+ public void perform(ActionEvent actionEvent) {
+ System.out.println("A4jTestBean.perform(ActionEvent) = " + param);
+ checkMap();
+ }
+
+ public void perform() {
+ System.out.println("A4jTestBean.perform() = " + param);
+ checkMap();
+ }
+
+ public boolean isChecked() {
+ return checked;
+ }
+
+ public void setChecked(boolean checked) {
+ this.checked = checked;
+ }
+}
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/Bean.java
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/Bean.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,153 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.ajax4jsf;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+ private java.lang.String text;
+
+ private String text2;
+
+ private String[] array = {"one]","two]]>"};
+
+ private String[][] array2 =
{{"one","two"},{"three","four"}};
+
+ public java.lang.String getText() {
+ return text;
+ }
+
+ public void setText(java.lang.String text) {
+ this.text = text;
+ }
+
+ public String ok(){
+ System.out.println("Button pressed");
+ return null;
+ }
+
+ public String setCookie() {
+ ExternalContext externalContext =
FacesContext.getCurrentInstance().getExternalContext();
+ HttpServletResponse response = (HttpServletResponse)
externalContext.getResponse();
+ Cookie cookie = new Cookie("test", "Setted at time
"+System.currentTimeMillis());
+ cookie.setMaxAge(60 * 60 * 24 * 365);
+ response.addCookie(cookie);
+ return "verify_cookie";
+ }
+
+ public String getTestCookie(){
+ ExternalContext externalContext =
FacesContext.getCurrentInstance().getExternalContext();
+ HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
+ Cookie[] cookies = request.getCookies();
+ for (int i = 0; i < cookies.length; i++) {
+ if("test".equals(cookies[i].getName())){
+ return cookies[i].getValue();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @return the array
+ */
+ public String[] getArray() {
+ return array;
+ }
+
+ /**
+ * @param array the array to set
+ */
+ public void setArray(String[] array) {
+ this.array = array;
+ }
+
+ /**
+ * @return the array2
+ */
+ public String[][] getArray2() {
+ return array2;
+ }
+
+ /**
+ * @param array2 the array2 to set
+ */
+ public void setArray2(String[][] array2) {
+ this.array2 = array2;
+ }
+
+ /**
+ * @return the text2
+ */
+ public String getText2() {
+ return text2;
+ }
+
+ /**
+ * @param text2 the text2 to set
+ */
+ public void setText2(String test2) {
+ this.text2 = test2;
+ }
+
+ public void validate(FacesContext context, UIComponent input,Object newValue) {
+ FacesMessage msg = new FacesMessage("#{bean.validate} called");
+ context.addMessage(input.getClientId(context), msg);
+ System.out.println("validate");
+ }
+
+ public void onChange(ValueChangeEvent event) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ UIComponent input = event.getComponent();
+ FacesMessage msg = new FacesMessage("#{bean.onChange} called");
+ context.addMessage(input.getClientId(context), msg);
+ System.out.println("onChange");
+
+ }
+
+ public void validate2(FacesContext context, UIComponent input,Object newValue) {
+ FacesMessage msg = new FacesMessage("#{bean.validate2} called");
+ context.addMessage(input.getClientId(context), msg);
+ System.out.println("validate2");
+
+ }
+
+ public void onChange2(ValueChangeEvent event) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ UIComponent input = event.getComponent();
+ FacesMessage msg = new FacesMessage("#{bean.onChange2} called");
+ context.addMessage(input.getClientId(context), msg);
+ System.out.println("onChange2");
+
+ }
+}
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/MessageBean.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/MessageBean.java
(rev 0)
+++
branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/MessageBean.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,102 @@
+package org.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.EventListener;
+import java.util.EventObject;
+import java.util.List;
+
+import org.ajax4jsf.ajax.PushEventListener;
+
+public class MessageBean implements Runnable {
+
+ private String result;
+
+ private boolean running = true;
+
+ private PushEventListener listener;
+
+ private List messages = new ArrayList(10);
+
+ private int counter = 0;
+
+ public MessageBean() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @return the result
+ */
+ public String getResult() {
+ return result;
+ }
+
+ /**
+ * @param result
+ * the result to set
+ */
+ public void setResult(String result) {
+ this.result = result;
+ }
+
+ public void addListener(EventListener listener) {
+ synchronized (listener) {
+ if (this.listener != listener) {
+ this.listener = (PushEventListener) listener;
+ Thread th = new Thread(this);
+ th.start();
+
+ }
+ }
+ }
+
+ public void run() {
+ try {
+ while (isRunning()) {
+ Thread.sleep(10000);
+ Date current = new Date(System.currentTimeMillis());
+ if(messages.size()>=10){
+ messages.remove(0);
+ }
+ messages.add(messages.size(),String.valueOf(counter++)+" at
"+current.toString());
+ System.out.println("event occurs");
+ synchronized (listener) {
+ listener.onEvent(new EventObject(this));
+ }
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * @return the running
+ */
+ public synchronized boolean isRunning() {
+ return running;
+ }
+
+ /**
+ * @param running
+ * the running to set
+ */
+ public synchronized void setRunning(boolean running) {
+ this.running = running;
+ }
+
+ /**
+ * @return the messages
+ */
+ public List getMessages() {
+ return messages;
+ }
+
+ /**
+ * @param messages the messages to set
+ */
+ public void setMessages(List messages) {
+ this.messages = messages;
+ }
+
+}
Added: branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
===================================================================
--- branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java
(rev 0)
+++
branches/refactor1/samples/useCases/src/main/java/org/ajax4jsf/RepeatData.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class RepeatData {
+
+ private List data;
+
+ public RepeatData() {
+ data = new ArrayList(10);
+ for(int i=0;i<10;i++){
+ Bean bean = new Bean();
+ bean.setText("Row "+i);
+ data.add(bean);
+ }
+ }
+
+ /**
+ * @return the data
+ */
+ public List getData() {
+ return data;
+ }
+
+ /**
+ * @param data the data to set
+ */
+ public void setData(List data) {
+ this.data = data;
+ }
+
+}
Added: branches/refactor1/samples/useCases/src/main/resources/logging.properties
===================================================================
--- branches/refactor1/samples/useCases/src/main/resources/logging.properties
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/resources/logging.properties 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,21 @@
+handlers org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level ALL
+org.apache.juli.FileHandler.directory ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix ajax4jsf.
+
+java.util.logging.ConsoleHandler.level ALL
+java.util.logging.ConsoleHandler.formatter java.util.logging.SimpleFormatter
+
+facelets.level=ALL
+com.sun.faces.level=INFO
+org.apache.myfaces.level=ALL
+org.ajax4jsf.level=ALL
+javax.enterprise.resource.webcontainer.jsf.level=INFO
+com.exadel.level=ALL
+
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>text</property-name>
+ <property-class>java.lang.String</property-class>
+ <null-value/>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>repeatData</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.RepeatData</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>a4jTestBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.A4jTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>messageBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.MessageBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>dataManager</managed-bean-name>
+
<managed-bean-class>control.test.ControlBackingBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>verify_cookie</from-outcome>
+ <to-view-id>/pages/testCookie.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
Added: branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t
(rev 0)
+++
branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess">
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:"
SHAPE="32,17,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules::0"
NAME="item">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="verify_cookie::#pages#testCookie.xhtml" NAME="output"
+ PATH="/pages/testCookie.xhtml"
+ TARGET="rules:#pages#testCookie.xhtml"
TITLE="verify_cookie"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#pages#testCookie.xhtml" PATH="/pages/testCookie.xhtml"
SHAPE="240,33,0,0"/>
+</PROCESS>
Added: branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/WEB-INF/web.xml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.FastFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: branches/refactor1/samples/useCases/src/main/webapp/css/global.css
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/css/global.css
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/css/global.css 2007-06-29 20:20:22
UTC (rev 1424)
@@ -0,0 +1,232 @@
+body {
+ font-family: Verdana;
+ font-size: 10px;
+ padding: 0px;
+ margin: 0px;
+}
+body.appBody {
+ background-color: #FFFFFF;
+ padding-top : 5px;
+ padding-left : 5px;
+ padding-right : 5px;
+ padding-bottom : 5px;
+}
+.normal {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ margin-right : 3px;
+}
+label.normal {
+ font-weight : bold;
+}
+.error {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ color : red;
+}
+label.error {
+ font-weight : bold;
+}
+#navigationHandlerContainer {
+ top: 0px;
+ float: left;
+}
+#navLogoContainer {
+ margin-top: 15px;
+ margin-bottom: 10px;
+ text-align: center;
+}
+#navModuleContainer {
+ margin-left: 2px;
+}
+#navModule {
+ width: 145px;
+ font-size: 10px;
+}
+#navTreeContainer {
+ margin-top: 13px;
+ background-color: #EEEEEE;
+ width: 99%;
+ margin-left: 3px;
+ padding-top: 3px;
+ padding-left: 3px;
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+.navigationRow {
+ display: block;
+ margin-left: inherit;
+ margin-bottom: 2px;
+}
+.navigationBulletCell {
+ width: 13px;
+ float: left;
+ vertical-align: middle;
+}
+.navigationCommandCell {
+ width: auto;
+ vertical-align: middle;
+}
+.navigationChildrenRow {
+ display: none;
+ padding-left: 15px;
+}
+.navigationCommandLink {
+ font-family: Verdana;
+ font-size: 10px;
+ text-decoration: none;
+ color: #003366;
+}
+.navigationCommandLink:hover {
+ color: #000000;
+}
+.navigationCommandParagraph {
+ font-family: Verdana;
+ font-size: 10px;
+ text-decoration: none;
+ color: #003366;
+ cursor: default;
+}
+.navigationSelectedCommandLink {
+ font-family: Verdana;
+ font-size: 10px;
+ text-decoration: none;
+ color: #003366;
+ font-weight: bold;
+ text-decoration: underline;
+}
+.navigationSelectedCommandLink:hover {
+ color: #000000;
+}
+.navigationHandlerImage {
+ border: 0px none #B83638;
+}
+.commandBarIni{
+ float: left;
+}
+#headerLogoContainer {
+ margin-top: 10px;
+ margin-left: 10px;
+ float: left;
+}
+#commandBarContainer {
+ background-image: url(../imgs/commandBarBgr.gif);
+ padding: 0px;
+ margin-top: 0px;
+ width: 300px;
+ height: 43px;
+ float: right;
+}
+.commandIcon {
+ margin-top: 10px;
+ margin-right:5px;
+ float : left;
+}
+.menuTab{
+ width: 100%;
+ height: 19px;
+ background-color: #999999;
+}
+.menuTabCommand {
+ cursor: default;
+}
+.menuTabButton {
+ float: left;
+ height: 19px;
+ margin-right: 4px;
+}
+.menuTabTitle {
+ float:left;
+ color: #FFFFFF;
+ font-weight: bold;
+ padding-left: 3px;
+ padding-top: 3px;
+}
+.menuTabChildrenContainer{
+ display: none;
+ margin-top: 3px;
+ margin-left: 3px;
+}
+fieldset {
+ margin: auto;
+ padding: auto;
+ width: 300px;
+}
+#loginFormContainer {
+ width: 100%;
+ height: 100%;
+ padding-top: 100px;
+ text-align: center;
+}
+.formRow {
+ margin: 5px;
+ display: block;
+}
+.formLabel {
+ text-align: left;
+ width: 150px;
+ float: left;
+}
+.formField {
+}
+#infoBarContainer {
+ float: left;
+ margin-left: 5px;
+ width: 300px;
+ height: 74px;
+ background-image: url(../imgs/infoBarBgr.gif);
+}
+#infoBarContent {
+ padding-top: 10px;
+ padding-left: 5px;
+ float: left;
+ width : 250px;
+}
+.infoBarIni {
+ float : left;
+}
+.infoBarEnd {
+ float : right;
+}
+.headerSelectLink {
+ display:block;
+ color:#FFFFFF;
+ font-weight:bold
+}
+.headerSelectLink:hover {
+ color : #CCCCCC;
+}
+.linePanel {
+ display: inherit;
+ margin-top : 2px;
+}
+/* Rich Panel*/
+.rich-panel {
+ width : 95%;
+ margin-left : auto ;
+ margin-right : auto ;
+}
+.rich-table {
+ width : 100%;
+ margin-left : auto ;
+ margin-right : auto ;
+}
+ background-color : ;
+/* Tables */
+.oddDataTableRow {
+ background-color : #FFFFFF;
+}
+.evenDataTableRow {
+ background-color : #CCCCCC;
+}
+/* Messages */
+.errorMessageStyle {
+ border: 1px solid #000000;
+ background-color: #EE0000;
+ color: #000000;
+}
+.infoMessageStyle {
+ border: 1px solid #000000;
+ background-color: #33FFFF;
+ color: #000000;
+}
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/index.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/index.jsp
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/index.jsp 2007-06-29 20:20:22 UTC
(rev 1424)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/faces/pages/index.jsf" />
+ </body>
+
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/actionparam.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,36 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<body>
+<a4j:outputPanel id="messages">
+ <h:messages />
+</a4j:outputPanel>
+<h:form id="testForm">
+ <h:selectBooleanCheckbox value="#{a4jTestBean.checked}">
+ <a4j:support event="onchange"
actionListener="#{a4jTestBean.perform}"
+ reRender="output, messages">
+ <a4j:actionparam name="param" value="Checkbox clicked"
+ assignTo="#{a4jTestBean.param}" />
+ </a4j:support>
+ </h:selectBooleanCheckbox>
+ <br />
+ <a4j:commandButton limitToList="true" reRender="output,
messages"
+ actionListener="#{a4jTestBean.perform}"
value="a4j:commandButton">
+ <a4j:actionparam name="param" value="Command Button clicked"
+ assignTo="#{a4jTestBean.param}" />
+ </a4j:commandButton>
+ <br />
+ <a4j:outputPanel id="output">
+ <h:outputText value="a4jTestBean.param:
#{a4jTestBean.param}"/>
+ <h:outputText value=" Request parameter 'param':
#{params.param}"/>
+ </a4j:outputPanel>
+ <br />
+ <h:commandButton action="#{a4jTestBean.perform}"
+ value="h:commandButton" />
+</h:form>
+<a4j:log popup="false"></a4j:log>
+</body>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,61 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core">
+<f:view>
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:inputText id="text" value="#{bean.text}"
+ validator="#{bean.validate}"
valueChangeListener="#{bean.onChange}">
+ <a4j:support event="onkeyup"
ajaxSingle="true"></a4j:support>
+ </h:inputText>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:outputText value="#{bean.text}"></h:outputText>
+ <h:message for="text"></h:message>
+ </a4j:outputPanel>
+ <h:inputText id="text2" value="#{bean.text2}"
+ validator="#{bean.validate2}"
+ valueChangeListener="#{bean.onChange2}">
+ <a4j:support event="onkeyup"
ajaxSingle="true"></a4j:support>
+ </h:inputText>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:outputText value="#{bean.text2}"></h:outputText>
+ <h:message for="text2"></h:message>
+ </a4j:outputPanel>
+ </h:panelGrid>
+ <h2>Ajax support with 'ajaxSingle="true"' in
a4j:repeat</h2>
+ <ul>
+ <a4j:repeat value="#{repeatData.data}" var="row">
+ <li><h:inputText id="repeattext" value="#{row.text}"
+ validator="#{bean.validate}"
valueChangeListener="#{bean.onChange}">
+ <a4j:support event="onkeyup"
ajaxSingle="true"></a4j:support>
+ </h:inputText> <a4j:outputPanel ajaxRendered="true">
+ <h:outputText value="#{row.text}"></h:outputText>
+ <h:message for="repeattext"></h:message>
+ </a4j:outputPanel></li>
+ </a4j:repeat>
+ </ul>
+ <h2>Ajax support with 'ajaxSingle="true"' in
h:dataTeble</h2>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:dataTable value="#{repeatData.data}" var="row"
border="1" id="table">
+ <h:column>
+ <h:inputText id="tabletext" value="#{row.text}"
+ validator="#{bean.validate}"
valueChangeListener="#{bean.onChange}">
+ <a4j:support event="onkeyup" ajaxSingle="true"
focus="tabletext"></a4j:support>
+ </h:inputText>
+ </h:column>
+ <h:column>
+ <h:outputText value="#{row.text}"></h:outputText>
+ <h:message for="tabletext"></h:message>
+ </h:column>
+ </h:dataTable>
+ </a4j:outputPanel>
+ <a4j:commandButton value="Ajax Button"></a4j:commandButton>
+ <a4j:commandButton value="Ajax Single Button"
ajaxSingle="true"></a4j:commandButton>
+ </h:form>
+ <a4j:log hotkey="M"></a4j:log>
+</f:view>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/ajaxdata.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,33 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <head>
+ <title>AJAX Data transfer</title>
+ <script type="text/javascript">
+ function inspect(data){
+ LOG.info("Data is "+data);
+ }
+ </script>
+ </head>
+ <body>
+ <f:view>
+ <h1>Sample of the data transfer from server to client</h1>
+ <h:form>
+ <h:panelGrid columns="2">
+ <a4j:commandButton value="Send" oncomplete="inspect(data);"
data="#{bean.array}"></a4j:commandButton>
+ <h:outputText value="Data is String[]"></h:outputText>
+ <a4j:commandButton value="Send" oncomplete="inspect(data);"
data="#{bean.array2}"></a4j:commandButton>
+ <h:outputText value="Data is String[][]"></h:outputText>
+ <a4j:commandButton value="Send" oncomplete="inspect(data);"
data="#{bean}"></a4j:commandButton>
+ <h:outputText value="Data is JavaBean"></h:outputText>
+ </h:panelGrid>
+ </h:form>
+ <a4j:log popup='false' level="INFO"/>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/controls.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,33 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<f:view>
+ <html
xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
+ <a4j:loadStyle src="/css/global.css"/>
+ </head>
+ <body>
+ <a4j:form id="headForm">
+ <div id="infoBarContainer">
+ <div id="infoBarContent">
+ <a4j:outputPanel id="companyOutputPanel"
layout="inline" styleClass="linePanel">
+ <a4j:commandLink id="companyCommandLink"
value="#{dataManager.selectedCompany.desc}"
action="#{dataManager.commandAction}"
actionListener="#{dataManager.commandActionListener}"
reRender="selectPanel" />
+ </a4j:outputPanel>
+ <a4j:outputPanel id="agencyOutputPanel"
layout="inline" styleClass="linePanel">
+ <a4j:commandLink id="agencyCommandLink"
value="#{dataManager.selectedAgency.desc}"
action="#{dataManager.commandAction}"
actionListener="#{dataManager.commandActionListener}"
reRender="selectPanel" />
+ </a4j:outputPanel>
+ </div>
+ </div>
+ <a4j:outputPanel id="selectPanel" layout="block"
style="float:left;margin-top:5px;margin-left:5px;width:200px;">
+ <a4j:repeat id="selectDataList"
binding="#{dataManager.selectDataList}"
value="#{dataManager.selectData}" var="item"
ajaxKeys="#{dataManager.keys}">
+ <a4j:commandLink id="selectCommandLink"
value="#{item.desc}" action="#{dataManager.selectAction}"
actionListener="#{dataManager.selectActionListener}"
reRender="companyOutputPanel,agencyOutputPanel" style="display:block"
/>
+ </a4j:repeat>
+ </a4j:outputPanel>
+ </a4j:form>
+ </body>
+ </html>
+</f:view>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/controls.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core">
+<f:view>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
+ <a4j:loadStyle src="/css/global.css" />
+ <a4j:loadScript src="resource://prototype.js" />
+ </head>
+ <body>
+ <a4j:form id="headForm">
+ <div id="infoBarContainer">
+ <div id="infoBarContent"><a4j:outputPanel
+ id="companyOutputPanel" layout="inline"
styleClass="linePanel">
+ <a4j:commandLink id="companyCommandLink"
+ value="#{dataManager.selectedCompany.desc}"
+ action="#{dataManager.commandAction}"
+ actionListener="#{dataManager.commandActionListener}"
+ reRender="selectPanel,selectTable" />
+ </a4j:outputPanel> <a4j:outputPanel id="agencyOutputPanel"
layout="inline"
+ styleClass="linePanel">
+ <a4j:commandLink id="agencyCommandLink"
+ value="#{dataManager.selectedAgency.desc}"
+ action="#{dataManager.commandAction}"
+ actionListener="#{dataManager.commandActionListener}"
+ reRender="selectPanel,selectTable" />
+ </a4j:outputPanel></div>
+ </div>
+ <a4j:outputPanel id="selectPanel" layout="block"
+ style="float:left;margin-top:5px;margin-left:5px;width:200px;">
+ <a4j:repeat id="selectDataList"
+ binding="#{dataManager.selectDataList}"
+ value="#{dataManager.selectData}" var="item"
+ ajaxKeys="#{dataManager.keys}">
+ <a4j:commandLink id="selectCommandLink" value="#{item.desc}"
+ action="#{dataManager.selectAction}"
+ actionListener="#{dataManager.selectActionListener}"
+ reRender="companyOutputPanel,agencyOutputPanel"
+ style="display:block" />
+ </a4j:repeat>
+ </a4j:outputPanel>
+ <br />
+ <h:dataTable id="selectTable"
+ value="#{dataManager.selectData}" var="item"
+ >
+ <h:column>
+ <h:outputText value="#{item.desc}"/>
+ </h:column>
+ </h:dataTable>
+ </a4j:form>
+ <a4j:log hotkey="M"/>
+ </body>
+</f:view>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/index.jsp
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/index.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/index.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,12 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <f:view>
+
+ </f:view>
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/prependId.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,23 @@
+<!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:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+ <body>
+
+ <h:form id="rgForm2" prependId="false">
+
+ <h:inputText value="#{bean.text}">
+ <a4j:support event="onkeyup" reRender="repeater"
requestDelay="100"/>
+ </h:inputText>
+ <h:outputText id="repeater" value="#{bean.text}"
/>
+ <h:commandButton action="#{bean.ok}"
value="Ok"></h:commandButton>
+ <h:dataTable value="single" var="v">
+ <h:column>
+ <h:commandButton action="#{bean.ok}" value="Ok in
table"></h:commandButton>
+ </h:column>
+ </h:dataTable>
+ </h:form>
+ <a4j:log hotkey="M"></a4j:log>
+ </body>
+ </html>
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/push.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,28 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <body>
+ <f:view>
+ <a4j:push reRender="msg"
eventProducer="#{messageBean.addListener}" interval="3000"/>
+
+ <h:dataTable id="msg" value="#{messageBean.messages}"
var="msg">
+ <f:facet name="header"><h2>Messags :
</h2></f:facet>
+ <h:column>
+ Message :
+ </h:column>
+ <h:column>
+ <h:outputText value="#{msg}"></h:outputText>
+ </h:column>
+ </h:dataTable>
+ <h:form>
+ <a4j:status startText="Request started"
stopText="stop."></a4j:status>
+ </h:form>
+ <a4j:log hotkey="M"></a4j:log>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.jsp 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,20 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j"%>
+<html>
+ <head>
+ <title>Repeater with input components</title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <a4j:repeat value="#{repeatData.data}" var="row">
+ <h:selectBooleanCheckbox selected="true" />
+ <h:inputText value="Text"></h:inputText>
+ <h:inputText value="#{row.text}"></h:inputText>
+ <h:outputText escape="false" value="<br>"
></h:outputText>
+ </a4j:repeat>
+ </h:form>
+ </f:view>
+ </body>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/repeat.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,26 @@
+<!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:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+ <head>
+ <title>Repeater with input components</title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <h:panelGroup id="repeat">
+ <a4j:repeat value="#{repeatData.data}" var="row">
+ <h:selectBooleanCheckbox selected="true" />
+ <h:inputText value="Text"></h:inputText>
+ <h:inputText value="#{row.text}"></h:inputText>
+ <h:outputText escape="false" value="<br />"
></h:outputText>
+ </a4j:repeat>
+ </h:panelGroup>
+ <h:commandButton action="#{bean.ok}"
value="Ok"></h:commandButton>
+ <a4j:commandButton action="#{bean.ok}" value="Ok
ajax" reRender="repeat"></a4j:commandButton>
+
+ </h:form>
+ </f:view>
+ </body>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/setCookie.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,22 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<f:view>
+ <head>
+ <meta http-equiv="content-type" content="text/xhtml;
charset=UTF-8"/>
+ <meta http-equiv="pragma" content="no-cache"/>
+ <meta http-equiv="cache-control" content="no-cache"/>
+ <meta http-equiv="expires" content="0"/>
+ <title>Set Cookie</title>
+ </head>
+ <body>
+ <a4j:form>
+ <a4j:commandButton action="#{bean.setCookie}" value="Set Cookie
by AJAX"/>
+ <h:commandButton action="#{bean.setCookie}" value="Set Cookie
in POST"/>
+ </a4j:form>
+ </body>
+</f:view>
+</html>
Added: branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml
===================================================================
--- branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml
(rev 0)
+++ branches/refactor1/samples/useCases/src/main/webapp/pages/testCookie.xhtml 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,21 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<f:view>
+ <head>
+ <meta http-equiv="content-type" content="text/xhtml;
charset=UTF-8"/>
+ <meta http-equiv="pragma" content="no-cache"/>
+ <meta http-equiv="cache-control" content="no-cache"/>
+ <meta http-equiv="expires" content="0"/>
+ <title>Test Cookie</title>
+ </head>
+ <body>
+ <a4j:form>
+ <h:outputText value="Cookie value: #{bean.testCookie}"/>
+ </a4j:form>
+ </body>
+</f:view>
+</html>
Added: branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java
===================================================================
--- branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java
(rev 0)
+++
branches/refactor1/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}
Deleted: branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java
===================================================================
---
branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java 2007-06-29
19:42:46 UTC (rev 1423)
+++
branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -1,248 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - 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.ajax4jsf.ajax.repeat;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.faces.component.UIColumn;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIData;
-import javax.faces.component.UIInput;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.ajax.repeat.UIRepeat;
-import org.ajax4jsf.renderkit.html.RepeatRenderer;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.ajax4jsf.tests.MockDataModel;
-import org.ajax4jsf.tests.MockUIInputRenderer;
-
-/**
- * @author shura
- *
- */
-public class RepeatTestCase extends AbstractAjax4JsfTestCase {
-
- private UIRepeat repeater;
-
- private UIInput child;
-
- private int childInvoked;
-
- private UIInput facetChild;
-
- private int facetInvoked;
-
- private UIInput childChild;
-
- private int childChildInvoked;
-
- private UIInput childChildFacet;
-
- private int childChildFacetInvoked;
-
- private UIRepeat enclosedRepeater;
- /**
- * @param name
- */
- public RepeatTestCase(String name) {
- super(name);
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
- */
- public void setUp() throws Exception {
- super.setUp();
- // Create mock DataAdaptor and childs.
- repeater = new UIRepeat();
- child = new UIInput(){
- public void processDecodes(FacesContext context) {
- childInvoked++;
- super.processDecodes(context);
- }
- };
- childInvoked = 0;
- child.setId("child");
- repeater.getChildren().add(child);
- facetChild = new UIInput(){
- public void processDecodes(FacesContext context) {
- facetInvoked++;
- super.processDecodes(context);
- }
- };
- facetInvoked = 0;
- facetChild.setId("facetChild");
- repeater.getFacets().put("facet", facetChild);
- childChild = new UIInput(){
- public void processDecodes(FacesContext context) {
- childChildInvoked++;
- super.processDecodes(context);
- }
- };;
- childChildInvoked = 0;
- childChild.setId("childChild");
- child.getChildren().add(childChild);
- childChildFacet = new UIInput(){
- public void processDecodes(FacesContext context) {
- childChildFacetInvoked++;
- super.processDecodes(context);
- }
- };;
- childChildFacetInvoked = 0;
- childChildFacet.setId("childChildFacet");
- childChild.getFacets().put("facet", childChildFacet);
- enclosedRepeater = new UIRepeat();
- renderKit.addRenderer(child.getFamily(), child.getRendererType(), new
MockUIInputRenderer(){
- public void decode(FacesContext context, UIComponent component) {
- super.decode(context, component);
- UIInput input = (UIInput) component;
- String submittedValie =
enclosedRepeater.getRowKey()+":"+repeater.getRowKey();
- input.setSubmittedValue(submittedValie);
- System.out.println("decode component
"+component.getClientId(facesContext)+" with value "+submittedValie);
- }
- });
- renderKit.addRenderer(repeater.getFamily(), repeater.getRendererType(), new
RepeatRenderer());
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
- */
- public void tearDown() throws Exception {
- super.tearDown();
- repeater = null;
- child = null;
- childChild = null;
- childChildFacet = null;
- facetChild = null;
- enclosedRepeater = null;
- }
-
-
- private void createDataTree(){
- enclosedRepeater.setId("data");
- repeater.setId("adaptor");
- repeater.setVar("row");
- ArrayList value = new ArrayList(2);
- value.add("first");
- value.add("second");
- enclosedRepeater.setValue(value);
- enclosedRepeater.setVar("var");
- UIColumn column = new UIColumn();
- enclosedRepeater.getChildren().add(column);
- column.getChildren().add(repeater);
- facesContext.getViewRoot().getChildren().add(enclosedRepeater);
- }
-
- private void printChildMap(Map childrenState){
- System.out.println("{");
- for (Iterator iter = childrenState.keySet().iterator(); iter.hasNext();) {
- Object key = iter.next();
- System.out.println(" "+key+" : "+childrenState.get(key));
- }
- System.out.println("}");
- }
- /**
- * Test method for {@link
javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)}.
- */
- public void testProcessDecodesFacesContext() {
- createDataTree();
- repeater.setValue(new MockDataModel());
-// enclosedRepeater.setValue(new MockDataModel());
- enclosedRepeater.processDecodes(facesContext);
- enclosedRepeater.setRowIndex(1);
- repeater.setRowIndex(1);
- System.out.println("Saved child state for external repeater ");
- printChildMap(enclosedRepeater.getChildState(facesContext));
- System.out.println("Saved child state" );
- printChildMap(repeater.getChildState(facesContext));
- assertEquals("1:1", child.getSubmittedValue());
- }
-
- /**
- * Test method for {@link
javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
- */
- public void testProcessUpdatesFacesContext() {
- createDataTree();
- repeater.setValue(new MockDataModel());
-// enclosedRepeater.setValue(new MockDataModel());
- enclosedRepeater.processDecodes(facesContext);
- enclosedRepeater.processValidators(facesContext);
- enclosedRepeater.processUpdates(facesContext);
- enclosedRepeater.setRowIndex(1);
- repeater.setRowIndex(1);
- assertEquals("1:1", child.getValue());
- enclosedRepeater.setRowIndex(0);
- repeater.setRowIndex(2);
- assertEquals("0:2", child.getValue());
- }
-
- /**
- * Test method for {@link
javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
- */
- public void testProcessValidatorsFacesContext() {
- createDataTree();
- repeater.setValue(new MockDataModel());
-// enclosedRepeater.setValue(new MockDataModel());
- enclosedRepeater.processDecodes(facesContext);
- enclosedRepeater.processValidators(facesContext);
- enclosedRepeater.setRowIndex(1);
- repeater.setRowIndex(1);
- assertEquals("1:1", child.getLocalValue());
- enclosedRepeater.setRowIndex(0);
- repeater.setRowIndex(2);
- assertEquals("0:2", child.getLocalValue());
- }
-
- public void testSetRowIndex() throws Exception {
- createDataTree();
- repeater.setValue(new MockDataModel());
- enclosedRepeater.setRowIndex(1);
- repeater.setRowIndex(1);
- child.setValue("1:1");
- repeater.setRowIndex(-1);
- enclosedRepeater.setRowIndex(-1);
- // -----------------------------
- enclosedRepeater.setRowIndex(0);
- repeater.setRowIndex(2);
- child.setValue("0:2");
- // -----------------------------
- repeater.setRowIndex(-1);
- enclosedRepeater.setRowIndex(-1);
- System.out.println("Saved child state for external repeater ");
- printChildMap(enclosedRepeater.getChildState(facesContext));
- System.out.println("Saved child state" );
- printChildMap(repeater.getChildState(facesContext));
- // -----------------------------
- enclosedRepeater.setRowIndex(1);
- repeater.setRowIndex(1);
- assertEquals("1:1", child.getValue());
- repeater.setRowIndex(-1);
- enclosedRepeater.setRowIndex(-1);
- // -----------------------------
- enclosedRepeater.setRowIndex(0);
- repeater.setRowIndex(2);
- assertEquals("0:2", child.getValue());
-
- }
-}
Copied:
branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java
(from rev 1423,
branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/RepeatTestCase.java)
===================================================================
--- branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java
(rev 0)
+++
branches/refactor1/ui/core/src/test/java/org/ajax4jsf/ajax/repeat/RepeatTestCase.java 2007-06-29
20:20:22 UTC (rev 1424)
@@ -0,0 +1,248 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.ajax4jsf.ajax.repeat;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.repeat.UIRepeat;
+import org.ajax4jsf.renderkit.html.RepeatRenderer;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.tests.MockDataModel;
+import org.ajax4jsf.tests.MockUIInputRenderer;
+
+/**
+ * @author shura
+ *
+ */
+public class RepeatTestCase extends AbstractAjax4JsfTestCase {
+
+ private UIRepeat repeater;
+
+ private UIInput child;
+
+ private int childInvoked;
+
+ private UIInput facetChild;
+
+ private int facetInvoked;
+
+ private UIInput childChild;
+
+ private int childChildInvoked;
+
+ private UIInput childChildFacet;
+
+ private int childChildFacetInvoked;
+
+ private UIRepeat enclosedRepeater;
+ /**
+ * @param name
+ */
+ public RepeatTestCase(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ // Create mock DataAdaptor and childs.
+ repeater = new UIRepeat();
+ child = new UIInput(){
+ public void processDecodes(FacesContext context) {
+ childInvoked++;
+ super.processDecodes(context);
+ }
+ };
+ childInvoked = 0;
+ child.setId("child");
+ repeater.getChildren().add(child);
+ facetChild = new UIInput(){
+ public void processDecodes(FacesContext context) {
+ facetInvoked++;
+ super.processDecodes(context);
+ }
+ };
+ facetInvoked = 0;
+ facetChild.setId("facetChild");
+ repeater.getFacets().put("facet", facetChild);
+ childChild = new UIInput(){
+ public void processDecodes(FacesContext context) {
+ childChildInvoked++;
+ super.processDecodes(context);
+ }
+ };;
+ childChildInvoked = 0;
+ childChild.setId("childChild");
+ child.getChildren().add(childChild);
+ childChildFacet = new UIInput(){
+ public void processDecodes(FacesContext context) {
+ childChildFacetInvoked++;
+ super.processDecodes(context);
+ }
+ };;
+ childChildFacetInvoked = 0;
+ childChildFacet.setId("childChildFacet");
+ childChild.getFacets().put("facet", childChildFacet);
+ enclosedRepeater = new UIRepeat();
+ renderKit.addRenderer(child.getFamily(), child.getRendererType(), new
MockUIInputRenderer(){
+ public void decode(FacesContext context, UIComponent component) {
+ super.decode(context, component);
+ UIInput input = (UIInput) component;
+ String submittedValie =
enclosedRepeater.getRowKey()+":"+repeater.getRowKey();
+ input.setSubmittedValue(submittedValie);
+ System.out.println("decode component
"+component.getClientId(facesContext)+" with value "+submittedValie);
+ }
+ });
+ renderKit.addRenderer(repeater.getFamily(), repeater.getRendererType(), new
RepeatRenderer());
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ repeater = null;
+ child = null;
+ childChild = null;
+ childChildFacet = null;
+ facetChild = null;
+ enclosedRepeater = null;
+ }
+
+
+ private void createDataTree(){
+ enclosedRepeater.setId("data");
+ repeater.setId("adaptor");
+ repeater.setVar("row");
+ ArrayList value = new ArrayList(2);
+ value.add("first");
+ value.add("second");
+ enclosedRepeater.setValue(value);
+ enclosedRepeater.setVar("var");
+ UIColumn column = new UIColumn();
+ enclosedRepeater.getChildren().add(column);
+ column.getChildren().add(repeater);
+ facesContext.getViewRoot().getChildren().add(enclosedRepeater);
+ }
+
+ private void printChildMap(Map childrenState){
+ System.out.println("{");
+ for (Iterator iter = childrenState.keySet().iterator(); iter.hasNext();) {
+ Object key = iter.next();
+ System.out.println(" "+key+" : "+childrenState.get(key));
+ }
+ System.out.println("}");
+ }
+ /**
+ * Test method for {@link
javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)}.
+ */
+ public void testProcessDecodesFacesContext() {
+ createDataTree();
+ repeater.setValue(new MockDataModel());
+// enclosedRepeater.setValue(new MockDataModel());
+ enclosedRepeater.processDecodes(facesContext);
+ enclosedRepeater.setRowIndex(1);
+ repeater.setRowIndex(1);
+ System.out.println("Saved child state for external repeater ");
+ printChildMap(enclosedRepeater.getChildState(facesContext));
+ System.out.println("Saved child state" );
+ printChildMap(repeater.getChildState(facesContext));
+ assertEquals("1:1", child.getSubmittedValue());
+ }
+
+ /**
+ * Test method for {@link
javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
+ */
+ public void testProcessUpdatesFacesContext() {
+ createDataTree();
+ repeater.setValue(new MockDataModel());
+// enclosedRepeater.setValue(new MockDataModel());
+ enclosedRepeater.processDecodes(facesContext);
+ enclosedRepeater.processValidators(facesContext);
+ enclosedRepeater.processUpdates(facesContext);
+ enclosedRepeater.setRowIndex(1);
+ repeater.setRowIndex(1);
+ assertEquals("1:1", child.getValue());
+ enclosedRepeater.setRowIndex(0);
+ repeater.setRowIndex(2);
+ assertEquals("0:2", child.getValue());
+ }
+
+ /**
+ * Test method for {@link
javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
+ */
+ public void testProcessValidatorsFacesContext() {
+ createDataTree();
+ repeater.setValue(new MockDataModel());
+// enclosedRepeater.setValue(new MockDataModel());
+ enclosedRepeater.processDecodes(facesContext);
+ enclosedRepeater.processValidators(facesContext);
+ enclosedRepeater.setRowIndex(1);
+ repeater.setRowIndex(1);
+ assertEquals("1:1", child.getLocalValue());
+ enclosedRepeater.setRowIndex(0);
+ repeater.setRowIndex(2);
+ assertEquals("0:2", child.getLocalValue());
+ }
+
+ public void testSetRowIndex() throws Exception {
+ createDataTree();
+ repeater.setValue(new MockDataModel());
+ enclosedRepeater.setRowIndex(1);
+ repeater.setRowIndex(1);
+ child.setValue("1:1");
+ repeater.setRowIndex(-1);
+ enclosedRepeater.setRowIndex(-1);
+ // -----------------------------
+ enclosedRepeater.setRowIndex(0);
+ repeater.setRowIndex(2);
+ child.setValue("0:2");
+ // -----------------------------
+ repeater.setRowIndex(-1);
+ enclosedRepeater.setRowIndex(-1);
+ System.out.println("Saved child state for external repeater ");
+ printChildMap(enclosedRepeater.getChildState(facesContext));
+ System.out.println("Saved child state" );
+ printChildMap(repeater.getChildState(facesContext));
+ // -----------------------------
+ enclosedRepeater.setRowIndex(1);
+ repeater.setRowIndex(1);
+ assertEquals("1:1", child.getValue());
+ repeater.setRowIndex(-1);
+ enclosedRepeater.setRowIndex(-1);
+ // -----------------------------
+ enclosedRepeater.setRowIndex(0);
+ repeater.setRowIndex(2);
+ assertEquals("0:2", child.getValue());
+
+ }
+}