[seam-commits] Seam SVN: r13098 - in modules/security/trunk/examples: idmconsole and 20 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Jun 9 20:50:07 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-06-09 20:50:06 -0400 (Wed, 09 Jun 2010)
New Revision: 13098
Added:
modules/security/trunk/examples/idmconsole/
modules/security/trunk/examples/idmconsole/pom.xml
modules/security/trunk/examples/idmconsole/readme.txt
modules/security/trunk/examples/idmconsole/src/
modules/security/trunk/examples/idmconsole/src/main/
modules/security/trunk/examples/idmconsole/src/main/java/
modules/security/trunk/examples/idmconsole/src/main/java/org/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java
modules/security/trunk/examples/idmconsole/src/main/resources/
modules/security/trunk/examples/idmconsole/src/main/webapp/
modules/security/trunk/examples/idmconsole/src/main/webapp/META-INF/
modules/security/trunk/examples/idmconsole/src/main/webapp/META-INF/context.xml
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/default.xhtml
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/web.xml
modules/security/trunk/examples/idmconsole/src/main/webapp/home.xhtml
modules/security/trunk/examples/idmconsole/src/main/webapp/index.jsp
modules/security/trunk/examples/idmconsole/src/main/webapp/resources/
modules/security/trunk/examples/idmconsole/src/main/webapp/resources/css/
modules/security/trunk/examples/idmconsole/src/main/webapp/resources/css/screen.css
modules/security/trunk/examples/idmconsole/src/main/webapp/resources/gfx/
modules/security/trunk/examples/idmconsole/src/main/webapp/resources/gfx/banner.png
modules/security/trunk/examples/idmconsole/src/main/webapp/resources/gfx/weld.png
modules/security/trunk/examples/idmconsole/src/test/
modules/security/trunk/examples/idmconsole/src/test/java/
modules/security/trunk/examples/idmconsole/src/test/java/org/
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java
modules/security/trunk/examples/idmconsole/src/test/resources/
Log:
re-add idmconsole example
Added: modules/security/trunk/examples/idmconsole/pom.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/pom.xml (rev 0)
+++ modules/security/trunk/examples/idmconsole/pom.xml 2010-06-10 00:50:06 UTC (rev 13098)
@@ -0,0 +1,167 @@
+<?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>
+ <groupId>org.jboss.seam.security</groupId>
+ <artifactId>idmconsole</artifactId>
+ <packaging>war</packaging>
+ <name>idmconsole</name>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <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: modules/security/trunk/examples/idmconsole/readme.txt
===================================================================
--- modules/security/trunk/examples/idmconsole/readme.txt (rev 0)
+++ modules/security/trunk/examples/idmconsole/readme.txt 2010-06-10 00:50:06 UTC (rev 13098)
@@ -0,0 +1,115 @@
+
+ idmconsole
+
+ 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/idmconsole
+
+ 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/idmconsole
+
+ If you want to deploy to GlassFish (standalone), you can upload the
+ target/idmconsole.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: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java 2010-06-10 00:50:06 UTC (rev 13098)
@@ -0,0 +1,74 @@
+package org.jboss.seam.security;
+
+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: modules/security/trunk/examples/idmconsole/src/main/webapp/META-INF/context.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/META-INF/context.xml (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/META-INF/context.xml 2010-06-10 00:50:06 UTC (rev 13098)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+ <!-- disable storage of sessions across restarts -->
+ <Manager pathname=""/>
+</Context>
Added: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml 2010-06-10 00:50:06 UTC (rev 13098)
@@ -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: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml 2010-06-10 00:50:06 UTC (rev 13098)
@@ -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: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/default.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/default.xhtml (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/default.xhtml 2010-06-10 00:50:06 UTC (rev 13098)
@@ -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: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/web.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/web.xml 2010-06-10 00:50:06 UTC (rev 13098)
@@ -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: modules/security/trunk/examples/idmconsole/src/main/webapp/home.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/home.xhtml (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/home.xhtml 2010-06-10 00:50:06 UTC (rev 13098)
@@ -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: modules/security/trunk/examples/idmconsole/src/main/webapp/index.jsp
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/index.jsp (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/index.jsp 2010-06-10 00:50:06 UTC (rev 13098)
@@ -0,0 +1 @@
+<% response.sendRedirect("home.jsf"); %>
Added: modules/security/trunk/examples/idmconsole/src/main/webapp/resources/css/screen.css
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/resources/css/screen.css (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/resources/css/screen.css 2010-06-10 00:50:06 UTC (rev 13098)
@@ -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: modules/security/trunk/examples/idmconsole/src/main/webapp/resources/gfx/banner.png
===================================================================
(Binary files differ)
Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/resources/gfx/banner.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/security/trunk/examples/idmconsole/src/main/webapp/resources/gfx/weld.png
===================================================================
(Binary files differ)
Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/resources/gfx/weld.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java 2010-06-10 00:50:06 UTC (rev 13098)
@@ -0,0 +1,12 @@
+package org.jboss.seam.security;
+
+import org.testng.annotations.Test;
+
+public class HelloWorldTest
+{
+ @Test
+ public void testGetText() {
+ HelloWorld fixture = new HelloWorld();
+ assert "Hello World!".equals(fixture.getText());
+ }
+}
More information about the seam-commits
mailing list