Author: dsvyatobatsko
Date: 2008-07-17 11:22:39 -0400 (Thu, 17 Jul 2008)
New Revision: 9663
Added:
trunk/test-applications/seam/
trunk/test-applications/seam/hibernate-console.properties
trunk/test-applications/seam/pom.xml
trunk/test-applications/seam/seam.launch
trunk/test-applications/seam/src/
trunk/test-applications/seam/src/main/
trunk/test-applications/seam/src/main/java/
trunk/test-applications/seam/src/main/java/org/
trunk/test-applications/seam/src/main/java/org/domain/
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Authenticator.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Bean.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Data.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/DataBean.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/LengthBean.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MaxBean.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinBean.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinMaxBean.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/ModalPanel.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotEmptyBean.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotNullBean.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SignerManagement.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SortingAndFiltering.java
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Validable.java
trunk/test-applications/seam/src/main/resources/
trunk/test-applications/seam/src/main/resources/META-INF/
trunk/test-applications/seam/src/main/resources/META-INF/orm.xml
trunk/test-applications/seam/src/main/resources/META-INF/persistence.xml
trunk/test-applications/seam/src/main/resources/components.properties
trunk/test-applications/seam/src/main/resources/hibernate.cfg.xml
trunk/test-applications/seam/src/main/resources/import.sql
trunk/test-applications/seam/src/main/resources/logging.properties
trunk/test-applications/seam/src/main/resources/messages_en.properties
trunk/test-applications/seam/src/main/resources/seam-ds.xml
trunk/test-applications/seam/src/main/resources/seam.properties
trunk/test-applications/seam/src/main/resources/security.drl
trunk/test-applications/seam/src/main/webapp/
trunk/test-applications/seam/src/main/webapp/META-INF/
trunk/test-applications/seam/src/main/webapp/META-INF/MANIFEST.MF
trunk/test-applications/seam/src/main/webapp/META-INF/context.xml
trunk/test-applications/seam/src/main/webapp/WEB-INF/
trunk/test-applications/seam/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
trunk/test-applications/seam/src/main/webapp/WEB-INF/components.xml
trunk/test-applications/seam/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seam/src/main/webapp/WEB-INF/jboss-web.xml
trunk/test-applications/seam/src/main/webapp/WEB-INF/pages.xml
trunk/test-applications/seam/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/seam/src/main/webapp/error.xhtml
trunk/test-applications/seam/src/main/webapp/home.xhtml
trunk/test-applications/seam/src/main/webapp/img/
trunk/test-applications/seam/src/main/webapp/img/dtpick.gif
trunk/test-applications/seam/src/main/webapp/img/error.gif
trunk/test-applications/seam/src/main/webapp/include/
trunk/test-applications/seam/src/main/webapp/index.html
trunk/test-applications/seam/src/main/webapp/layout/
trunk/test-applications/seam/src/main/webapp/layout/display.xhtml
trunk/test-applications/seam/src/main/webapp/layout/edit.xhtml
trunk/test-applications/seam/src/main/webapp/layout/menu.xhtml
trunk/test-applications/seam/src/main/webapp/layout/template.xhtml
trunk/test-applications/seam/src/main/webapp/login.page.xml
trunk/test-applications/seam/src/main/webapp/login.xhtml
trunk/test-applications/seam/src/main/webapp/modalPanel.xhtml
trunk/test-applications/seam/src/main/webapp/pages/
trunk/test-applications/seam/src/main/webapp/stylesheet/
trunk/test-applications/seam/src/main/webapp/stylesheet/theme.css
trunk/test-applications/seam/src/main/webapp/validatorFacelets.xhtml
trunk/test-applications/seam/src/main/webapp/validatorJSP.jsp
trunk/test-applications/seam/src/test/
trunk/test-applications/seam/src/test/java/
trunk/test-applications/seam/src/test/java/org/
trunk/test-applications/seam/src/test/java/org/domain/
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.java
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.xml
Log:
seam test project added
Added: trunk/test-applications/seam/hibernate-console.properties
===================================================================
--- trunk/test-applications/seam/hibernate-console.properties (rev
0)
+++ trunk/test-applications/seam/hibernate-console.properties 2008-07-17 15:22:39 UTC (rev
9663)
@@ -0,0 +1,10 @@
+#File used by hibernate tools to override <datasource> and other container specific
settings in persistence.xml
+hibernate.connection.password=
+hibernate.connection.username=sa
+hibernate.connection.driver_class=org.hsqldb.jdbcDriver
+hibernate.dialect=org.hibernate.dialect.HSQLDialect
+hibernate.connection.url=jdbc:hsqldb:.
+
+hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider
+hibernate.datasource=
+hibernate.transaction.manager_lookup_class=
Property changes on: trunk/test-applications/seam/hibernate-console.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/pom.xml
===================================================================
--- trunk/test-applications/seam/pom.xml (rev 0)
+++ trunk/test-applications/seam/pom.xml 2008-07-17 15:22:39 UTC (rev 9663)
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <parent>
+ <artifactId>test-applications</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.2.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.test-applications</groupId>
+ <artifactId>seam</artifactId>
+ <packaging>war</packaging>
+ <name>Seam Test Application</name>
+ <build>
+ <finalName>richfaces-seam-test</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <!--
+ <webResources>
+ <resource>
+ <directory>${seamHome}</directory>
+ <targetPath>WEB-INF/lib</targetPath>
+ <includes>
+ <include>jboss-seam.jar</include>
+ <include>jboss-seam-ui.jar</include>
+ <include>jboss-seam-debug.jar</include>
+ <include>
+ jboss-seam-remoting.jar
+ </include>
+ <include>
+ jboss-seam-pdf.jar
+ </include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${seamHome}/lib</directory>
+ <targetPath>WEB-INF/lib</targetPath>
+ <includes>
+ <include>jboss-el.jar</include>
+ </includes>
+ </resource>
+ </webResources>
+ -->
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.7</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.2</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.3.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>3.0.0.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <version>2.0.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ui</artifactId>
+ <version>2.0.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ioc</artifactId>
+ <version>2.0.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-debug</artifactId>
+ <version>2.0.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.8</version>
+ <scope>test</scope>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.8</version>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/test-applications/seam/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/seam.launch
===================================================================
--- trunk/test-applications/seam/seam.launch (rev 0)
+++ trunk/test-applications/seam/seam.launch 2008-07-17 15:22:39 UTC (rev 9663)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Hibernate Console launch configuration -->
+<launchConfiguration
type="org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType">
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="seam"/>
+<stringAttribute key="org.hibernate.eclipse.launch.PROPERTY_FILE"
value="/seam/hibernate-console.properties"/>
+<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY"
value="JPA"/>
+</launchConfiguration>
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Authenticator.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Authenticator.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Authenticator.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,26 @@
+package org.domain.TestApplication.session;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+
+
+@Name("authenticator")
+public class Authenticator
+{
+ @Logger Log log;
+
+ @In Identity identity;
+
+ public boolean authenticate()
+ {
+ log.info("authenticating #0", identity.getUsername());
+ //write your authentication logic here,
+ //return true if the authentication was
+ //successful, false otherwise
+ identity.addRole("admin");
+ return true;
+ }
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Authenticator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Bean.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Bean.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Bean.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.domain.TestApplication.session;
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Bean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Data.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Data.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Data.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,300 @@
+package org.domain.TestApplication.session;
+
+import java.util.Date;
+import java.util.Random;
+
+public class Data {
+ public static final String[] statusIcon = {"/pics/error.gif",
"/pics/fatal.gif", "/pics/info.gif", "/pics/passed.gif",
"/pics/warn.gif"};
+ public static final String[] status = {"error", "fatal",
"info", "passed", "warn"};
+
+ public static final String[] cityAfrica = {"Africa", "Algeria",
"Angola", "Bassas da India", "Benin", "Botswana",
"Burkina Faso", "Burundi", "Cameroon", "Central African
Republic", "Chad", "Comoros", "Democratic Republic of the
Congo", "Djibouti", "Egypt", "Equatorial Guinea",
"Eritrea", "Ethiopia", "Europa Island", "Gabon",
"Gambia", "Ghana", "Glorioso Islands", "Guinea",
"Guinea-Bissau", "Ivory Coast", "Juan de Nova Island",
"Kenya", "Lesotho", "Liberia", "Libya",
"Madagascar", "Malawi", "Mali", "Mauritania",
"Mauritius Island", "Mayotte", "Morocco",
"Mozambique", "Namibia", "Nigeria", "Republic of the
Congo", "Reunion", "Rwanda", "Niger", "Saint
Helena", "Sao Tome and Principe", "Senegal",
"Seychelles", "Sierra Leone", "Somalia", "South
Africa", "Sudan", "Swaziland", "Tanzania",
"Togo", "Tromelin Island", "Tunisia", "Uganda",
"Western Sahara", "Zambia", "Zimbabwe"};
+ public static final String[] cityAsia = {"Asia", "Afghanistan",
"Armenia", "Azerbaijan", "Bangladesh", "Bhutan",
"China", "Georgia", "India", "Japan",
"Kazakhstan", "Korea, North", "Korea, South",
"Kyrgyzstan", "Maldives", "Mongolia", "Nepal",
"Pakistan", "Russia", "Sri Lanka", "Tajikistan",
"Turkmenistan", "Uzbekistan"};
+ public static final String[] cityCAmerica = {"Central America",
"Belize", "Costa Rica", "El Salvador",
"Guatemala", "Honduras", "Nicaragua", "Panama"};
+ public static final String[] cityEurope = {"Europe", "Albania",
"Andorra", "Austria", "Belarus", "Belgium",
"Bosnia and Herzegovina", "Bulgaria", "Canary Islands",
"Croatia", "Czech Republic", "Denmark", "Estonia",
"Faroe Islands", "Finland", "France", "Germany",
"Gibraltar", "Greece", "Guernsey", "Hungary",
"Iceland", "Ireland", "Isle of Man", "Italy",
"Jersey", "Latvia", "Liechtenstein", "Lithuania",
"Luxembourg", "Macedonia", "Malta", "Moldova",
"Monaco", "Montenegro", "Netherlands", "Norway",
"Poland", "Portugal", "Romania", "San Marino",
"Serbia and Montenegro", "Slovakia", "Slovenia",
"Spain", "Sweden", "Switzerland", "Ukraine",
"United Kingdom", "Vatican The Holy See"};
+ public static final String[] cityMEast = {"Middle East",
"Akrotiri", "Bahrain", "Cyprus", "Dhekelia",
"Gaza Strip", "Iran", "Iraq", "Israel",
"Jordan", "Kuwait", "Lebanon", "Oman",
"Qatar", "Saudi Arabia", "Syria", "Turkey",
"United Arab Emirates", "West Bank", "Yemen"};
+ public static final String[] cityNAmerica = {"North America",
"Bermuda", "Canada", "Greenland", "Mexico",
"Saint Pierre and Miquelon", "United States of America"};
+ public static final String[] cityOceania = {"Oceania", "American
Samoa", "Australia", "Baker Island", "Cook Islands",
"Coral Sea Islands", "Fiji", "French Polynesia",
"Guam", "Howland Island", "Jarvis Island", "Johnston
Atoll", "Kingman Reef", "Kiribati", "Marshall Islands",
"Micronesia", "Midway Islands", "Nauru", "New
Caledonia", "New Zealand", "Niue", "Norfolk Island",
"Northern Mariana Islands", "Palau", "Palmyra Atoll",
"Papua New Guinea", "Pitcairn Islands", "Samoa",
"Solomon Islands", "Tokelau", "Tonga", "Tuvalu",
"Vanuatu", "Wake Island", "Wallis and Futuna"};
+ public static final String[] citySAmerica = {"South
America","Argentina", "Bolivia", "Brazil",
"Chile", "Colombia", "Easter Island", "Ecuador",
"Falkland Islands", "French Guiana", "Guyana",
"Paraguay", "Peru", "Suriname", "Uruguay",
"Venezuela"};
+ public static final String[] citySEAsia = {"SouthEast Asia", "Ashmore
and Cartier Islands", "Brunei", "Burma", "Cambodia",
"Christmas Island", "Cocos (Keeling) Islands", "East Timor",
"Hong Kong", "Indonesia", "Laos", "Malaysia",
"Paracel Islands", "Philippines", "Singapore", "Spratly
Islands", "Taiwan", "Thailand", "Vietnam"};
+ public static final String[] cityCaribbean = {"The Caribbean",
"Anguilla", "Antigua and Barbuda", "Aruba",
"Barbados", "British Virgin Islands", "Cayman Islands",
"Cuba", "Dominica", "Dominican Republic",
"Grenada", "Guadeloupe", "Haiti", "Jamaica",
"Martinique", "Montserrat", "Navassa Island",
"Netherlands Antilles", "Puerto Rico", "Saint Barthelemy",
"Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the
Grenadines", "The Bahamas", "Trinidad and Tobago", "Turks
and Caicos Islands", "Virgin Islands"};
+
+ private String str0;
+ private String str1;
+ private String str2;
+ private String str3;
+ private int int0;
+ private int int1;
+ private int int2;
+ private int int3;
+ private boolean bool0;
+ private boolean bool1;
+ private boolean bool2;
+ private boolean bool3;
+ private float float0;
+ private double double0;
+ private Date date0;
+
+ public Date getDate0() {
+ return date0;
+ }
+
+ public void setDate0(Date date0) {
+ this.date0 = date0;
+ }
+
+ public double getDouble0() {
+ return double0;
+ }
+
+ public void setDouble0(double double0) {
+ this.double0 = double0;
+ }
+
+ public float getFloat0() {
+ return float0;
+ }
+
+ public void setFloat0(float float0) {
+ this.float0 = float0;
+ }
+
+ public Data() {
+ this.str0 = "";
+ this.str1 = "";
+ this.str2 = "";
+ this.str3 = "";
+ this.int0 = 0;
+ this.int1 = 0;
+ this.int2 = 0;
+ this.int3 = 0;
+ this.bool0 = false;
+ this.bool1 = false;
+ this.bool2 = false;
+ this.bool3 = false;
+ this.float0 = 0.0f;
+ this.double0 = 0.0;
+ this.date0 = new Date();
+ }
+
+ public Data(int int0, int int1, String str0, int int2, String str1, int int3, String
str2, String str3, boolean bool0) {
+ this.str0 = str0;
+ this.str1 = str1;
+ this.str2 = str2;
+ this.str3 = str3;
+ this.int0 = int0;
+ this.int1 = int1;
+ this.int2 = int2;
+ this.int3 = int3;
+ this.bool0 = bool0;
+ }
+ public Data(int int0, int int1, String str0, float float0, String str1, int int3, String
str2, String str3, boolean bool0) {
+ this.str0 = str0;
+ this.str1 = str1;
+ this.str2 = str2;
+ this.str3 = str3;
+ this.int0 = int0;
+ this.int1 = int1;
+ this.float0 = float0;
+ this.int3 = int3;
+ this.bool0 = bool0;
+ }
+ public Data(int int0, int int1, String str0, double double0, String str1, int int3,
String str2, String str3, boolean bool0) {
+ this.str0 = str0;
+ this.str1 = str1;
+ this.str2 = str2;
+ this.str3 = str3;
+ this.int0 = int0;
+ this.int1 = int1;
+ this.double0 = double0;
+ this.int3 = int3;
+ this.bool0 = bool0;
+ }
+ public Data(String str0, String str1, String str2, String str3, int int0,
+ int int1, int int2, int int3, boolean bool0, boolean bool1,
+ boolean bool2, boolean bool3) {
+ this.str0 = str0;
+ this.str1 = str1;
+ this.str2 = str2;
+ this.str3 = str3;
+ this.int0 = int0;
+ this.int1 = int1;
+ this.int2 = int2;
+ this.int3 = int3;
+ this.bool0 = bool0;
+ this.bool1 = bool1;
+ this.bool2 = bool2;
+ this.bool3 = bool3;
+ }
+
+ public Data(String str0, String str1, String str2, String str3){
+ this.str0 = str0;
+ this.str1 = str1;
+ this.str2 = str2;
+ this.str3 = str3;
+ }
+
+ public Data(int int0, String str0, String str1, String str2, String str3){
+ this.int0 = int0;
+ this.str0 = str0;
+ this.str1 = str1;
+ this.str2 = str2;
+ this.str3 = str3;
+ }
+ //for scrollableDataTable component
+ public Data(int int0, String str0, String str1, String str2, String str3, Date date0){
+ this.int0 = int0;
+ this.str0 = str0;
+ this.str1 = str1;
+ this.str2 = str2;
+ this.str3 = str3;
+ this.date0 = date0;
+ }
+ public Data(int int0, String str0, String str1, String str2, boolean bool0){
+ this.int0 = int0;
+ this.str0 = str0;
+ this.str1 = str1;
+ this.str2 = str2;
+ this.bool0 = bool0;
+ }
+
+ public Data(String str0){
+ this.str0 = str0;
+ }
+
+ public Data(int int0) {
+ this.int0 = int0;
+ }
+
+ public Data(String str0, String str1){
+ this.str0 = str0;
+ this.str1 = str1;
+ }
+
+ public Data(String str0, int int0){
+ this.str0 = str0;
+ this.int0 = int0;
+ }
+
+ public Data(String str0, int int0, boolean bool0){
+ this.str0 = str0;
+ this.int0 = int0;
+ this.bool0 = bool0;
+ }
+
+ public String getStr0() {
+ return str0;
+ }
+ public void setStr0(String str0) {
+ this.str0 = str0;
+ }
+ public String getStr1() {
+ return str1;
+ }
+ public void setStr1(String str1) {
+ this.str1 = str1;
+ }
+ public String getStr2() {
+ return str2;
+ }
+ public void setStr2(String str2) {
+ this.str2 = str2;
+ }
+ public String getStr3() {
+ return str3;
+ }
+ public void setStr3(String str3) {
+ this.str3 = str3;
+ }
+ public int getInt0() {
+ return int0;
+ }
+ public void setInt0(int int0) {
+ this.int0 = int0;
+ }
+ public int getInt1() {
+ return int1;
+ }
+ public void setInt1(int int1) {
+ this.int1 = int1;
+ }
+ public int getInt2() {
+ return int2;
+ }
+ public void setInt2(int int2) {
+ this.int2 = int2;
+ }
+ public int getInt3() {
+ return int3;
+ }
+ public void setInt3(int int3) {
+ this.int3 = int3;
+ }
+ public boolean isBool0() {
+ return bool0;
+ }
+ public void setBool0(boolean bool0) {
+ this.bool0 = bool0;
+ }
+ public boolean isBool1() {
+ return bool1;
+ }
+ public void setBool1(boolean bool1) {
+ this.bool1 = bool1;
+ }
+ public boolean isBool2() {
+ return bool2;
+ }
+ public void setBool2(boolean bool2) {
+ this.bool2 = bool2;
+ }
+ public boolean isBool3() {
+ return bool3;
+ }
+ public void setBool3(boolean bool3) {
+ this.bool3 = bool3;
+ }
+
+ public static String Random(int size){
+ char [] c = new char[size];
+ for(int i = 0; i < size; i++){
+ c[i] = (char)(new Random().nextInt(25) + 97);
+ }
+ return new String(c);
+ }
+
+ public static String RandomUp(int size){
+ char [] c = new char[size];
+ for(int i = 0; i < size; i++){
+ c[i] = (char)(new Random().nextInt(25) + 65);
+ }
+ return new String(c);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + int0;
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final Data other = (Data) obj;
+ if (int0 != other.int0)
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+
+ return str0 + ":" + str1 + ":" + str2 + ":" + str3 +
":" + int0 + ":" + int1 + ":" + int2 + ":" + int3
+ ":" + bool0 + ":" + bool1 + ":" + bool2 + ":" +
bool3;
+ }
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Data.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/DataBean.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/DataBean.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/DataBean.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,49 @@
+/**
+ *
+ */
+package org.domain.TestApplication.session;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Valid;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class DataBean {
+
+ private final List<Validable> beans;
+
+ /**
+ * @return the beans
+ */
+ @Valid
+ public List<Validable> getBeans() {
+ return beans;
+ }
+
+ public DataBean() {
+ beans = new ArrayList<Validable>(6);
+ beans.add(new NotNullBean());
+ beans.add(new NotEmptyBean());
+ beans.add(new LengthBean());
+ beans.add(new MinBean());
+ beans.add(new MaxBean());
+ beans.add(new MinMaxBean());
+ }
+
+ @Max(value=20,message="Total value should be less then 20")
+ public int getTotal(){
+ int total = 0;
+ for (Validable bean : beans) {
+ total += bean.getIntValue();
+ }
+ return total;
+ }
+
+
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/DataBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/LengthBean.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/LengthBean.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/LengthBean.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,56 @@
+/**
+ *
+ */
+package org.domain.TestApplication.session;
+
+import org.hibernate.validator.Length;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class LengthBean implements Validable {
+
+ @Length(max=10,min=2,message="incorrect field length")
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Validate String Length, for a range 2-10 chars";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/LengthBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MaxBean.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MaxBean.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MaxBean.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,56 @@
+/**
+ *
+ */
+package org.domain.TestApplication.session;
+
+import org.hibernate.validator.Max;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MaxBean implements Validable {
+
+ private String text;
+
+ @Max(10)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, less then 10";
+ }
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MaxBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinBean.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinBean.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinBean.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,56 @@
+/**
+ *
+ */
+package org.domain.TestApplication.session;
+
+import org.hibernate.validator.Min;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MinBean implements Validable {
+
+ private String text;
+
+ @Min(2)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, more then 1";
+ }
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinMaxBean.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinMaxBean.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinMaxBean.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,58 @@
+/**
+ *
+ */
+package org.domain.TestApplication.session;
+
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Min;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MinMaxBean implements Validable {
+
+ private String text;
+
+ @Min(2)
+ @Max(10)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text Value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, valid values from 2 to 10";
+ }
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/MinMaxBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/ModalPanel.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/ModalPanel.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/ModalPanel.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,66 @@
+package org.domain.TestApplication.session;
+
+import java.util.ArrayList;
+
+import org.hibernate.validator.Length;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.log.Log;
+
+@Name("modalPanel")
+public class ModalPanel {
+
+ @Logger private Log log;
+
+ @In FacesMessages facesMessages;
+
+ private ArrayList<Integer> pieData1 = new ArrayList<Integer>();
+ private ArrayList<String> pieData2 = new ArrayList<String>();
+ private String value;
+
+ public ModalPanel() {
+ for (int i = 0; i < 3; i++) {
+ pieData1.add(i);
+ pieData2.add("data1 " + i);
+ }
+ }
+
+ public void modalPanel()
+ {
+ //implement your business logic here
+ log.info("modalPanel.modalPanel() action called with: #{modalPanel.value}");
+ facesMessages.add("modalPanel #{modalPanel.value}");
+ }
+
+ //add additional action methods
+
+ @Length(max=10)
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ public ArrayList<Integer> getPieData1() {
+ return pieData1;
+ }
+
+ public void setPieData1(ArrayList<Integer> pieData1) {
+ this.pieData1 = pieData1;
+ }
+
+ public ArrayList<String> getPieData2() {
+ return pieData2;
+ }
+
+ public void setPieData2(ArrayList<String> pieData2) {
+ this.pieData2 = pieData2;
+ }
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/ModalPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotEmptyBean.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotEmptyBean.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotEmptyBean.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,56 @@
+/**
+ *
+ */
+package org.domain.TestApplication.session;
+
+import org.hibernate.validator.NotEmpty;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class NotEmptyBean implements Validable {
+
+ @NotEmpty
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, Not Empty Validation";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotEmptyBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotNullBean.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotNullBean.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotNullBean.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,56 @@
+/**
+ *
+ */
+package org.domain.TestApplication.session;
+
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class NotNullBean implements Validable {
+
+ @NotNull
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text Value, Not Null Validation";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/NotNullBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SignerManagement.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SignerManagement.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SignerManagement.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,210 @@
+package org.domain.TestApplication.session;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Random;
+import javax.faces.model.ListDataModel;
+import org.richfaces.model.Ordering;
+import org.richfaces.component.html.HtmlDataTable;
+
+import org.richfaces.event.UploadEvent;
+
+public class SignerManagement {
+ private ArrayList<Data> data;
+ private String sortMode;
+ private boolean selfSorted;
+ private boolean sortable;
+ private String sortExpression;
+ private Ordering sortOrder;
+ private String currentSortOrder;
+ private String filterInput;
+ private String filterValue;
+ private boolean rendered;
+ private ListDataModel dataModel;
+ private HtmlDataTable myDataTable = new HtmlDataTable();
+ private Data selectedItem;
+
+ public SignerManagement(){
+ filterValue = "";
+ filterInput = "";
+ data = new ArrayList<Data>();
+ sortMode = "single";
+ sortOrder = Ordering.ASCENDING;
+ currentSortOrder = "ASCENDING";
+ rendered = true;
+ Random r = new Random();
+ for(int i = 0; i < 10; i++)
+ data.add(new Data(i, r.nextInt(1000), Data.Random(6), r.nextInt(10000) + 98389,
Data.Random(r.nextInt(10) + 1), r.nextInt(500000), Data.statusIcon[i % 5], Data.Random(3),
false)); //new Data(i, Data.Random(5), Data.statusIcon[i % 5], Data.Random(6), false));
+
+// data.get(0).setStr0(null);
+// data.get(1).setStr1(null);
+// data.get(2).setStr2(null);
+// data.get(3).setStr3(null);
+ dataModel = new ListDataModel(data);
+ }
+
+ private final Comparator<Data> comparator = new Comparator<Data> () {
+ public int compare(Data o1, Data o2) {
+ if ((o1.getStr1() == null) && (o2.getStr1() == null))
+ return 0;
+ else if((o1.getStr1() != null) && (o2.getStr1() == null))
+ return 1;
+ else if((o1.getStr1() == null) && (o2.getStr1() != null))
+ return -1;
+ else
+ return o1.getStr1().length() - o2.getStr1().length();
+ }
+ };
+
+ public String getFilterValue() {
+ return filterValue;
+ }
+
+ public void setFilterValue(String filterValue) {
+ this.filterValue = filterValue;
+ }
+
+ public String getFilterInput() {
+ return filterInput;
+ }
+
+ public void setFilterInput(String filterInput) {
+ this.filterInput = filterInput;
+ }
+ public void uploadSignedFile(UploadEvent event) throws IOException
+ {
+ if (event.getUploadItem().getFile() != null)
+ {
+ // getLogger().info("uploaded signed document #0",
event.getUploadItem().getFileName());
+
+ //uploadedSignedDocument =
fileService.constructDocumentByUploadItem(event.getUploadItem());
+
+ try
+ {
+ if (true)
+ {
+// getLogger().info("The signed document #0 was not correctly
signed", uploadedSignedDocument.getDocumentName());
+// uploadedSignedDocument = null;
+//
+ throw new IOException("The signed document was not correctly
signed");
+ }
+ }
+ catch (IllegalArgumentException e)
+ {
+// getFacesMessages().add("The signed document was not correctly
signed");
+// clear();
+
+ throw new IOException(e.getMessage());
+ }
+
+
+ // request.setSignedDocument(uploadedSignedDocument);
+ }
+
+ }
+ public String getSortMode() {
+ return sortMode;
+ }
+
+ public void setSortMode(String sortMode) {
+ this.sortMode = sortMode;
+ }
+
+ public boolean isSelfSorted() {
+ return selfSorted;
+ }
+
+ public void setSelfSorted(boolean selfSorted) {
+ this.selfSorted = selfSorted;
+ }
+
+ public String getSortExpression() {
+ return sortExpression;
+ }
+
+ public void setSortExpression(String sortExpression) {
+ this.sortExpression = sortExpression;
+ }
+
+ public ArrayList<Data> getData() {
+ return data;
+ }
+
+ public void setData(ArrayList<Data> data) {
+ this.data = data;
+ }
+
+ public boolean isSortable() {
+ return sortable;
+ }
+
+ public void setSortable(boolean sortable) {
+ this.sortable = sortable;
+ }
+
+ public Ordering getSortOrder() {
+ return sortOrder;
+ }
+
+ public void setSortOrder(Ordering sortOrder) {
+ this.sortOrder = sortOrder;
+ }
+
+ public String getCurrentSortOrder() {
+ return currentSortOrder;
+ }
+
+ public void setCurrentSortOrder(String currentSortOrder) {
+ if("DESCENDING".equals(currentSortOrder)) this.sortOrder =
Ordering.DESCENDING;
+ else if("UNSORTED".equals(currentSortOrder)) this.sortOrder =
Ordering.UNSORTED;
+ else if("ASCENDING".equals(currentSortOrder)) this.sortOrder =
Ordering.ASCENDING;
+ this.currentSortOrder = currentSortOrder;
+ }
+
+ public boolean filterMethod(Object obj) {
+ Data d = (Data)obj;
+ if(d.getStr0().startsWith(filterInput)) return true;
+ return false;
+ }
+
+
+ public Comparator<Data> getComparator() {
+ return comparator;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public ListDataModel getDataModel() {
+ return dataModel;
+ }
+
+ public void setDataModel(ListDataModel dataModel) {
+ this.dataModel = dataModel;
+ }
+
+ public HtmlDataTable getMyDataTable() {
+ return myDataTable;
+ }
+
+ public void setMyDataTable(HtmlDataTable myDataTable) {
+ this.myDataTable = myDataTable;
+ }
+ public void select() {
+ selectedItem = (Data)dataModel.getRowData();
+ }
+
+ public Data getSelectedItem() {
+ return selectedItem;
+ }
+
+ public void setSelectedItem(Data selectedItem) {
+ this.selectedItem = selectedItem;
+ }
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SignerManagement.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SortingAndFiltering.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SortingAndFiltering.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SortingAndFiltering.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,179 @@
+package org.domain.TestApplication.session;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Random;
+import javax.faces.model.ListDataModel;
+import org.richfaces.model.Ordering;
+import org.richfaces.component.html.HtmlDataTable;
+
+public class SortingAndFiltering {
+ private ArrayList<Data> data;
+ private String sortMode;
+ private boolean selfSorted;
+ private boolean sortable;
+ private String sortExpression;
+ private Ordering sortOrder;
+ private String currentSortOrder;
+ private String filterInput;
+ private String filterValue;
+ private boolean rendered;
+ private ListDataModel dataModel;
+ private HtmlDataTable myDataTable = new HtmlDataTable();
+ private Data selectedItem;
+
+ private final Comparator<Data> comparator = new Comparator<Data> () {
+ public int compare(Data o1, Data o2) {
+ if ((o1.getStr1() == null) && (o2.getStr1() == null))
+ return 0;
+ else if((o1.getStr1() != null) && (o2.getStr1() == null))
+ return 1;
+ else if((o1.getStr1() == null) && (o2.getStr1() != null))
+ return -1;
+ else
+ return o1.getStr1().length() - o2.getStr1().length();
+ }
+ };
+
+ public String getFilterValue() {
+ return filterValue;
+ }
+
+ public void setFilterValue(String filterValue) {
+ this.filterValue = filterValue;
+ }
+
+ public String getFilterInput() {
+ return filterInput;
+ }
+
+ public void setFilterInput(String filterInput) {
+ this.filterInput = filterInput;
+ }
+
+ public SortingAndFiltering() {
+ filterValue = "";
+ filterInput = "";
+ data = new ArrayList<Data>();
+ sortMode = "single";
+ sortOrder = Ordering.ASCENDING;
+ currentSortOrder = "ASCENDING";
+ rendered = true;
+ Random r = new Random();
+ for(int i = 0; i < 10; i++)
+ data.add(new Data(i, r.nextInt(1000), Data.Random(6), r.nextInt(10000) + 98389,
Data.Random(r.nextInt(10) + 1), r.nextInt(500000), Data.statusIcon[i % 5], Data.Random(3),
false)); //new Data(i, Data.Random(5), Data.statusIcon[i % 5], Data.Random(6), false));
+
+ data.get(0).setStr0(null);
+ data.get(1).setStr1(null);
+ data.get(2).setStr2(null);
+ data.get(3).setStr3(null);
+ dataModel = new ListDataModel(data);
+ }
+
+
+ public String getSortMode() {
+ return sortMode;
+ }
+
+ public void setSortMode(String sortMode) {
+ this.sortMode = sortMode;
+ }
+
+ public boolean isSelfSorted() {
+ return selfSorted;
+ }
+
+ public void setSelfSorted(boolean selfSorted) {
+ this.selfSorted = selfSorted;
+ }
+
+ public String getSortExpression() {
+ return sortExpression;
+ }
+
+ public void setSortExpression(String sortExpression) {
+ this.sortExpression = sortExpression;
+ }
+
+ public ArrayList<Data> getData() {
+ return data;
+ }
+
+ public void setData(ArrayList<Data> data) {
+ this.data = data;
+ }
+
+ public boolean isSortable() {
+ return sortable;
+ }
+
+ public void setSortable(boolean sortable) {
+ this.sortable = sortable;
+ }
+
+ public Ordering getSortOrder() {
+ return sortOrder;
+ }
+
+ public void setSortOrder(Ordering sortOrder) {
+ this.sortOrder = sortOrder;
+ }
+
+ public String getCurrentSortOrder() {
+ return currentSortOrder;
+ }
+
+ public void setCurrentSortOrder(String currentSortOrder) {
+ if("DESCENDING".equals(currentSortOrder)) this.sortOrder =
Ordering.DESCENDING;
+ else if("UNSORTED".equals(currentSortOrder)) this.sortOrder =
Ordering.UNSORTED;
+ else if("ASCENDING".equals(currentSortOrder)) this.sortOrder =
Ordering.ASCENDING;
+ this.currentSortOrder = currentSortOrder;
+ }
+
+ public boolean filterMethod(Object obj) {
+ Data d = (Data)obj;
+ if(d.getStr0().startsWith(filterInput)) return true;
+ return false;
+ }
+
+
+ public Comparator<Data> getComparator() {
+ return comparator;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public ListDataModel getDataModel() {
+ return dataModel;
+ }
+
+ public void setDataModel(ListDataModel dataModel) {
+ this.dataModel = dataModel;
+ }
+
+ public HtmlDataTable getMyDataTable() {
+ return myDataTable;
+ }
+
+ public void setMyDataTable(HtmlDataTable myDataTable) {
+ this.myDataTable = myDataTable;
+ }
+ public void select() {
+ selectedItem = (Data)dataModel.getRowData();
+ }
+
+ public Data getSelectedItem() {
+ return selectedItem;
+ }
+
+ public void setSelectedItem(Data selectedItem) {
+ this.selectedItem = selectedItem;
+ }
+
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/SortingAndFiltering.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Validable.java
===================================================================
---
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Validable.java
(rev 0)
+++
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Validable.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,19 @@
+/**
+ *
+ */
+package org.domain.TestApplication.session;
+
+/**
+ * @author asmirnov
+ *
+ */
+public interface Validable {
+
+ public String getText();
+
+ public String getTextDescription();
+
+ public int getIntValue();
+
+ public String getIntDescription();
+}
Property changes on:
trunk/test-applications/seam/src/main/java/org/domain/TestApplication/session/Validable.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/META-INF/orm.xml
===================================================================
--- trunk/test-applications/seam/src/main/resources/META-INF/orm.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/resources/META-INF/orm.xml 2008-07-17 15:22:39
UTC (rev 9663)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings
xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
+</entity-mappings>
Property changes on: trunk/test-applications/seam/src/main/resources/META-INF/orm.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/test-applications/seam/src/main/resources/META-INF/persistence.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/resources/META-INF/persistence.xml 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="TestApplication"
transaction-type="JTA">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>java:/seamDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.hbm2ddl.auto"
value="update"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <property name="hibernate.format_sql" value="true"/>
+ <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ </properties>
+ </persistence-unit>
+
+</persistence>
Property changes on:
trunk/test-applications/seam/src/main/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/components.properties
===================================================================
--- trunk/test-applications/seam/src/main/resources/components.properties
(rev 0)
+++ trunk/test-applications/seam/src/main/resources/components.properties 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,4 @@
+#
+#Thu Jun 05 10:59:06 EEST 2008
+jndiPattern=\#{ejbName}/local
+embeddedEjb=false
Property changes on:
trunk/test-applications/seam/src/main/resources/components.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/hibernate.cfg.xml
===================================================================
--- trunk/test-applications/seam/src/main/resources/hibernate.cfg.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/resources/hibernate.cfg.xml 2008-07-17 15:22:39
UTC (rev 9663)
@@ -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>
Property changes on: trunk/test-applications/seam/src/main/resources/hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/import.sql
===================================================================
Property changes on: trunk/test-applications/seam/src/main/resources/import.sql
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/logging.properties
===================================================================
--- trunk/test-applications/seam/src/main/resources/logging.properties
(rev 0)
+++ trunk/test-applications/seam/src/main/resources/logging.properties 2008-07-17 15:22:39
UTC (rev 9663)
@@ -0,0 +1,25 @@
+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 beanValidator.
+
+
+java.util.logging.ConsoleHandler.level ALL
+java.util.logging.ConsoleHandler.formatter java.util.logging.SimpleFormatter
+
+facelets.level=ALL
+com.sun.faces.level=ALL
+javax.faces.level=ALL
+org.apache.myfaces.level=INFO
+org.ajax4jsf.io.level=ERROR
+org.ajax4jsf.webapp.level=ALL
+org.ajax4jsf.application.level=ALL
+org.ajax4jsf.context.level=ALL
+javax.enterprise.resource.webcontainer.jsf.level=ALL
+org.richfaces.level=ALL
+
\ No newline at end of file
Property changes on: trunk/test-applications/seam/src/main/resources/logging.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/messages_en.properties
===================================================================
--- trunk/test-applications/seam/src/main/resources/messages_en.properties
(rev 0)
+++ trunk/test-applications/seam/src/main/resources/messages_en.properties 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,90 @@
+up=\u2191
+down=\u2193
+left=\u2039
+right=\u203A
+
+validator.assertFalse=validation failed
+validator.assertTrue=validation failed
+validator.future=must be a future date
+validator.length=length must be between {min} and {max}
+validator.max=must be less than or equal to {value}
+validator.min=must be greater than or equal to {value}
+validator.notNull=may not be null
+validator.past=must be a past date
+validator.pattern=must match "{regex}"
+validator.range=must be between {min} and {max}
+validator.size=size must be between {min} and {max}
+validator.email=must be a well-formed email address
+
+org.jboss.seam.loginFailed=Login failed
+org.jboss.seam.loginSuccessful=Welcome, #0
+
+org.jboss.seam.TransactionFailed=Transaction failed
+org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another
request
+org.jboss.seam.IllegalNavigation=Illegal navigation
+org.jboss.seam.ProcessEnded=Process #0 already ended
+org.jboss.seam.ProcessNotFound=Process #0 not found
+org.jboss.seam.TaskEnded=Task #0 already ended
+org.jboss.seam.TaskNotFound=Task #0 not found
+org.jboss.seam.NotLoggedIn=Please log in first
+
+javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected
type
+javax.faces.component.UIInput.REQUIRED=value is required
+javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted
information
+javax.faces.component.UISelectOne.INVALID=value is not valid
+javax.faces.component.UISelectMany.INVALID=value is not valid
+
+javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal
number consisting of zero or more digits, optionally followed by a decimal point and
fraction, eg. {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed
integer number consisting of zero or more digits
+javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false
+javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any
value other than true will evaluate to false)
+javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255
+javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255
+javax.faces.converter.CharacterConverter.CHARACTER=value must be a character
+javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII
character
+javax.faces.converter.DateTimeConverter.DATE=value must be a date
+javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1}
+javax.faces.converter.DateTimeConverter.TIME=value must be a time
+javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1}
+javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time
+javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time,
eg. {1}
+javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be
specified to convert the value
+javax.faces.converter.DoubleConverter.DOUBLE=value must be a number
+javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between
4.9E-324 and 1.7976931348623157E308
+javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum
+javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or
from the enum that contains the constant {1}
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or
from the enum, but no enum class provided
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an
enum or from the enum, but no enum class provided
+javax.faces.converter.FloatConverter.FLOAT=value must be a number
+javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45
and 3.4028235E38
+javax.faces.converter.IntegerConverter.INTEGER=value must be an integer
+javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number
between -2147483648 and 2147483647
+javax.faces.converter.LongConverter.LONG=value must be an integer
+javax.faces.converter.LongConverter.LONG_detail=value must be an integer number between
-9223372036854775808 and 9223372036854775807
+javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount
+javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount,
eg. {1}
+javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount
+javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount,
eg. {1}
+javax.faces.converter.NumberConverter.NUMBER=value must be a number
+javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number
+javax.faces.converter.NumberConverter.PATTERN=value must be a number
+javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number
+javax.faces.converter.ShortConverter.SHORT=value must be an integer
+javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between
-32768 and 32767
+
+javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to
{0}
+javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to
{0}
+javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and
{1}
+javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type
+javax.faces.validator.LengthValidator.MAXIMUM=value is must be shorter than or equal to
{0} characters
+javax.faces.validator.LengthValidator.MINIMUM=value is must be longer than or equal to
{0} characters
+javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to
{0}
+javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type
+
+javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.converter.STRING=value could not be converted to a string
+
Property changes on:
trunk/test-applications/seam/src/main/resources/messages_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/seam-ds.xml
===================================================================
--- trunk/test-applications/seam/src/main/resources/seam-ds.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/resources/seam-ds.xml 2008-07-17 15:22:39 UTC
(rev 9663)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+
+<datasources>
+
+ <local-tx-datasource>
+ <jndi-name>seamDatasource</jndi-name>
+ <connection-url>jdbc:hsqldb:.</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+<!--
+ <exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
+ </exception-sorter-class-name>
+ <metadata>
+ <type-mapping>mySQL</type-mapping>
+ </metadata>
+-->
+ </local-tx-datasource>
+
+</datasources>
+
Property changes on: trunk/test-applications/seam/src/main/resources/seam-ds.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/seam.properties
===================================================================
Property changes on: trunk/test-applications/seam/src/main/resources/seam.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/resources/security.drl
===================================================================
--- trunk/test-applications/seam/src/main/resources/security.drl
(rev 0)
+++ trunk/test-applications/seam/src/main/resources/security.drl 2008-07-17 15:22:39 UTC
(rev 9663)
@@ -0,0 +1,6 @@
+package Permissions;
+
+import java.security.Principal;
+
+import org.jboss.seam.security.PermissionCheck;
+import org.jboss.seam.security.Role;
\ No newline at end of file
Added: trunk/test-applications/seam/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/test-applications/seam/src/main/webapp/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/META-INF/MANIFEST.MF 2008-07-17 15:22:39
UTC (rev 9663)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Property changes on: trunk/test-applications/seam/src/main/webapp/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/webapp/META-INF/context.xml
===================================================================
--- trunk/test-applications/seam/src/main/webapp/META-INF/context.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/META-INF/context.xml 2008-07-17 15:22:39
UTC (rev 9663)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context >
+
+ <!-- url: The JDBC connection url for connecting to your MySQL dB.
+ The autoReconnect=true argument to the url makes sure that the
+ mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
+ connection. mysqld by default closes idle connections after 8 hours.
+ -->
+
+ <Resource name="jdbc/DS" auth="Container"
+ type="javax.sql.DataSource" username="sa" password=""
+ driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:." />
+ <!--
+ <Transaction factory="org.objectweb.jotm.UserTransactionFactory"
+ jotm.timeout="60"/>
+ -->
+</Context>
\ No newline at end of file
Property changes on: trunk/test-applications/seam/src/main/webapp/META-INF/context.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/test-applications/seam/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
(rev 0)
+++
trunk/test-applications/seam/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess"/>
Added: trunk/test-applications/seam/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/test-applications/seam/src/main/webapp/WEB-INF/components.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/WEB-INF/components.xml 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components
xmlns="http://jboss.com/products/seam/components"
+
xmlns:core="http://jboss.com/products/seam/core"
+
xmlns:persistence="http://jboss.com/products/seam/persistence"
+
xmlns:drools="http://jboss.com/products/seam/drools"
+
xmlns:bpm="http://jboss.com/products/seam/bpm"
+
xmlns:security="http://jboss.com/products/seam/security"
+
xmlns:mail="http://jboss.com/products/seam/mail"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:pdf="http://jboss.com/products/seam/pdf"
+ xsi:schemaLocation=
+ "http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.0.xsd
+
http://jboss.com/products/seam/persistence
http://jboss.com/products/seam/persistence-2.0.xsd
+
http://jboss.com/products/seam/drools
http://jboss.com/products/seam/drools-2.0.xsd
+
http://jboss.com/products/seam/bpm
http://jboss.com/products/seam/bpm-2.0.xsd
+
http://jboss.com/products/seam/security
http://jboss.com/products/seam/security-2.0.xsd
+
http://jboss.com/products/seam/mail
http://jboss.com/products/seam/mail-2.0.xsd
+
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.0.xsd">
+ <core:init debug="true" jndi-pattern="@jndiPattern@"/>
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000"
+ conversation-id-parameter="cid"
+ parent-conversation-id-parameter="pid"/>
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true"
+
entity-manager-factory="#{TestApplicationEntityManagerFactory}"/>
+
+ <persistence:entity-manager-factory
name="TestApplicationEntityManagerFactory"
+ persistence-unit-name="TestApplication"/>
+
+ <drools:rule-base name="securityRules">
+
<drools:rule-files><value>/security.drl</value></drools:rule-files>
+ </drools:rule-base>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"
+ security-rules="#{securityRules}"
+ remember-me="true"/>
+
+ <event type="org.jboss.seam.security.notLoggedIn">
+ <action execute="#{redirect.captureCurrentView}"/>
+ </event>
+ <event type="org.jboss.seam.security.loginSuccessful">
+ <action execute="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <mail:mail-session host="localhost" port="2525"
username="test" password="test" />
+
+ <!-- For use with jBPM pageflow or process management -->
+ <!--
+ <bpm:jbpm>
+ <bpm:process-definitions></bpm:process-definitions>
+ <bpm:pageflow-definitions></bpm:pageflow-definitions>
+ </bpm:jbpm>
+ -->
+
+</components>
Property changes on: trunk/test-applications/seam/src/main/webapp/WEB-INF/components.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added: trunk/test-applications/seam/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seam/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/WEB-INF/faces-config.xml 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xi="http://www.w3.org/2001/XInclude"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ <managed-bean>
+ <managed-bean-name>sortingAndFiltering</managed-bean-name>
+
<managed-bean-class>org.domain.TestApplication.session.SortingAndFiltering</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>signerManagement</managed-bean-name>
+
<managed-bean-class>org.domain.TestApplication.session.SignerManagement</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+
<managed-bean-class>org.domain.TestApplication.session.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>data</managed-bean-name>
+
<managed-bean-class>org.domain.TestApplication.session.DataBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>lengthBean</managed-bean-name>
+
<managed-bean-class>org.domain.TestApplication.session.LengthBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ <locale-config>
+ <default-locale>en</default-locale>
+ <supported-locale>bg</supported-locale>
+ <supported-locale>de</supported-locale>
+ <supported-locale>en</supported-locale>
+ <supported-locale>fr</supported-locale>
+ <supported-locale>tr</supported-locale>
+ </locale-config>
+ </application>
+</faces-config>
Property changes on:
trunk/test-applications/seam/src/main/webapp/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Added: trunk/test-applications/seam/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- trunk/test-applications/seam/src/main/webapp/WEB-INF/jboss-web.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/WEB-INF/jboss-web.xml 2008-07-17 15:22:39
UTC (rev 9663)
@@ -0,0 +1,12 @@
+ <!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>
+ seam.jboss.org:loader=TestApplication
+
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+ </loader-repository>
+ </class-loading>
+</jboss-web>
Property changes on: trunk/test-applications/seam/src/main/webapp/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/test-applications/seam/src/main/webapp/WEB-INF/pages.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/WEB-INF/pages.xml 2008-07-17 15:22:39 UTC
(rev 9663)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pages
xmlns="http://jboss.com/products/seam/pages"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.com/products/seam/pages
http://jboss.com/products/seam/pages-2.0.xsd"
+
+ no-conversation-view-id="/home.xhtml"
+ login-view-id="/login.xhtml">
+
+ <page view-id="*">
+ <navigation>
+ <rule if-outcome="home">
+ <redirect view-id="/home.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
+ <exception class="org.jboss.seam.framework.EntityNotFoundException">
+ <redirect view-id="/error.xhtml">
+ <message>Not found</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.EntityNotFoundException">
+ <redirect view-id="/error.xhtml">
+ <message>Not found</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.OptimisticLockException">
+ <end-conversation/>
+ <redirect view-id="/error.xhtml">
+ <message>Another user changed the same data, please try
again</message>
+ </redirect>
+ </exception>
+
+ <exception class="org.jboss.seam.security.AuthorizationException">
+ <redirect view-id="/error.xhtml">
+ <message>You don't have permission to do this</message>
+ </redirect>
+ </exception>
+
+ <exception class="org.jboss.seam.security.NotLoggedInException">
+ <redirect view-id="/login.xhtml">
+ <message>Please log in first</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.faces.application.ViewExpiredException">
+ <redirect view-id="/error.xhtml">
+ <message>Your session has timed out, please try again</message>
+ </redirect>
+ </exception>
+
+ <exception>
+ <redirect view-id="/error.xhtml">
+ <message>Unexpected error, please try again</message>
+ </redirect>
+ </exception>
+
+</pages>
Property changes on: trunk/test-applications/seam/src/main/webapp/WEB-INF/pages.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/seam/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/WEB-INF/web.xml 2008-07-17 15:22:39 UTC
(rev 9663)
@@ -0,0 +1,101 @@
+<?xml version="1.0" ?>
+<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <!-- Ajax4jsf -->
+
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+
+ <!-- Seam -->
+
+ <listener>
+ <listener-class>
+ org.jboss.seam.servlet.SeamListener
+ </listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>
+ org.jboss.seam.servlet.SeamResourceServlet
+ </servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- Facelets development mode (disable in production) -->
+
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <!-- PDF -->
+ <filter>
+ <filter-name>Seam Servlet Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Servlet Filter</filter-name>
+ <url-pattern>*.pdf</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Document Store Servlet</servlet-name>
+ <servlet-class>
+ org.jboss.seam.pdf.DocumentStoreServlet
+ </servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Document Store Servlet</servlet-name>
+ <url-pattern>*.pdf</url-pattern>
+ </servlet-mapping>
+ <!-- JSF -->
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <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>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <display-name>Restrict raw XHTML Documents</display-name>
+ <web-resource-collection>
+ <web-resource-name>XHTML</web-resource-name>
+ <url-pattern>*.xhtml</url-pattern>
+ </web-resource-collection>
+ <auth-constraint />
+ </security-constraint>
+
+
+
+</web-app>
Property changes on: trunk/test-applications/seam/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/webapp/error.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/error.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/home.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/home.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/img/dtpick.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/img/dtpick.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/seam/src/main/webapp/img/error.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/img/error.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/seam/src/main/webapp/index.html
===================================================================
--- trunk/test-applications/seam/src/main/webapp/index.html (rev
0)
+++ trunk/test-applications/seam/src/main/webapp/index.html 2008-07-17 15:22:39 UTC (rev
9663)
@@ -0,0 +1,5 @@
+<html>
+<head>
+ <meta http-equiv="Refresh" content="0; URL=home.seam">
+</head>
+</html>
\ No newline at end of file
Property changes on: trunk/test-applications/seam/src/main/webapp/index.html
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/webapp/layout/display.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/layout/display.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/layout/edit.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/layout/edit.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/layout/menu.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/layout/menu.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/layout/template.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/layout/template.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/login.page.xml
===================================================================
--- trunk/test-applications/seam/src/main/webapp/login.page.xml
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/login.page.xml 2008-07-17 15:22:39 UTC
(rev 9663)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<page
xmlns="http://jboss.com/products/seam/pages"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.com/products/seam/pages
http://jboss.com/products/seam/pages-2.0.xsd">
+
+ <navigation from-action="#{identity.login}">
+ <rule if="#{identity.loggedIn}">
+ <redirect view-id="/home.xhtml"/>
+ </rule>
+ </navigation>
+
+</page>
Property changes on: trunk/test-applications/seam/src/main/webapp/login.page.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/webapp/login.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/login.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/modalPanel.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/modalPanel.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/stylesheet/theme.css
===================================================================
--- trunk/test-applications/seam/src/main/webapp/stylesheet/theme.css
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/stylesheet/theme.css 2008-07-17 15:22:39
UTC (rev 9663)
@@ -0,0 +1,117 @@
+body {
+ font-size: 12px;
+}
+
+a:active, a:link, a:visited {
+ color: #0D5798;
+}
+a:hover {
+ color: #8CAFCD;
+}
+
+input, textarea {
+ border: 1px solid #BBBBBB;
+ font-size: 10px;
+ background: #F0F8FF;
+ color: black;
+}
+
+input[type='submit'], input[type='button'] {
+ background: #4477AA;
+ color: white;
+ margin: 5px;
+ border-color: gray;
+}
+
+.tableControl, .actionButtons {
+ width: 100%;
+}
+
+.tableControl a {
+ padding-left: 10px;
+}
+
+.tableControl {
+ text-align: right;
+}
+
+.footer {
+ text-align: center;
+ font-size: 10px;
+}
+
+.rich-table {
+ width:100%;
+}
+
+h1 {
+ font-family: Arial,sans-serif;
+ color: #578BB8;
+ font-size: 1.6em;
+ margin-top: 0;
+}
+
+body {
+ margin: 0px;
+ font-family: Arial,sans-serif;
+ color: #616161;
+}
+
+.body {
+ padding: 30px;
+}
+
+.columnHeader:hover
+{
+ color: #FF6600;
+}
+
+.message {
+ border: 1px solid #FFCC00;
+ padding: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ background-color: #F0F8FF;
+ font-size: 12px;
+}
+
+.name {
+ vertical-align: top;
+ font-weight: bold;
+ width: 115px;
+ float: left;
+ padding: 5px;
+ margin-top: 3px;
+ clear: left;
+}
+.value {
+ float: left;
+ padding: 5px;
+}
+
+.error {
+ float: left;
+ padding: 5px;
+}
+.errors {
+ color: red;
+ vertical-align: middle;
+}
+img.errors {
+ padding-right: 5px;
+}
+.errors input {
+ border: 1px solid red;
+}
+.errors textarea {
+ border: 1px solid red;
+}
+
+.required {
+ color: red;
+ padding-left: 2px;
+}
+
+.rich-stglpanel-body {
+ overflow: auto;
+}
Property changes on: trunk/test-applications/seam/src/main/webapp/stylesheet/theme.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Added: trunk/test-applications/seam/src/main/webapp/validatorFacelets.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seam/src/main/webapp/validatorFacelets.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seam/src/main/webapp/validatorJSP.jsp
===================================================================
--- trunk/test-applications/seam/src/main/webapp/validatorJSP.jsp
(rev 0)
+++ trunk/test-applications/seam/src/main/webapp/validatorJSP.jsp 2008-07-17 15:22:39 UTC
(rev 9663)
@@ -0,0 +1,62 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@taglib
uri="http://richfaces.org/rich" prefix="rich"%>
+<%@taglib prefix="a4j"
uri="http://richfaces.org/a4j"%>
+<html>
+<head>
+<title>Hibernate validator test</title>
+</head>
+<body>
+<h1>Using Hibernate validator annotations in the JSF beans</h1>
+<f:view>
+ <h:form id="form">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText>Single input field with label and message. Validated by AJAX on
every char.</h:outputText>
+ </f:facet>
+ <h:outputLabel for="ltext"
value="#{lengthBean.textDescription}" />
+ <h:inputText id="ltext" value="#{lengthBean.text}">
+ <rich:ajaxValidator event="onkeyup" />
+ </h:inputText>
+ <rich:message for="ltext" showDetail="true"
showSummary="true" />
+ </rich:panel>
+ <h2>Input fields with label and message in the JSF dataTable. Each field
validated by AJAX on "onblur" event</h2>
+ <rich:graphValidator value="#{data}" >
+ <rich:dataTable value="#{data.beans}" var="bean"
id="table">
+ <f:facet name="header">
+ <h:outputText value="Validate values in the data table. Total sum for an all
integer values validated for a value less then 20" />
+ </f:facet>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="text field" />
+ </f:facet>
+ <h:outputLabel for="text" value="#{bean.textDescription}"
/>
+ <h:inputText id="text" value="#{bean.text}">
+ <rich:ajaxValidator event="onblur" />
+ </h:inputText>
+ <rich:message for="text" showDetail="true"
showSummary="true" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="integer field" />
+ </f:facet>
+ <h:outputLabel for="intValue" value="#{bean.intDescription}"
/>
+ <h:inputText id="intValue" value="#{bean.intValue}">
+ <rich:ajaxValidator event="onblur" />
+ </h:inputText>
+ <rich:message for="intValue" showDetail="true"
showSummary="true" />
+ </h:column>
+ <f:facet name="footer">
+ <h:panelGroup>
+ <h:outputText>in addition to fields validation, total sum for an all integer
values validated for a value less then 20.</h:outputText>
+ <h:commandButton value="Submit all fields"></h:commandButton>
+ </h:panelGroup>
+ </f:facet>
+ </rich:dataTable>
+ </rich:graphValidator>
+ </h:form>
+ <rich:messages />
+</f:view>
+</body>
+</html>
Property changes on: trunk/test-applications/seam/src/main/webapp/validatorJSP.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.java
===================================================================
---
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.java
(rev 0)
+++
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.java 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,28 @@
+package org.domain.TestApplication.test;
+
+import org.testng.annotations.Test;
+import org.jboss.seam.mock.SeamTest;
+
+public class ModalPanelTest extends SeamTest {
+
+ @Test
+ public void test_modalPanel() throws Exception {
+ new FacesRequest() {
+ @Override
+ protected void updateModelValues() throws Exception {
+ //set form input to model attributes
+ setValue("#{modalPanel.value}", "seam");
+ }
+ @Override
+ protected void invokeApplication() {
+ //call action methods here
+ invokeMethod("#{modalPanel.modalPanel}");
+ }
+ @Override
+ protected void renderResponse() {
+ //check model attributes if needed
+ assert getValue("#{modalPanel.value}").equals("seam");
+ }
+ }.run();
+ }
+}
Property changes on:
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.xml
===================================================================
---
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.xml
(rev 0)
+++
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.xml 2008-07-17
15:22:39 UTC (rev 9663)
@@ -0,0 +1,9 @@
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+
+<suite name="ModalPanel Tests" verbose="2"
parallel="false">
+ <test name="ModalPanel Test">
+ <classes>
+ <class name="org.domain.TestApplication.test.ModalPanelTest"/>
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on:
trunk/test-applications/seam/src/test/java/org/domain/TestApplication/test/ModalPanelTest.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native