devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wk...@apache.org
Subject svn commit: r1742836 - in /devicemap/trunk/examples/1.0/java: ./ flow/ flow/src/ flow/src/main/ flow/src/main/java/ flow/src/main/java/org/ flow/src/main/java/org/apache/ flow/src/main/java/org/apache/devicemap/ flow/src/main/java/org/apache/devicemap/...
Date Sun, 08 May 2016 16:49:59 GMT
Author: wkeil
Date: Sun May  8 16:49:58 2016
New Revision: 1742836

URL: http://svn.apache.org/viewvc?rev=1742836&view=rev
Log:
DMAP-193: Add CDI / JSF Demo 

Task-Url: https://issues.apache.org/jira/browse/DMAP-193

Added:
    devicemap/trunk/examples/1.0/java/flow/   (with props)
    devicemap/trunk/examples/1.0/java/flow/README
    devicemap/trunk/examples/1.0/java/flow/pom.xml
    devicemap/trunk/examples/1.0/java/flow/src/
    devicemap/trunk/examples/1.0/java/flow/src/main/
    devicemap/trunk/examples/1.0/java/flow/src/main/java/
    devicemap/trunk/examples/1.0/java/flow/src/main/java/org/
    devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/
    devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/devicemap/
    devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/devicemap/example/
    devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/devicemap/example/flow/
    devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/devicemap/example/flow/HelloWorld.java
    devicemap/trunk/examples/1.0/java/flow/src/main/resources/
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/META-INF/
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/META-INF/context.xml
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/beans.xml
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/faces-config.xml
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/templates/
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/templates/default.xhtml
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/web.xml
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/home.xhtml
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/index.jsp
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/css/
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/css/screen.css
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/banner.png   (with
props)
    devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/weld.png   (with
props)
    devicemap/trunk/examples/1.0/java/flow/src/test/
    devicemap/trunk/examples/1.0/java/flow/src/test/java/
    devicemap/trunk/examples/1.0/java/flow/src/test/java/org/
    devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/
    devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/devicemap/
    devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/devicemap/example/
    devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/devicemap/example/flow/
    devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/devicemap/example/flow/HelloWorldTest.java
    devicemap/trunk/examples/1.0/java/flow/src/test/resources/
Modified:
    devicemap/trunk/examples/1.0/java/pom.xml

Propchange: devicemap/trunk/examples/1.0/java/flow/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun May  8 16:49:58 2016
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Added: devicemap/trunk/examples/1.0/java/flow/README
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/README?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/README (added)
+++ devicemap/trunk/examples/1.0/java/flow/README Sun May  8 16:49:58 2016
@@ -0,0 +1,115 @@
+
+                                 dmap-flow 
+
+ Source archetype: weld-jsf-jee-minimal
+
+ What is it?
+ ===========
+
+ This is your project! It's a barebones, deployable Maven 2 project to help you
+ get your foot in the door developing with Java EE 6. This project is setup to
+ allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0
+ and EJB 3.1 that can run on a certified application server (Full or Web
+ Profile). A persistence unit configuration is absent from this project, but
+ you can easily add one.
+
+ System requirements
+ ===================
+
+ All you need to run this project is Java 5.0 (Java SDK 1.5) or greator and
+ Maven 2.0.10 or greater. This application is setup to be run on a Java EE 6
+ certified application server. It has been tested with GlassFish V3 and JBoss
+ AS 6.0.
+
+ If you want to deploy the application to a standalone Servlet Container, then
+ you will need to set one up. Alternatively, you can use a Maven command to run
+ the application in place on an embedded version of GlassFish.
+
+ Please note that Maven 2 project needs to use the JBoss Maven repository
+ because there are certain Java EE API JARs that are not yet publised to the
+ Maven Central Repository (see https://jira.jboss.org/jira/browse/WELD-222)
+
+ Deploying the application
+ =========================
+
+ You can deploy the application without moving any files around using the
+ embedded GlassFish application server.
+
+ To run the application using embedded GlassFish, execute this command:
+
+  mvn package embedded-glassfish:run
+
+ The application will be running at the following URL:
+ 
+  http://localhost:7070/flow
+
+ To deploy the application to JBoss AS (standalone), first make sure that the
+ JBOSS_HOME environment variable points to a JBoss AS 6.0 installation.
+ Alternatively, you can set the location of JBoss AS using the following
+ profile defintion in the .m2/settings.xml file in your home directory:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<settings
+   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/xsd/settings-1.0.0.xsd">
+
+   <profiles>
+      <profile>
+         <id>environment</id>
+         <activation>
+            <activeByDefault>true</activeByDefault>
+         </activation>
+         <properties>
+            <jboss.home>/path/to/jboss-as-6.0.0.M1</jboss.home>
+         </properties>
+      </profile>
+   </profiles>
+   
+</settings>
+
+ You can now deploy to JBoss AS by executing the following command:
+
+  mvn package jboss:hard-deploy
+
+ Start JBoss AS. The application will be running at the following URL:
+
+  http://localhost:8080/flow
+
+ If you want to deploy to GlassFish (standalone), you can upload the
+ target/flow.war archive using the web-based administration console.
+
+ Importing the project into an IDE
+ =================================
+
+ If you created the project using the Maven 2 archetype wizard in your IDE
+ (Eclipse, NetBeans or IntelliJ IDEA), then there is nothing to do. You should
+ already have an IDE project.
+
+ If you created the project from the commandline using archetype:generate, then
+ you need to bring the project into your IDE. If you are using NetBeans 6.8 or
+ IntelliJ IDEA 9, then all you have to do is open the project as an existing
+ project. Both of these IDEs recognize Maven 2 projects natively.
+
+ To import into Eclipse, you first need to install the m2eclipse plugin. To get
+ started, add the m2eclipse update site (http://m2eclipse.sonatype.org/update/)
+ to Eclipse and install the m2eclipse plugin and required dependencies. Once
+ that is installed, you'll be ready to import the project into Eclipse.
+
+ Select File > Import... and select "Import... > Maven Projects" and select
+ your project directory. m2eclipse should take it from there.
+
+ Once in the IDE, you can execute the Maven commands through the IDE controls
+ to run the application on an embedded Servlet Container.
+
+ Resources
+ =========
+
+ Weld archetypes:
+ -  Quickstart:        http://seamframework.org/Documentation/WeldQuickstartForMavenUsers
+ -  Issue tracker:     https://jira.jboss.org/jira/browse/WELDX
+ -  Source code:       http://anonsvn.jboss.org/repos/weld/archetypes
+ -  Forums:            http://seamframework.org/Community/WeldUsers
+ JSR-299 overview:     http://seamframework.org/Weld
+ JSF community site:   http://www.javaserverfaces.org
+

Added: devicemap/trunk/examples/1.0/java/flow/pom.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/pom.xml?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/pom.xml (added)
+++ devicemap/trunk/examples/1.0/java/flow/pom.xml Sun May  8 16:49:58 2016
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+   <parent>
+        <artifactId>dmap-java-examples</artifactId>
+        <groupId>org.apache.devicemap.examples</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+   <artifactId>dmap-flow</artifactId>
+   <packaging>war</packaging>
+   <name>DeviceMap Web Flow Example</name>
+   
+   <properties>
+      <!--
+         Explicitly declaring the source encoding eliminates the following message:
+         [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e.
build is platform dependent!
+      -->
+      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+      <!-- To set the jboss.home environment variable the Maven way, set the jboss.home
property in an active profile in the Maven 2 settings.xml file -->
+      <jboss.home>${env.JBOSS_HOME}</jboss.home>
+      <jboss.domain>default</jboss.domain>
+      <!-- The version of Weld extensions in use -->
+      <weld.extensions.version>1.0.0-CR2</weld.extensions.version>
+   </properties>
+
+   <repositories>
+       <!-- Several key Java EE APIs and RIs are missing from the Maven Central Repository
-->
+       <!-- The goal is to eventually eliminate the reliance on the JBoss repository -->
+       <repository>
+          <id>repository.jboss.org</id>
+          <name>JBoss Repository</name>
+          <url>http://repository.jboss.org/maven2</url>
+       </repository>
+   </repositories>
+
+   <pluginRepositories>
+      <!-- GlassFish repository required for embedded-glassfish plugin -->
+      <pluginRepository>
+         <id>glassfish</id>
+         <name>GlassFish Maven 2 Repository</name>
+         <url>http://download.java.net/maven/glassfish</url>
+      </pluginRepository>
+   </pluginRepositories>
+
+   <dependencyManagement>
+      <dependencies>
+         <!-- Import scope will provide versions for dependencies below. -->
+         <dependency>
+            <groupId>org.jboss.weld</groupId>
+            <artifactId>weld-extensions-bom</artifactId>
+            <version>${weld.extensions.version}</version>
+            <type>pom</type>
+            <scope>import</scope>
+         </dependency>
+      </dependencies>
+   </dependencyManagement>
+
+   <dependencies>
+      <!-- CDI (JSR-299) -->
+      <dependency>
+         <groupId>javax.enterprise</groupId>
+         <artifactId>cdi-api</artifactId>
+         <scope>provided</scope>
+      </dependency>
+      <!-- Common annotations (e.g., @PostConstruct, @PreDestroy, @Generated, @Resource)
 -->
+      <dependency>
+         <groupId>javax.annotation</groupId>
+         <artifactId>jsr250-api</artifactId>
+         <scope>provided</scope>
+      </dependency>
+      <!-- Bean Validation (JSR-303) -->
+      <dependency>
+         <groupId>javax.validation</groupId>
+         <artifactId>validation-api</artifactId>
+         <scope>provided</scope>
+      </dependency>
+      <!-- Bean Validation Implementation -->
+      <!-- Provides portable constraints such as @NotEmpty, @Email and @Url -->
+      <!-- Hibernate Validator is the only JSR-303 implementation at the moment, so we
can assume it's provided -->
+      <dependency>
+         <groupId>org.hibernate</groupId>
+         <artifactId>hibernate-validator</artifactId>
+         <version>4.0.0.GA</version>
+         <scope>provided</scope>
+      </dependency>
+      <!-- JSF -->
+      <dependency>
+         <groupId>javax.faces</groupId>
+         <artifactId>jsf-api</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+      <!-- Optional, but highly recommended. -->
+      <dependency>
+         <groupId>org.testng</groupId>
+         <artifactId>testng</artifactId>
+         <version>5.10</version>
+         <scope>test</scope>
+         <classifier>jdk15</classifier>
+      </dependency>
+
+      <!-- Needed on JBoss AS as EL is out of date -->
+      <dependency>
+         <groupId>org.glassfish.web</groupId>
+         <artifactId>el-impl</artifactId>
+         <scope>runtime</scope>
+         <!-- FIXME this version should be in the Weld API BOM -->
+         <version>2.1.2-b04</version>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.el</groupId>
+               <artifactId>el-api</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+   </dependencies>
+   <build>
+      <finalName>${artifactId}</finalName>
+      <plugins>
+         <!-- Compiler plugin enforces Java 1.6 compatibility -->
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+               <source>1.6</source>
+               <target>1.6</target>
+            </configuration>
+         </plugin>
+
+         <!-- Eclipse plugin can force download of source and JavaDoc jars -->
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-eclipse-plugin</artifactId>
+            <configuration>
+               <wtpversion>2.0</wtpversion>
+               <!--
+               <downloadSources>true</downloadSources>
+               <downloadJavadocs>true</downloadJavadocs>
+               -->
+            </configuration>
+         </plugin>
+         
+         <!-- Configure the JBoss AS Maven deploy plugin -->
+         <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>jboss-maven-plugin</artifactId>
+            <configuration>
+               <jbossHome>${jboss.home}</jbossHome>
+               <serverName>${jboss.domain}</serverName>
+               <fileNames>
+                  <fileName>${project.build.directory}/${build.finalName}.war</fileName>
+               </fileNames> 
+            </configuration>
+         </plugin>
+         <!-- Configure the Embedded GlassFish Maven plugin -->
+         <plugin>
+            <groupId>org.glassfish</groupId>
+            <artifactId>maven-embedded-glassfish-plugin</artifactId>
+            <version>3.0</version>
+            <configuration>
+               <app>${project.build.directory}/${build.finalName}.war</app>
+               <port>7070</port>
+               <containerType>web</containerType>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+</project>

Added: devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/devicemap/example/flow/HelloWorld.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/devicemap/example/flow/HelloWorld.java?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/devicemap/example/flow/HelloWorld.java
(added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/java/org/apache/devicemap/example/flow/HelloWorld.java
Sun May  8 16:49:58 2016
@@ -0,0 +1,74 @@
+package org.apache.devicemap.example.flow;
+
+import javax.annotation.PostConstruct;
+import javax.enterprise.inject.Model;
+import javax.validation.constraints.Digits;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.constraints.NotEmpty;
+
+public @Model class HelloWorld
+{
+   private final String text = "Hello World!";
+
+   private String letters;
+   
+   private String numbers;
+   
+   private String email;
+   
+   public HelloWorld() {}
+
+   @PostConstruct
+   public void initialize()
+   {
+      System.out.println(this.getClass().getSimpleName() + " was constructed");
+   }
+
+   public String getText()
+   {
+      return text;
+   }
+
+   @NotNull
+   @NotEmpty
+   @Pattern(regexp = "[A-Za-z]*", message = "must contain only letters")
+   public String getLetters()
+   {
+      return letters;
+   }
+
+   public void setLetters(String letters)
+   {
+      this.letters = letters;
+   }
+
+   @NotNull
+   @NotEmpty
+   @Digits(fraction = 0, integer = 2)
+   public String getNumbers()
+   {
+      return numbers;
+   }
+
+   public void setNumbers(String numbers)
+   {
+      this.numbers = numbers;
+   }
+
+   @NotNull
+   @NotEmpty
+   @Email
+   public String getEmail()
+   {
+      return email;
+   }
+
+   public void setEmail(String email)
+   {
+      this.email = email;
+   }
+
+}

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/META-INF/context.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/META-INF/context.xml?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/webapp/META-INF/context.xml (added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/webapp/META-INF/context.xml Sun May  8
16:49:58 2016
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+   <!-- disable storage of sessions across restarts -->
+   <Manager pathname=""/>
+</Context>

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/beans.xml?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/beans.xml (added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/beans.xml Sun May  8 16:49:58
2016
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   The contents of this file is permitted to be empty.
+   The schema definition is provided for your convenience.
+-->
+<beans 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/beans_1_0.xsd">
+</beans>

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/faces-config.xml?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/faces-config.xml Sun May
 8 16:49:58 2016
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This file is not required if you don't need any extra configuration. -->
+<faces-config version="2.0"
+   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-facesconfig_2_0.xsd">
+
+   <!-- Write your navigation rules here. You are encouraged to use CDI for creating @Named
managed beans. -->
+
+</faces-config>

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/templates/default.xhtml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/templates/default.xhtml?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/templates/default.xhtml
(added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/templates/default.xhtml
Sun May  8 16:49:58 2016
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:h="http://java.sun.com/jsf/html"
+   xmlns:ui="http://java.sun.com/jsf/facelets">
+   <h:head>
+      <title>Java EE 6 Starter Application</title>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+      <h:outputStylesheet name="css/screen.css"/>
+   </h:head>
+   <h:body>
+      <div id="container">
+         <div id="content">
+            <div id="sidebar">
+               <h3>Find out more</h3>
+               <p>
+                  Explore JavaServer Faces.
+               </p>
+               <ul>
+                  <li><a href="http://www.javaserverfaces.org">JSF community
site</a></li>
+               </ul>
+               <p>
+                  Learn more about Java EE 6 and the extensions provided by Weld and Seam.
+               </p>
+               <ul>
+                  <li><a href="http://seamframework.org/Weld/JSR299AndWeldOverview">Overview</a></li>
+                  <li><a href="http://seamframework.org">Project site</a></li>
+                  <li><a href="http://seamframework.org/Documentation/SeamDocumentation#H-WeldReferenceDocumentation">Documentation</a></li>
+                  <li><a href="http://seamframework.org/Community/Forums">User
forums</a></li>
+                  <li><a href="http://seamframework.org/Community/MailingLists">Mailing
lists</a></li>
+                  <li><a href="https://jira.jboss.org/jira/browse/WELD">Issue
tracker</a></li>
+               </ul>
+               <p>
+                  If you have an add-on, please <a href="http://seamframework.org/Community/Forums">let
us know</a> and
+                  consider <a href="http://seamframework.org/Community/Contribute">contributing</a>
it back to the
+                  community!
+               </p>
+            </div>
+            <ui:insert name="content">
+               [Template content will be inserted here]
+            </ui:insert>
+         </div>
+         <div id="footer">
+            <h:graphicImage value="/resources/gfx/weld.png" alt="Weld logo"/>
+            <p>
+               This project was generated from a Maven archetype maintained by the Weld team.<br/>
+               Weld is the reference implementation of CDI, released under the Apache License,
Version 2.0.<br/>
+            </p>
+         </div>
+      </div>
+   </h:body>
+</html>

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/web.xml?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/web.xml (added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/webapp/WEB-INF/web.xml Sun May  8 16:49:58
2016
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   If you're using GlassFish V3, you can update the version attribute to 3.0 and the schema
document to web-app_3_0.xsd
+   JBoss AS 6.0.0.M1 does not support Servlet 3.0 (expected in 6.0.0.M2)
+-->
+<web-app version="2.5"
+   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">
+
+   <!-- Activate the JSF 2.0 servlet -->
+   <!-- The JSF servlet declaration and mapping are not required for GlassFish V3 -->
+   <servlet>
+      <servlet-name>Faces Servlet</servlet-name>
+      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+
+   <!-- Tell the context which URLs to process as facelets.  -->
+   <servlet-mapping>
+      <servlet-name>Faces Servlet</servlet-name>
+      <url-pattern>*.jsf</url-pattern>
+   </servlet-mapping>
+
+   <!-- This is an optional parameter, but it makes troubleshooting errors much easier
-->
+   <!-- You are advised to delete this context parameter before a production deployment
-->
+   <context-param>
+      <param-name>facelets.DEVELOPMENT</param-name>
+      <param-value>true</param-value>
+   </context-param>
+
+</web-app>

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/home.xhtml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/home.xhtml?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/webapp/home.xhtml (added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/webapp/home.xhtml Sun May  8 16:49:58
2016
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:ui="http://java.sun.com/jsf/facelets"
+   xmlns:f="http://java.sun.com/jsf/core"
+   xmlns:h="http://java.sun.com/jsf/html"
+   template="/WEB-INF/templates/default.xhtml">
+   <ui:define name="content">
+      <h1>Hello World!</h1>
+      <p>Your CDI bean <code>HelloWorld</code> says <span style="color:
blue;">#{helloWorld.text}</span> using the Unified EL.</p>
+
+      <h:form id="bv">
+         <h2>Bean Validation examples</h2>
+         <p>Enforces annotation-based constraints defined on the model class.</p>
+         <table>
+            <tr>
+               <th style="text-align: right;">
+                  <h:outputLabel for="letters" value="Letters:"/>
+               </th>
+               <td>
+                  <h:inputText id="letters" value="#{helloWorld.letters}"/>
+                  <h:message for="letters" errorClass="invalid"/>
+               </td>
+            </tr>
+            <tr>
+               <th style="text-align: right;">
+                  <h:outputLabel for="numbers" value="Numbers:"/>
+               </th>
+               <td>
+                  <h:inputText id="numbers" value="#{helloWorld.numbers}"/>
+                  <h:message for="numbers" errorClass="invalid"/>
+               </td>
+            </tr>
+            <tr>
+               <th style="text-align: right;">
+                  <h:outputLabel for="email" value="Email:"/>
+               </th>
+               <td>
+                  <h:inputText id="email" value="#{helloWorld.email}"/>
+                  <h:message for="email" errorClass="invalid"/>
+               </td>
+            </tr>
+         </table>
+         <p>
+            <h:commandButton id="check" action="check" value="Check values"/>
+            <h:outputText value=" All clear!" rendered="#{facesContext.postback and empty
facesContext.messageList}" style="color: green;"/>
+         </p>
+      </h:form>
+   </ui:define>
+</ui:composition>

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/index.jsp?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/webapp/index.jsp (added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/webapp/index.jsp Sun May  8 16:49:58 2016
@@ -0,0 +1 @@
+<% response.sendRedirect("home.jsf"); %>

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/css/screen.css
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/css/screen.css?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/css/screen.css (added)
+++ devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/css/screen.css Sun May
 8 16:49:58 2016
@@ -0,0 +1,39 @@
+body {
+   margin: 0;
+   padding: 0;
+   background-color: #EAECEE;
+   font-family: Verdana, sans-serif;
+   font-size: 0.9em;
+}
+#container {
+   margin: 0 auto;
+   padding: 0 20px 10px 20px;
+   border: 1px solid #666666;
+   width: 865px; /* subtract 40px from banner width for padding */
+   background: #FFFFFF url(#{request.contextPath}/resources/gfx/banner.png) no-repeat;
+   padding-top: 110px;
+}
+#sidebar {
+   font-size: 0.9em;
+   width: 225px;
+   float: right;
+   border: 1px solid #666666;
+   background: #EAECEE;
+   padding: 0 15px 5px 15px;
+}
+#sidebar ul {
+   padding-left: 30px;
+}
+#footer {
+   clear: both;
+   text-align: center;
+   color: #666666;
+   font-size: 0.85em;
+}
+code {
+   font-size: 1.1em;
+}
+span.invalid {
+   padding-left: 3px;
+   color: red;
+}
\ No newline at end of file

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/banner.png
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/banner.png?rev=1742836&view=auto
==============================================================================
Binary file - no diff available.

Propchange: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/banner.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/weld.png
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/weld.png?rev=1742836&view=auto
==============================================================================
Binary file - no diff available.

Propchange: devicemap/trunk/examples/1.0/java/flow/src/main/webapp/resources/gfx/weld.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/devicemap/example/flow/HelloWorldTest.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/devicemap/example/flow/HelloWorldTest.java?rev=1742836&view=auto
==============================================================================
--- devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/devicemap/example/flow/HelloWorldTest.java
(added)
+++ devicemap/trunk/examples/1.0/java/flow/src/test/java/org/apache/devicemap/example/flow/HelloWorldTest.java
Sun May  8 16:49:58 2016
@@ -0,0 +1,13 @@
+package org.apache.devicemap.example.flow;
+
+import org.apache.devicemap.example.flow.HelloWorld;
+import org.testng.annotations.Test;
+
+public class HelloWorldTest
+{
+   @Test
+   public void testGetText() {
+      HelloWorld fixture = new HelloWorld();
+      assert "Hello World!".equals(fixture.getText());
+   }
+}

Modified: devicemap/trunk/examples/1.0/java/pom.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/1.0/java/pom.xml?rev=1742836&r1=1742835&r2=1742836&view=diff
==============================================================================
--- devicemap/trunk/examples/1.0/java/pom.xml (original)
+++ devicemap/trunk/examples/1.0/java/pom.xml Sun May  8 16:49:58 2016
@@ -8,16 +8,14 @@
 	by applicable law or agreed to in writing, software distributed under the 
 	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
 	OF ANY KIND, either express or implied. See the License for the specific 
-	language governing permissions and limitations under the License. -->
-<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">
+	language governing permissions and limitations under the License. --><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">
 	<modelVersion>4.0.0</modelVersion>
 
 	<parent>
 		<groupId>org.apache</groupId>
 		<artifactId>apache</artifactId>
 		<version>16</version>
-		<relativePath />
+		<relativePath/>
 	</parent>
 
 	<groupId>org.apache.devicemap.examples</groupId>
@@ -73,5 +71,6 @@
 	<modules>
 		<module>servlet</module>
 		<module>spring</module>
-	</modules>
-</project>
+    <module>flow</module>
+  </modules>
+</project>
\ No newline at end of file



Mime
View raw message