Author: abelevich
Date: 2010-11-24 13:50:05 -0500 (Wed, 24 Nov 2010)
New Revision: 20162
Added:
sandbox/trunk/examples/dnd-demo/
sandbox/trunk/examples/dnd-demo/.checkstyle
sandbox/trunk/examples/dnd-demo/pom.xml
sandbox/trunk/examples/dnd-demo/src/
sandbox/trunk/examples/dnd-demo/src/main/
sandbox/trunk/examples/dnd-demo/src/main/java/
sandbox/trunk/examples/dnd-demo/src/main/webapp/
sandbox/trunk/examples/dnd-demo/src/main/webapp/WEB-INF/
sandbox/trunk/examples/dnd-demo/src/main/webapp/WEB-INF/web.xml
sandbox/trunk/examples/dnd-demo/src/main/webapp/examples/
sandbox/trunk/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml
sandbox/trunk/examples/dnd-demo/src/main/webapp/index.xhtml
Log:
dev sample - initial commit
Added: sandbox/trunk/examples/dnd-demo/.checkstyle
===================================================================
--- sandbox/trunk/examples/dnd-demo/.checkstyle (rev 0)
+++ sandbox/trunk/examples/dnd-demo/.checkstyle 2010-11-24 18:50:05 UTC (rev 20162)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true"
sync-formatter="false">
+ <fileset name="all" enabled="true"
check-config-name="Richfaces" local="false">
+ <file-match-pattern match-pattern="."
include-pattern="true"/>
+ </fileset>
+</fileset-config>
Added: sandbox/trunk/examples/dnd-demo/pom.xml
===================================================================
--- sandbox/trunk/examples/dnd-demo/pom.xml (rev 0)
+++ sandbox/trunk/examples/dnd-demo/pom.xml 2010-11-24 18:50:05 UTC (rev 20162)
@@ -0,0 +1,158 @@
+<?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/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces.examples</groupId>
+ <artifactId>richfaces-example-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.richfaces.examples</groupId>
+ <artifactId>dnd-demo</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>Richfaces Examples: DND</name>
+ <packaging>war</packaging>
+
+ <properties>
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1-beta-1</version>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>jee6</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1-alpha-1</version>
+ <configuration>
+
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jee6</id>
+ <phase>package</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ <configuration>
+
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
+ <classifier>jee6</classifier>
+
<packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*</packagingExcludes>
+
<warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*</warSourceExcludes>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <webResources>
+ <resource>
+
<directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui.dnd</groupId>
+ <artifactId>richfaces-ui-dnd-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.dnd</groupId>
+ <artifactId>richfaces-ui-dnd-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ </dependency>
+
+ <!-- Tests -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.10</version>
+ <classifier>jdk15</classifier>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: sandbox/trunk/examples/dnd-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- sandbox/trunk/examples/dnd-demo/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ sandbox/trunk/examples/dnd-demo/src/main/webapp/WEB-INF/web.xml 2010-11-24 18:50:05
UTC (rev 20162)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <display-name>Sample RichFaces 4 Application</display-name>
+
+ <!-- context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinning</param-name>
+ <param-value>#{skinBean.enableElementsSkinning}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinningClasses</param-name>
+ <param-value>#{skinBean.enableClassesSkinning}</param-value>
+ </context-param -->
+
+
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.SKIP_COMMENTS</param-name>
+ <param-value>true</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>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+ <welcome-file>faces/index.xhtml</welcome-file>
+ </welcome-file-list>
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+</web-app>
\ No newline at end of file
Added: sandbox/trunk/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml
===================================================================
--- sandbox/trunk/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml
(rev 0)
+++ sandbox/trunk/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml 2010-11-24 18:50:05
UTC (rev 20162)
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:dnd="http://richfaces.org/dnd"
+
xmlns:a4j="http://richfaces.org/a4j">
+
+<h:head>
+ <title>Drag-n-Drop sample</title>
+ <style type="text/css">
+.droppable {
+ border: 1px solid blue;
+ margin: 4px;
+ height: 200px;
+ width: 200px;
+ background-color: yellow;
+}
+
+.draggable {
+ border: 1px solid #000000;
+ background-color: grey;
+ opacity: 0.3;
+ margin: 2px;
+ height: 50px;
+ width: 100px;
+}
+
+.rf-ind {
+ height: 50px;
+ width: 50px;
+ border: 1px dotted red;
+ background-color: blue
+}
+
+.rf-ind-acp {
+ height: 50px;
+ width: 50px;
+ border: 1px dotted red;
+ background-color: green;
+}
+
+.rf-ind-rej {
+ height: 50px;
+ width: 50px;
+ border: 1px dotted green;
+ background-color: red;
+}
+</style>
+</h:head>
+<h:body>
+ <h:form>
+
+ <dnd:dragIndicator id="ind" styleClass="rf-ind"
acceptClass="rf-ind-acp" rejectClass="rf-ind-rej"/>
+ <dnd:dragIndicator id="ind2" styleClass="rf-ind"
acceptClass="rf-ind-acp" rejectClass="rf-ind-rej"/>
+
+ <table>
+ <tr>
+ <td>
+ <a4j:outputPanel id="drg1" layout="block"
styleClass="draggable">
+ <dnd:dragBehavior event="mouseover" type="drg1"
indicator="ind"/>
+ </a4j:outputPanel>
+ </td>
+ <td>
+ <a4j:outputPanel id="drg2" layout="block"
styleClass="draggable">
+ <dnd:dragBehavior event="mouseover" type="drg2"
indicator="ind2"/>
+ </a4j:outputPanel>
+ </td>
+ <td>
+ <a4j:outputPanel id="drg3" layout="block"
styleClass="draggable">
+ <dnd:dragBehavior event="mouseover" type="drg3"
indicator="ind"/>
+ </a4j:outputPanel>
+ </td>
+ </tr>
+ </table>
+
+ <a4j:outputPanel id="drp" layout="block"
styleClass="droppable">
+ <dnd:dropBehavior event="mouseover" acceptType="drg1, drg2"
/>
+ </a4j:outputPanel>
+ </h:form>
+</h:body>
+</html>
\ No newline at end of file
Added: sandbox/trunk/examples/dnd-demo/src/main/webapp/index.xhtml
===================================================================
--- sandbox/trunk/examples/dnd-demo/src/main/webapp/index.xhtml
(rev 0)
+++ sandbox/trunk/examples/dnd-demo/src/main/webapp/index.xhtml 2010-11-24 18:50:05 UTC
(rev 20162)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:pa="http://richfaces.org/panels">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="title">RichFaces Sample</ui:define>
+
+ <ui:define name="body">
+ look at left
+ </ui:define>
+
+ <div style="top: auto;"></div>
+</ui:composition>
+</body>
+</html>