Author: artdaw
Date: 2009-01-16 18:49:01 -0500 (Fri, 16 Jan 2009)
New Revision: 12321
Added:
trunk/sandbox/samples/colorPicker/
trunk/sandbox/samples/colorPicker/pom.xml
trunk/sandbox/samples/colorPicker/src/
trunk/sandbox/samples/colorPicker/src/main/
trunk/sandbox/samples/colorPicker/src/main/java/
trunk/sandbox/samples/colorPicker/src/main/java/org/
trunk/sandbox/samples/colorPicker/src/main/java/org/richfaces/
trunk/sandbox/samples/colorPicker/src/main/java/org/richfaces/sandbox/
trunk/sandbox/samples/colorPicker/src/main/java/org/richfaces/sandbox/samples/
trunk/sandbox/samples/colorPicker/src/main/java/org/richfaces/sandbox/samples/Bean.java
trunk/sandbox/samples/colorPicker/src/main/resources/
trunk/sandbox/samples/colorPicker/src/main/webapp/
trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/
trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/colorPicker/src/main/webapp/index.jsp
trunk/sandbox/samples/colorPicker/src/main/webapp/pages/
trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.xhtml
trunk/sandbox/samples/colorPicker/src/test/
trunk/sandbox/samples/colorPicker/src/test/java/
trunk/sandbox/samples/colorPicker/src/test/java/org/
trunk/sandbox/samples/colorPicker/src/test/java/org/richfaces/
trunk/sandbox/samples/colorPicker/src/test/java/org/richfaces/sandbox/
trunk/sandbox/samples/colorPicker/src/test/java/org/richfaces/sandbox/samples/
trunk/sandbox/samples/colorPicker/src/test/java/org/richfaces/sandbox/samples/BeanTest.java
Log:
rich:colorPicker sample
Added: trunk/sandbox/samples/colorPicker/pom.xml
===================================================================
--- trunk/sandbox/samples/colorPicker/pom.xml (rev 0)
+++ trunk/sandbox/samples/colorPicker/pom.xml 2009-01-16 23:49:01 UTC (rev 12321)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.3.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox.samples</groupId>
+ <artifactId>colorPicker</artifactId>
+ <packaging>war</packaging>
+ <name>colorPicker Maven Webapp</name>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <finalName>colorPicker</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>3.3.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.3.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>colorPicker</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Property changes on: trunk/sandbox/samples/colorPicker/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/sandbox/samples/colorPicker/src/main/java/org/richfaces/sandbox/samples/Bean.java
===================================================================
---
trunk/sandbox/samples/colorPicker/src/main/java/org/richfaces/sandbox/samples/Bean.java
(rev 0)
+++
trunk/sandbox/samples/colorPicker/src/main/java/org/richfaces/sandbox/samples/Bean.java 2009-01-16
23:49:01 UTC (rev 12321)
@@ -0,0 +1,44 @@
+/**
+ * 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.richfaces.sandbox.ui;
+/**
+ * @author Gleb Galkin
+ *
+ */
+
+
+public class Bean {
+
+ private String color = null;
+
+ public Bean() {
+
+ }
+
+ public String getColor() {
+ return color;
+ }
+
+ public void setColor(String color) {
+ this.color = color;
+ }
+}
Property changes on:
trunk/sandbox/samples/colorPicker/src/main/java/org/richfaces/sandbox/samples/Bean.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++ trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/faces-config.xml 2009-01-16
23:49:01 UTC (rev 12321)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+
<managed-bean-class>org.richfaces.sandbox.samples.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Property changes on:
trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/web.xml 2009-01-16 23:49:01
UTC (rev 12321)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+<context-param>
+ <param-name>org.richfaces.LoadStyleStrategy</param-name>
+ <param-value>NONE</param-value>
+</context-param>
+
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Property changes on: trunk/sandbox/samples/colorPicker/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/samples/colorPicker/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox/samples/colorPicker/src/main/webapp/index.jsp
(rev 0)
+++ trunk/sandbox/samples/colorPicker/src/main/webapp/index.jsp 2009-01-16 23:49:01 UTC
(rev 12321)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/pages/index.jsf" />
+ </body>
+
+</html>
\ No newline at end of file
Property changes on: trunk/sandbox/samples/colorPicker/src/main/webapp/index.jsp
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.jsp
(rev 0)
+++ trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.jsp 2009-01-16 23:49:01
UTC (rev 12321)
@@ -0,0 +1,188 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/ui/colorPicker"
prefix="colorPicker"%>
+<html>
+ <head>
+ <title>ColorPicker sample page</title>
+<style type="text/css">
+
+.rich-colorPicker-wrapper{
+ display:none;
+ font-family:Arial,Helvetica,sans-serif;
+ height:176px;
+ !height:166px;
+ overflow:hidden;
+ position:absolute;
+ width:350px;
+ margin-top: 2px;
+ !margin-top: -6px;
+ !margin-left: -2px;
+}
+.rich-colorPicker-ext{
+ position: relative;
+ background-color: #ECF4FE;
+ border: 1px solid #BED6F8;
+ height: 170px;
+ padding: 0px;
+ margin: 0px;
+}
+
+.rich-colorPicker-color {
+ background:#FF0000 none repeat scroll 0 0;
+ cursor:crosshair;
+ left:7px;
+ top:7px;
+ position:absolute;
+ overflow:hidden;
+ height:150px;
+ width:150px;
+ border: 1px solid #BED6F8;
+}
+
+.rich-colorPicker-color div {
+ background:transparent url(images/colorpicker_overlay.png) repeat scroll 0 0;
+ left:0;
+ position:absolute;
+ top:0;
+ height:150px;
+ width:150px;
+}
+
+.rich-colorPicker-color div div {
+ background:transparent url(images/colorpicker_select.gif) repeat scroll 0 0;
+ left:0;
+ top:0;
+ position:absolute;
+ margin:-6px 0 0 -6px;
+ overflow:hidden;
+ width:11px;
+ height:11px;
+}
+
+.rich-colorPicker-rainbow{
+ cursor:n-resize;
+ height:150px;
+ left:160px;
+ position:absolute;
+ top:7px;
+ width:35px;
+ text-align: center;
+}
+.rich-colorPicker-rainbow div{
+ background:transparent url(images/rangearrows.gif) no-repeat scroll left top;
+ height:9px;
+ left:1px;
+ margin:-4px 0 0;
+ overflow:hidden;
+ position:absolute;
+ width:35px;
+}
+
+.rich-colorPicker-new-color, .rich-colorPicker-current-color{
+ position:absolute;
+ top:7px;
+ width: 60px;
+ height: 30px;
+ border: 1px solid #BED6F8;
+}
+
+.rich-colorPicker-current-color{
+ right:7px;
+ top:7px;
+}
+
+.rich-colorPicker-new-color{
+ left:198px;
+}
+.rich-colorPicker-hex-wrapper {
+ height:22px;
+ left:202px;
+ position:absolute;
+ top:119px;
+}
+
+.rich-colorPicker-rgb-wrapper{
+ left:184px;
+ position:absolute;
+ top:55px;
+ width:70px;
+ padding: 0px;
+ text-align: right;
+ margin-bottom: 2px
+}
+
+.rich-colorPicker-hsb-wrapper{
+ right:7px;
+ position:absolute;
+ top:55px;
+ width:70px;
+ padding: 0px;
+ text-align: right;
+ margin-bottom: 2px
+}
+.rich-colorPicker-hsb-h, .rich-colorPicker-rgb-r{
+ top:45px;
+}
+.rich-colorPicker-hsb-s, .rich-colorPicker-rgb-g{
+ top:70px;
+}
+.rich-colorPicker-hsb-b, .rich-colorPicker-rgb-b{
+ top:95px;
+}
+
+
+.rich-colorPicker-rgb-wrapper label {
+ padding-top: 2px;
+ font-size: 16px;
+}
+
+.rich-colorPicker-rgb-wrapper input, .rich-colorPicker-hex-wrapper input,
.rich-colorPicker-hsb-wrapper input{
+ width: 35px;
+ background-color: #fff;
+ border: 1px solid #BED6F8;
+ color: #000;
+ font-family: Arial,Verdana,sans-serif;
+ font-size: 16px;
+}
+
+.rich-colorPicker-hex-wrapper input{
+ width:60px;
+ font-size: 13px;
+}
+
+.rich-colorPicker-submit, .rich-colorPicker-cancel{
+ position:absolute;
+right:75px;
+top:144px;
+ border: 1px solid #BED6F8;
+}
+.rich-colorPicker-cancel{
+right:7px;
+}
+.rich-colorPicker-span input{
+ border: 1px solid #BED6F8;
+ font-size: 12px;
+ width:130px;
+ vertical-align:middle;
+}
+.rich-colorPicker-icon {
+ display:inline;
+ cursor:pointer;
+ height:16px;
+ width:16px;
+ vertical-align:middle;
+ border: 1px solid #BED6F8;
+}
+
+</style>
+
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <colorPicker:colorPicker value="#{bean.color}"
flat="false" initColor="#f0f0f0"/>
+ <h:commandButton value="Submit" />
+ </h:form>
+ </f:view>
+ </body>
+</html>
Property changes on: trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.jsp
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.xhtml
(rev 0)
+++ trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.xhtml 2009-01-16
23:49:01 UTC (rev 12321)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <f:view>
+
+ </f:view>
+</html>
\ No newline at end of file
Property changes on: trunk/sandbox/samples/colorPicker/src/main/webapp/pages/index.xhtml
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/sandbox/samples/colorPicker/src/test/java/org/richfaces/sandbox/samples/BeanTest.java
===================================================================
---
trunk/sandbox/samples/colorPicker/src/test/java/org/richfaces/sandbox/samples/BeanTest.java
(rev 0)
+++
trunk/sandbox/samples/colorPicker/src/test/java/org/richfaces/sandbox/samples/BeanTest.java 2009-01-16
23:49:01 UTC (rev 12321)
@@ -0,0 +1,46 @@
+/**
+ * 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.richfaces.sandbox.samples;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}
Property changes on:
trunk/sandbox/samples/colorPicker/src/test/java/org/richfaces/sandbox/samples/BeanTest.java
___________________________________________________________________
Name: svn:executable
+ *