Author: dbiatenia
Date: 2007-07-20 13:12:24 -0400 (Fri, 20 Jul 2007)
New Revision: 1753
Added:
trunk/sandbox/samples/tooltip-sample/
trunk/sandbox/samples/tooltip-sample/pom.xml
trunk/sandbox/samples/tooltip-sample/src/
trunk/sandbox/samples/tooltip-sample/src/main/
trunk/sandbox/samples/tooltip-sample/src/main/java/
trunk/sandbox/samples/tooltip-sample/src/main/java/org/
trunk/sandbox/samples/tooltip-sample/src/main/java/org/richfaces/
trunk/sandbox/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/tooltip-sample/src/main/resources/
trunk/sandbox/samples/tooltip-sample/src/main/webapp/
trunk/sandbox/samples/tooltip-sample/src/main/webapp/META-INF/
trunk/sandbox/samples/tooltip-sample/src/main/webapp/META-INF/MANIFEST.MF
trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/
trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/tooltip-sample/src/main/webapp/index.jsp
trunk/sandbox/samples/tooltip-sample/src/main/webapp/pages/
trunk/sandbox/samples/tooltip-sample/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/tooltip-sample/src/test/
trunk/sandbox/samples/tooltip-sample/src/test/java/
trunk/sandbox/samples/tooltip-sample/src/test/java/org/
trunk/sandbox/samples/tooltip-sample/src/test/java/org/richfaces/
trunk/sandbox/samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java
Log:
Added: trunk/sandbox/samples/tooltip-sample/pom.xml
===================================================================
--- trunk/sandbox/samples/tooltip-sample/pom.xml (rev 0)
+++ trunk/sandbox/samples/tooltip-sample/pom.xml 2007-07-20 17:12:24 UTC (rev 1753)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>richfaces-samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.0.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tooltip-sample</artifactId>
+ <packaging>war</packaging>
+ <name>tooltip-sample Maven Webapp</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tooltip</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>skins</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>tooltip-sample</finalName>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/sandbox/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
(rev 0)
+++ trunk/sandbox/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java 2007-07-20
17:12:24 UTC (rev 1753)
@@ -0,0 +1,87 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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;
+
+import java.util.Date;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+ String text;
+
+ String toolTipContent = "ToolTip content";
+
+ String text1 = "ToolTip content1";
+ String text2 = "ToolTip content2";
+ String text3 = "ToolTip content3";
+
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public String getToolTipContent() {
+// toolTipContent += "12";
+// System.out.println("start - " + new Date(System.currentTimeMillis()));
+// for(int i=0;i<100000;i++){
+// double a = Math.cos(i+(Math.asin(1.334)));
+// }
+// System.out.println("end - " + new Date(System.currentTimeMillis()));
+ return toolTipContent;
+ }
+
+ public void setToolTipContent(String toolTipContent) {
+ this.toolTipContent = toolTipContent;
+ }
+
+ public String getText1() {
+ return text1;
+ }
+
+ public void setText1(String text1) {
+ this.text1 = text1;
+ }
+
+ public String getText2() {
+ return text2;
+ }
+
+ public void setText2(String text2) {
+ this.text2 = text2;
+ }
+
+ public String getText3() {
+ return text3;
+ }
+
+ public void setText3(String text3) {
+ this.text3 = text3;
+ }
+
+}
\ No newline at end of file
Added: trunk/sandbox/samples/tooltip-sample/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/sandbox/samples/tooltip-sample/src/main/webapp/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/sandbox/samples/tooltip-sample/src/main/webapp/META-INF/MANIFEST.MF 2007-07-20
17:12:24 UTC (rev 1753)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Added: trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-07-20
17:12:24 UTC (rev 1753)
@@ -0,0 +1,16 @@
+<?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.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+</faces-config>
Added: trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml 2007-07-20
17:12:24 UTC (rev 1753)
@@ -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.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+<!--context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param-->
+
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>forceparser</param-name>
+ <param-value>true</param-value>
+ </init-param>
+
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</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>
Added: trunk/sandbox/samples/tooltip-sample/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox/samples/tooltip-sample/src/main/webapp/index.jsp
(rev 0)
+++ trunk/sandbox/samples/tooltip-sample/src/main/webapp/index.jsp 2007-07-20 17:12:24 UTC
(rev 1753)
@@ -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
Added: trunk/sandbox/samples/tooltip-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/tooltip-sample/src/main/webapp/pages/index.jsp
(rev 0)
+++ trunk/sandbox/samples/tooltip-sample/src/main/webapp/pages/index.jsp 2007-07-20
17:12:24 UTC (rev 1753)
@@ -0,0 +1,40 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="http://richfaces.ajax4jsf.org/tooltip"
prefix="tt"%>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j"%>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <h:selectOneRadio binding="#{skinBean.component}" />
+ <h:commandLink action="#{skinBean.change}" value="set skin"
/>
+ <f:verbatim>
+ <br/><br/>
+ <div
style="position:relative;top:100px;left:100px;background-color:aqua">
+ </f:verbatim>
+
+ <h:commandButton value="Tooltip with followMouse mode"
id="btn">
+ <tt:toolTip id="tt" followMouse="true"
direction="top-right" mode="ajax"
value="#{bean.toolTipContent}" horizontalOffset="5"
verticalOffset="5" blockLayout="true">
+ <f:facet name="defaultContent"><f:verbatim>DEFAULT
CONTENT</f:verbatim>
+ </f:facet>
+ <h:outputText id="ot"
value="#{bean.toolTipContent}"></h:outputText>
+ <h:commandLink value="Click here to close
window..."></h:commandLink>
+ </tt:toolTip>
+ </h:commandButton>
+ <f:verbatim>
+ </div>
+ </f:verbatim>
+ <%-- h:commandButton value="Tooltip with followMouse mode"
id="btn">
+ <tt:toolTip value="Tooltip text" followMouse="false"
onclick="alert('onlcick');"
direction="bottom-left"></tt:toolTip>
+ </h:commandButton--%>
+
+ <%--a4j:log popup="false" level="ALL"></a4j:log--%>
+ </h:form>
+
+ </f:view>
+ </body>
+</html>
+
Added: trunk/sandbox/samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java
===================================================================
--- trunk/sandbox/samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java
(rev 0)
+++
trunk/sandbox/samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java 2007-07-20
17:12:24 UTC (rev 1753)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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;
+
+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 {
+
+ }
+}