Author: dbiatenia
Date: 2007-07-20 12:59:22 -0400 (Fri, 20 Jul 2007)
New Revision: 1751
Added:
trunk/sandbox/ui/tooltip/
trunk/sandbox/ui/tooltip/design/
trunk/sandbox/ui/tooltip/design/funcspec/
trunk/sandbox/ui/tooltip/design/funcspec/FuncSpec - RF Tool Tip Component.doc
trunk/sandbox/ui/tooltip/design/tooltip/
trunk/sandbox/ui/tooltip/design/tooltip/tooltip.html
trunk/sandbox/ui/tooltip/pom.xml
trunk/sandbox/ui/tooltip/src/
trunk/sandbox/ui/tooltip/src/main/
trunk/sandbox/ui/tooltip/src/main/config/
trunk/sandbox/ui/tooltip/src/main/config/component/
trunk/sandbox/ui/tooltip/src/main/config/component/README
trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
trunk/sandbox/ui/tooltip/src/main/java/
trunk/sandbox/ui/tooltip/src/main/java/META-INF/
trunk/sandbox/ui/tooltip/src/main/java/META-INF/MANIFEST.MF
trunk/sandbox/ui/tooltip/src/main/java/org/
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/README
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
trunk/sandbox/ui/tooltip/src/main/resources/
trunk/sandbox/ui/tooltip/src/main/resources/org/
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/css/
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/css/tooltip.xcss
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
trunk/sandbox/ui/tooltip/src/main/templates/
trunk/sandbox/ui/tooltip/src/main/templates/README
trunk/sandbox/ui/tooltip/src/main/templates/org/
trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/
trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltipblock.jspx
trunk/sandbox/ui/tooltip/src/test/
trunk/sandbox/ui/tooltip/src/test/java/
trunk/sandbox/ui/tooltip/src/test/java/org/
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/component/
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/renderkit/
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/renderkit/html/
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/renderkit/html/ToolTipRendererTest.java
Log:
Added: trunk/sandbox/ui/tooltip/design/funcspec/FuncSpec - RF Tool Tip Component.doc
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/tooltip/design/funcspec/FuncSpec - RF Tool Tip
Component.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/tooltip/design/tooltip/tooltip.html
===================================================================
--- trunk/sandbox/ui/tooltip/design/tooltip/tooltip.html (rev 0)
+++ trunk/sandbox/ui/tooltip/design/tooltip/tooltip.html 2007-07-20 16:59:22 UTC (rev
1751)
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<title>Hint</title>
+<style>
+.hint{
+ background-color : #FFFAC6; /*tipBackgroundColor*/
+ padding : 7px;
+ border: 1px solid #C77A00; /*TipBorderColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ color : #000000; /*generalFontColor*/
+ float : left;
+}
+
+.hint_param{
+ width : 300px;
+ position : absolute;
+ top : 200px;
+ left : 200px;
+}
+
+</style>
+</head>
+
+<body>
+<div class="hint_param">
+<div class="hint">
+ Hint content
+</div>
+</div>
+
+</body>
+</html>
Added: trunk/sandbox/ui/tooltip/pom.xml
===================================================================
--- trunk/sandbox/ui/tooltip/pom.xml (rev 0)
+++ trunk/sandbox/ui/tooltip/pom.xml 2007-07-20 16:59:22 UTC (rev 1751)
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <artifactId>richfaces-parent</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.0.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tooltip</artifactId>
+ <name>tooltip</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.ajax4jsf.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>1.1.2-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>generate-tests</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>tooltip</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>common</artifactId>
+ <version>3.0.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/sandbox/ui/tooltip/src/main/config/component/README
===================================================================
Added: trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
(rev 0)
+++ trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml 2007-07-20 16:59:22 UTC
(rev 1751)
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!--
+<!DOCTYPE components PUBLIC "-//EXADEL//Generator config/EN"
"http://exadel.com/dtds/component-config.dtd" >
+ -->
+
+
+
+<components>
+ <component>
+ <name>org.richfaces.component.ToolTip</name>
+ <family>org.richfaces.component.ToolTip</family>
+ <classname>org.richfaces.component.html.HtmlToolTip</classname>
+ <superclass>org.richfaces.component.UIToolTip</superclass>
+ <description><![CDATA[Defines tooltip for parent
component.]]></description>
+ <test>
+ <classname>org.richfaces.component.html.HtmlToolTipTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
+
+ <!--renderer generate="true" override="true">
+ <name>org.richfaces.renderkit.html.ToolTipRenderer</name>
+ <template>org/richfaces/htmltooltip.jspx</template>
+ </renderer-->
+ <renderer override="true">
+ <name>org.richfaces.renderkit.html.ToolTipRenderer</name>
+ <classname>org.richfaces.renderkit.html.ToolTipRenderer</classname>
+ </renderer>
+
+ <tag>
+ <name>toolTip</name>
+ <classname>org.richfaces.taglib.HtmlToolTipTag</classname>
+ <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
+ <test>
+ <classname>org.richfaces.taglib.HtmlToolTipTagTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
+ </tag>
+
+ <property>
+ <name>blockLayout</name>
+ <classname>boolean</classname>
+ <description>block/inline mode flag. Tooltip will contain div/span elements
accordingly. False is default.</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+
+ <property>
+ <name>oncomplete</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onshow</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onhide</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+
+
+ <property>
+ <name>value</name>
+ <classname>java.lang.String</classname>
+ <description>Label on the tooltip</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>event</name>
+ <classname>java.lang.String</classname>
+ <description>event that triggers the tooltip appearance (default =
onmouseover)</description>
+ <defaultvalue><![CDATA["mouseover"]]></defaultvalue>
+ </property>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>controls the way of data loading to tooltip and should have
following values “client” (default), “ajax”</description>
+ <defaultvalue><![CDATA["client"]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>If false the components is rendered on the client but Js for
calling – disabled.</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>direction</name>
+ <classname>java.lang.String</classname>
+ <description>Defines direction of the popup list to appear (top-right,
top-left bottom-right, bottom-left, auto(default))</description>
+
<defaultvalue><![CDATA["bottom-right"]]></defaultvalue>
+ </property>
+ <property>
+ <name>followmouse</name>
+ <classname>boolean</classname>
+ <description>If true – tooltip should follow the mouse while it moves over
the parent element</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>horizontalOffset</name>
+ <classname>int</classname>
+ <description>Sets the horizontal offset between popup list and mouse
pointer</description>
+ <defaultvalue>10</defaultvalue>
+ </property>
+ <property>
+ <name>verticalOffset</name>
+ <classname>int</classname>
+ <description>Sets the vertical offset between popup list and mouse
pointer</description>
+ <defaultvalue>10</defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+ &ui_component_attributes;
+ &html_events;
+
+ <property>
+ <name>onclick</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ondblclick</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmouseout</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmousemove</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmouseover</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ </component>
+ <renderer generate="true">
+ <template>org/richfaces/htmltooltipblock.jspx</template>
+ </renderer>
+ <!--renderer generate="true" override="true">
+ <name>org.richfaces.renderkit.html.ToolTipRenderer</name>
+ <template>org/richfaces/htmltooltip.jspx</template>
+ </renderer-->
+ <renderer generate="true">
+ <template>org/richfaces/htmltooltip.jspx</template>
+ </renderer>
+</components>
\ No newline at end of file
Added: trunk/sandbox/ui/tooltip/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/java/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/sandbox/ui/tooltip/src/main/java/META-INF/MANIFEST.MF 2007-07-20 16:59:22 UTC
(rev 1751)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/README
===================================================================
Added: trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
(rev 0)
+++
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2007-07-20
16:59:22 UTC (rev 1751)
@@ -0,0 +1,130 @@
+package org.richfaces.component;
+
+import java.io.IOException;
+import java.util.Set;
+
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+
+import org.ajax4jsf.framework.ajax.AjaxChildrenEncoder;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.richfaces.renderkit.html.ToolTipRenderer;
+
+public abstract class UIToolTip extends UIComponentBase implements AjaxChildrenEncoder{
+
+ public static final String COMPONENT_TYPE = "org.richfaces.toolTip";
+ public static final String CONTENT_FACET_NAME = "defaultContent";
+
+ public abstract String getValue();
+
+ public abstract void setValue(String value);
+
+ public abstract boolean isBlockLayout();
+
+ public abstract void setBlockLayout(boolean value);
+
+ public abstract String getEvent();
+
+ public abstract void setEvent(String event);
+
+ public abstract String getMode();
+
+ public abstract void setMode(String mode);
+
+ public abstract boolean isDisabled();
+
+ public abstract void setDisabled(boolean disabled);
+
+ public abstract String getDirection();
+
+ public abstract void setDirection(String direction);
+
+ public abstract boolean isFollowMouse();
+
+ public abstract void setFollowMouse(boolean followMouse);
+
+ public abstract int getHorizontalOffset();
+
+ public abstract void setHorizontalOffset(int horizontalOffset);
+
+ public abstract int getVerticalOffset();
+
+ public abstract void setVerticalOffset(int verticalOffset);
+
+ public abstract String getStyle();
+
+ public abstract void setStyle(String style);
+
+ public abstract String getStyleClass();
+
+ public abstract void setStyleClass(String styleClass);
+
+ public abstract String getOncomplete();
+
+ public abstract void setOncomplete(String oncomplete);
+
+ public abstract String getOnshow();
+
+ public abstract void setOnshow(String onshow);
+
+ public abstract String getOnhide();
+
+ public abstract void setOnhide(String onhide);
+
+ public abstract String getOnclick();
+
+ public abstract void setOnclick(String onclick);
+
+ public abstract String getOndblclick();
+
+ public abstract void setOndblclick(String ondblclick);
+
+ public abstract String getOnmouseout();
+
+ public abstract void setOnmouseout(String onmouseout);
+
+ public abstract String getOnmousemove();
+
+ public abstract void setOnmousemove(String onmousemove);
+
+ public abstract String getOnmouseover();
+
+ public abstract void setOnmouseover(String onmouseover);
+
+ public String getUsedElementType(){
+ return isBlockLayout() ? "div" : "span";
+ }
+
+ public void broadcast(FacesEvent event) throws AbortProcessingException {
+
+ super.broadcast(event);
+
+ if (event instanceof AjaxEvent) {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+ ajaxContext.getAjaxAreasToRender().add(this.getClientId(facesContext) +
"content");
+ ajaxContext.addRegionsFromComponent(this);
+ }
+ }
+
+ public void encodeAjaxChild(FacesContext context, String path, Set ids,
+ Set renderedAreas) throws IOException {
+
+ if(ids.contains(this.getClientId(context) + "content")){
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ ToolTipRenderer r = (ToolTipRenderer)getRenderer(context);
+ r.encodeTooltipText(context, this);
+ ajaxContext.getAjaxRenderedAreas().add(this.getClientId(context) +
"content");
+ } else {
+ // todo
+// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+// ajaxContext.e
+
+ }
+
+ }
+
+}
Added:
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
---
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
(rev 0)
+++
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-07-20
16:59:22 UTC (rev 1751)
@@ -0,0 +1,341 @@
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
+import org.ajax4jsf.framework.util.javascript.JSReference;
+import org.richfaces.component.UIToolTip;
+
+public class ToolTipRenderer extends AjaxComponentRendererBase{
+
+ //
+ // Declarations
+ //
+ private final InternetResource[] styles = {
+ getResource("/org/richfaces/renderkit/html/css/tooltip.xcss")
+ };
+
+private InternetResource[] stylesAll = null;
+
+protected InternetResource[] getStyles() {
+ synchronized (this) {
+ if (stylesAll == null) {
+ InternetResource[] rsrcs = super.getStyles();
+ boolean ignoreSuper = rsrcs == null || rsrcs.length == 0;
+ boolean ignoreThis = styles == null || styles.length == 0;
+
+ if (ignoreSuper) {
+ if (ignoreThis) {
+ stylesAll = new InternetResource[0];
+ } else {
+ stylesAll = styles;
+ }
+ } else {
+ if (ignoreThis) {
+ stylesAll = rsrcs;
+ } else {
+ java.util.Set rsrcsSet = new java.util.LinkedHashSet();
+
+ for (int i = 0; i < rsrcs.length; i++ ) {
+ rsrcsSet.add(rsrcs[i]);
+ }
+
+ for (int i = 0; i < styles.length; i++ ) {
+ rsrcsSet.add(styles[i]);
+ }
+
+ stylesAll = (InternetResource[]) rsrcsSet.toArray(new
InternetResource[rsrcsSet.size()]);
+ }
+ }
+ }
+ }
+
+ return stylesAll;
+}
+ private final InternetResource[] scripts = {
+ new org.ajax4jsf.framework.resource.PrototypeScript()
+ ,
+ new org.ajax4jsf.framework.ajax.AjaxScript()
+ ,
+ getResource("/org/richfaces/renderkit/html/scripts/utils.js")
+ ,
+ getResource("/org/richfaces/renderkit/html/scripts/tooltip.js")
+ };
+
+private InternetResource[] scriptsAll = null;
+
+protected InternetResource[] getScripts() {
+ synchronized (this) {
+ if (scriptsAll == null) {
+ InternetResource[] rsrcs = super.getScripts();
+ boolean ignoreSuper = rsrcs == null || rsrcs.length == 0;
+ boolean ignoreThis = scripts == null || scripts.length == 0;
+
+ if (ignoreSuper) {
+ if (ignoreThis) {
+ scriptsAll = new InternetResource[0];
+ } else {
+ scriptsAll = scripts;
+ }
+ } else {
+ if (ignoreThis) {
+ scriptsAll = rsrcs;
+ } else {
+ java.util.Set rsrcsSet = new java.util.LinkedHashSet();
+
+ for (int i = 0; i < rsrcs.length; i++ ) {
+ rsrcsSet.add(rsrcs[i]);
+ }
+
+ for (int i = 0; i < scripts.length; i++ ) {
+ rsrcsSet.add(scripts[i]);
+ }
+
+ scriptsAll = (InternetResource[]) rsrcsSet.toArray(new
InternetResource[rsrcsSet.size()]);
+ }
+ }
+ }
+ }
+
+ return scriptsAll;
+}
+ //
+ //
+ //
+
+
+ private String convertToString(Object obj ) {
+ return ( obj == null ? "" : obj.toString() );
+ }
+ private String convertToString(boolean b ) {
+ return String.valueOf(b);
+ }
+ private String convertToString(int b ) {
+ return b!=Integer.MIN_VALUE?String.valueOf(b):"";
+ }
+ private String convertToString(long b ) {
+ return b!=Long.MIN_VALUE?String.valueOf(b):"";
+ }
+
+
+
+ protected Class getComponentClass() {
+ return org.richfaces.component.UIToolTip.class;
+ }
+
+ public String getBgColor(FacesContext context, UIComponent component){
+ Skin skin = getSkin(context);
+ String color = (String) skin.getParameter(context,"headerBackgroundColor");
+ return color;
+ }
+
+ public String getColor(FacesContext context, UIComponent component){
+ Skin skin = getSkin(context);
+ String color = (String) skin.getParameter(context,"headerTextColor");
+ return color;
+ }
+
+
+
+ public void insertValue(FacesContext context, UIComponent component) throws IOException
{
+ Object value = component.getAttributes().get("value");
+ if (value!=null){
+ context.getResponseWriter().write(value.toString());
+ }
+ }
+
+
+ public String insertAjaxFunction(FacesContext context, UIComponent component){
+ JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
+ component.getClientId(context);
+
+ Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component);
+
+ //after element is subsituted in DOM tree, we have to re-create
+ //it's JS-reference, cause old one is already invalid
+ String refreshTooltipInDOM = ";" + getJsVarName(context, component) +
".toolTip = $('" + component.getClientId(context) + "');" +
+ ";" + getJsVarName(context, component) + ".toolTipContent =
$('" + component.getClientId(context) + "content');";
+
+ String showNewToolTip = ";" + getJsVarName(context, component) +
".displayDiv();";
+
+ //enable ajaxSingle mode, i.e. we do not need to submit all form controls to get
tooltip content
+ eventOptions.put("control", JSReference.THIS);
+
+ if(eventOptions.containsKey("oncomplete")){
+ JSFunctionDefinition onComplete =
(JSFunctionDefinition)eventOptions.get("oncomplete");
+ onComplete.addToBody(refreshTooltipInDOM + showNewToolTip);
+ eventOptions.put("oncomplete", onComplete);
+ } else {
+ JSFunctionDefinition onComplete = new JSFunctionDefinition();
+ onComplete.addParameter("request");
+ onComplete.addParameter("event");
+ onComplete.addParameter("data");
+ onComplete.addToBody(refreshTooltipInDOM + showNewToolTip);
+ eventOptions.put("oncomplete", onComplete);
+ }
+
+ function.addParameter(eventOptions);
+
+ return function.toScript();
+ }
+
+
+ public void insertScript(FacesContext context, UIComponent component) throws
IOException{
+
+ UIToolTip toolTip = (UIToolTip)component;
+ String parentClientId = toolTip.getParent().getClientId(context);
+ StringBuffer ret = new StringBuffer();
+ ret.append("<script ");
+ ret.append("type=\"text/javascript\" ");
+ ret.append("id =\"script" +
component.getClientId(context)+"\">\n");
+ String comma = ",";
+ String quot = "\"";
+ StringBuffer script = new StringBuffer();
+ //
+ String event = toolTip.getEvent();
+ if(event.startsWith("on")){
+ event = event.substring(2);
+ }
+ String events = "{event:\"" + event + "\",onshow:\""
+ toolTip.getOnshow() +
+ "\",oncomplete:\"" + toolTip.getOncomplete() +
"\",onhide:\"" + toolTip.getOnhide() +
+ "\"}";
+ //script.append("var tooltip1 = ").
+
+ script.append(getJsVarName(context, toolTip) + " = ").
+ append("new ToolTip(" + events).append(comma).append(quot).append(
toolTip.getClientId(context)).append(quot).append(comma).
+ append(quot).append(parentClientId).append(quot).append(comma).
+ append(quot).append(toolTip.getMode()).append(quot).append(comma).
+ append(toolTip.isDisabled()).append(comma).
+ append(quot).append(toolTip.getDirection()).append(quot).append(comma).
+ append(toolTip.isFollowMouse()).append(comma).
+ append(toolTip.getHorizontalOffset()).append(comma).
+ append(toolTip.getVerticalOffset()).append(comma).
+ append("\"").append(insertAjaxFunction(context,
component)).append("\");\n");
+ ret.append(script.toString());
+
+ //
+ //ret.append("function toolTipAttach(){tooltip1.attachParentEvents() }\n");
+
+ ret.append("\n</script>");
+ ResponseWriter writer = context.getResponseWriter();
+ writer.write(ret.toString());
+
+ }
+
+
+ private String getJsVarName(FacesContext context, UIComponent component){
+ return "window.tooltip" +
component.getClientId(context).replaceAll("[^A-Za-z0-9_]", "_");
+ }
+
+ protected void doDecode(FacesContext context, UIComponent component) {
+
+ UIToolTip tooltip = (UIToolTip)component;
+
+ String clientId = tooltip.getClientId(context);
+
+ if(context.getExternalContext().getRequestParameterMap().containsKey(clientId)){
+ if("ajax".equals(tooltip.getMode())){
+ new AjaxEvent(component).queue();
+ }
+ }
+ }
+
+ public void encodeTooltipText(FacesContext context, UIToolTip component) throws
IOException {
+ ResponseWriter responseWriter = context.getResponseWriter();
+ responseWriter.startElement(component.getUsedElementType(), component);
+ responseWriter.writeAttribute("id", component.getClientId(context) +
"content", null);
+ responseWriter.write(component.getValue() != null ? component.getValue() :
"");
+ super.renderChildren(context, component);
+ responseWriter.endElement(component.getUsedElementType());
+ }
+
+
+ protected void doEncodeBegin(ResponseWriter writer, FacesContext context,
+ UIComponent component) throws IOException {
+ // TODO Auto-generated method stub
+ //super.doEncodeBegin(writer, context, component);
+ UIToolTip toolTip = (UIToolTip)component;
+ Class rendererClass = null;
+ try{
+ if(toolTip.isBlockLayout()){
+ rendererClass =
Class.forName("org.richfaces.renderkit.html.HtmlToolTipRendererBlock");
+ } else {
+ rendererClass =
Class.forName("org.richfaces.renderkit.html.HtmlToolTipRenderer");
+ }
+ ToolTipRenderer renderer = (ToolTipRenderer)rendererClass.newInstance();
+ renderer.doEncodeBegin(writer, context, component);
+
+ } catch(Exception e){
+ throw new FacesException(e.getMessage(), e);
+ }
+ }
+
+
+ protected void doEncodeChildren(ResponseWriter writer,
+ FacesContext context, UIComponent component) throws IOException {
+ // TODO Auto-generated method stub
+ //super.doEncodeChildren(writer, context, component);
+ UIToolTip toolTip = (UIToolTip)component;
+ Class rendererClass = null;
+ try{
+ if(toolTip.isBlockLayout()){
+ rendererClass =
Class.forName("org.richfaces.renderkit.html.HtmlToolTipRendererBlock");
+ } else {
+ rendererClass =
Class.forName("org.richfaces.renderkit.html.HtmlToolTipRenderer");
+ }
+
+ ToolTipRenderer renderer = null;
+
+ renderer = (ToolTipRenderer)rendererClass.newInstance();
+
+ renderer.doEncodeChildren(writer, context, component);
+ } catch(Exception e){
+ throw new FacesException(e.getMessage(), e);
+ }
+
+
+ }
+
+
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context,
+ UIComponent component) throws IOException {
+ // TODO Auto-generated method stub
+ //super.doEncodeEnd(writer, context, component);
+ UIToolTip toolTip = (UIToolTip)component;
+ Class rendererClass = null;
+ try{
+ if(toolTip.isBlockLayout()){
+ rendererClass =
Class.forName("org.richfaces.renderkit.html.HtmlToolTipRendererBlock");
+ } else {
+ rendererClass =
Class.forName("org.richfaces.renderkit.html.HtmlToolTipRenderer");
+ }
+ ToolTipRenderer renderer = (ToolTipRenderer)rendererClass.newInstance();
+ renderer.doEncodeEnd(writer, context, component);
+ } catch (Exception e) {
+ throw new FacesException(e.getMessage(), e);
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see javax.faces.render.Renderer#getRendersChildren()
+ */
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+
+}
+
Added:
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/css/tooltip.xcss
===================================================================
---
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/css/tooltip.xcss
(rev 0)
+++
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/css/tooltip.xcss 2007-07-20
16:59:22 UTC (rev 1751)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template
+
xmlns:f="http://jsf.exadel.com/template"
+
xmlns:u="http://jsf.exadel.com/template/util"
+
xmlns="http://www.w3.org/1999/xhtml">
+
+
+ <u:selector name=".dr-rich-tool-tip">
+ <u:style name="background-color" skin="tipBackgroundColor"/>
+ <u:style name="padding" value="7px"/>
+ <u:style name="border" value="1px solid"/>
+ <u:style name="border-color" skin="tipBorderColor"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="color" skin="generalFontColor"/>
+ <u:style name="float" value="left"/>
+ </u:selector>
+
+</f:template>
Added:
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
---
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
(rev 0)
+++
trunk/sandbox/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-07-20
16:59:22 UTC (rev 1751)
@@ -0,0 +1,267 @@
+// Detect if the browser is IE or not.
+// If it is not IE, we assume that the browser is NS.
+var IE = document.all?true:false;
+
+ToolTip = Class.create();
+
+ToolTip.prototype = {
+ initialize:function(events, id, parentId, mode, disabled, direction, followMouse,
horizontalOffset, verticalOffset, ajaxFunction){
+ this.event = events.event;
+ this.onshow = events.onshow;
+ this.oncomplete = events.oncomplete;
+ this.onhide = events.onhide;
+
+ this.id = id;
+ this.parentId = parentId;
+ this.mode = mode;
+ this.direction = direction;
+ this.disabled = disabled;
+ this.followMouse = followMouse;
+ this.horizontalOffset = horizontalOffset;
+ this.verticalOffset = verticalOffset;
+ this.ajaxExecuteString = ajaxFunction;
+ this.toolTip = $(id);
+
+ this.toolTipContent = $(id + 'content');
+ this.toolTipDefaultContent = $(id + 'defaultContent');
+
+ this.toolTip.style.visibility='hidden';
+ this.toolTip.style.display='block';
+
+ this.toolTipOffsetW = this.toolTip.offsetWidth;
+ this.toolTipOffsetH = this.toolTip.offsetHeight;
+
+ this.toolTipW = this.toolTip.getWidth();
+ this.toolTipH = this.toolTip.getHeight();
+
+ this.toolTipBorderHeight = (this.toolTipOffsetH - this.toolTipH) / 2;
+ this.toolTipBorderWidth = (this.toolTipOffsetW - this.toolTipW) / 2;
+ this.toolTip.style.visibility = 'visible';
+ this.toolTip.style.display = "none";
+ this.parentAttached = false;
+ this.hintParentElement = null;
+
+ // mouse could be overed while ajax request is still in process,
+ // so, after DOM-element replaced, we should not display it
+ this.isMouseOvered = false;
+
+ if(IE){
+ var toolTipZindex = parseInt(this.toolTip.style.zIndex);
+ new Insertion.Before(this.toolTip,
+ "<iframe src=\"javascript:''\" frameborder=\"0\"
scrolling=\"no\" id=\"" + this.id + "iframe\"" +
+ "style=\"position: absolute; width: " + this.toolTipOffsetW +
"px; height: " + this.toolTipOffsetH + "px; display:
none;background-color:black; z-index: " +
+ + (toolTipZindex-1) + ";\">" + "</iframe>");
+ this.iframe = $(this.id + 'iframe');
+ }
+
+ if(!this.disabled) Event.observe(document.getElementsByTagName("body")[0],
"mousemove", this.attachOnLoadEvents.bindAsEventListener(this), true);
+ },
+ attachOnLoadEvents: function(){
+ if(!this.parentAttached){
+ this.parent = $(this.parentId);
+ if(this.parent != null && !this.disabled){
+ this.attachParentEvents();
+ this.parentAttached = true;
+ }
+ Event.stopObserving(document.getElementsByTagName("body")[0],
"mousemove", this.attachOnLoadEvents.bindAsEventListener(this), false);
+ }
+ },
+ attachParentEvents: function(){
+ if(this.followMouse){
+ Event.observe(this.parent, 'mousemove',
this.setToolTipPosition.bindAsEventListener(this), false);
+ }
+ Event.observe(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
+ Event.observe(this.parent, "mouseout", this.doHide.bindAsEventListener(this),
false);
+
+ Event.observe(this.toolTip, 'mouseout',
this.leaveToolTip.bindAsEventListener(this), false)
+ },
+
+ detectAncestorNode: function(leaf, element) {
+ // Return true if "element" is "leaf" or one of its parents
+ var node = leaf;
+ while (node != null && node != element)
+ node = node.parentNode;
+ return (node != null);
+ },
+
+
+ leaveToolTip: function(e) {
+
+ var hintNotLeft = false;
+
+ // detect mouse move from hint to owner
+ // if mouse entered the just the owner hintNotLeft is set true
+ hintNotLeft = this.detectAncestorNode(e.toElement,this.hintParentElement);
+ hintNotLeft = hintNotLeft ||
this.detectAncestorNode(e.relatedTarget,this.hintParentElement);
+
+ if (!hintNotLeft){
+ this.doHide(e);
+ this.isMouseOvered = false;
+ }
+ },
+
+
+
+
+ doShow: function(e){
+ this.isMouseOvered = true;
+ if (e.target)
+ this.hintParentElement = e.target;
+ if (e.srcElement)
+ this.hintParentElement = e.srcElement;
+
+
+ this.setToolTipPosition(e);
+ if(this.mode == 'ajax'){
+ if(this.toolTipDefaultContent){
+ this.toolTipContent.innerHTML = this.toolTipDefaultContent.innerHTML;
+ }
+ var event = e;
+ eval(this.ajaxExecuteString);
+ }
+ this.displayDiv(e);
+ },
+
+ doHide: function(e){
+ var fakeEvent = false;
+ fakeEvent = this.detectAncestorNode(e.toElement,this.toolTip);
+ fakeEvent = fakeEvent || this.detectAncestorNode(e.relatedTarget,this.toolTip);
+
+
+ if (!fakeEvent) {
+ this.isMouseOvered = false;
+ this.toolTip.style.display = "none";
+ if(this.iframe){
+ this.iframe.style.display = "none";
+ }
+ this.hintParentElement = null;
+ this.isMouseOvered = false;
+ }
+
+ },
+
+ doEnable: function(){
+ this.disabled = false;
+ },
+ doDisable: function(){
+ this.disabled = true;
+ },
+
+ setToolTipPosition: function(e){
+
+ var windowDim = this.windowSize();
+ var cursorX = e.clientX + document.body.scrollLeft;
+ var cursorY = e.clientY + document.body.scrollTop;
+
+ if(this.toolTip.style.display != 'none'){
+ this.toolTipH = this.toolTip.getHeight();
+ this.toolTipW = this.toolTip.getWidth();
+ }
+
+ var offsets = Position.cumulativeOffset(this.parent);
+
+ cursorX -= offsets[0];
+ cursorY -= offsets[1];
+
+ cursorX += this.parent.offsetLeft;
+ cursorY += this.parent.offsetTop;
+
+ this.toolTip.style.top = cursorY;
+ this.toolTip.style.left = cursorX;
+
+
+
+ if(this.direction == "top-left"){
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ /*
+ if(cursorY - this.verticalOffset - this.toolTipH < 0){
+ this.toolTip.style.top = cursorY + this.verticalOffset - this.toolTipH;
+ } else {
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ }
+ if(cursorX - this.horizontalOffset - this.toolTipW < 0){
+ this.toolTip.style.left = cursorX + this.horizontalOffset;
+ } else {
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ }
+ */
+ } else if(this.direction == "bottom-left"){
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ /*
+ if(cursorY + this.verticalOffset + this.toolTipH > windowDim[1]){
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ } else {
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ }
+ if(cursorX - this.horizontalOffset - this.toolTipW < 0){
+ this.toolTip.style.left = cursorX + this.horizontalOffset ;
+ } else {
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ }
+ */
+ } else if(this.direction == "top-right"){
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ this.toolTip.style.left = cursorX + this.horizontalOffset;
+ /*
+ if(cursorY - this.verticalOffset - this.toolTipH < 0){
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ } else {
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ }
+ if(cursorX + this.horizontalOffset + this.toolTipW > windowDim[0]){
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ } else {
+ this.toolTip.style.left = cursorX + this.horizontalOffset;
+ }
+ */
+ } else {
+ // bottom-right is default
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ this.toolTip.style.left = cursorX + this.horizontalOffset;
+ /*
+ if(cursorY + this.verticalOffset - this.toolTip.clientHeight > windowDim[1]){
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ } else {
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ }
+ if(cursorX + this.horizontalOffset + this.toolTip.clientWidth > windowDim[0]){
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ } else {
+ this.toolTip.style.left = cursorX + this.horizontalOffset;
+ }
+ */
+ }
+
+ },
+
+ windowSize: function() {
+ var wWidth = 0, wHeight = 0;
+ if( typeof( window.innerWidth ) == 'number' ) {
+ //Non-IE
+ wWidth = window.innerWidth;
+ wHeight = window.innerHeight;
+ } else if( document.documentElement && ( document.documentElement.clientWidth
|| document.documentElement.clientHeight ) ) {
+ //IE 6+ in 'standards compliant mode'
+ wWidth = document.documentElement.clientWidth;
+ wHeight = document.documentElement.clientHeight;
+ } else if( document.body && ( document.body.clientWidth ||
document.body.clientHeight ) ) {
+ //IE 4 compatible
+ wWidth = document.body.clientWidth;
+ wHeight = document.body.clientHeight;
+ }
+ return [wWidth,wHeight];
+ },
+
+ displayDiv: function(e){
+ if(this.isMouseOvered){
+ this.toolTip.style.display = "block";
+ if(this.iframe){
+ this.iframe.style.top = parseInt(this.toolTip.style.top) - this.toolTipBorderHeight;
+ this.iframe.style.left = parseInt(this.toolTip.style.left) -
this.toolTipBorderWidth;
+ this.iframe.style.display = "block";
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/sandbox/ui/tooltip/src/main/templates/README
===================================================================
Added: trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
(rev 0)
+++ trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx 2007-07-20
16:59:22 UTC (rev 1751)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+
xmlns:f="http:/jsf.exadel.com/template"
+ xmlns:h="
http://ajax4jsf.org/cdk/headers"
+ xmlns:c="
http://java.sun.com/jsf/core"
+ xmlns:ui="
http://ajax4jsf.org/cdk/ui"
+ xmlns:u="
http://ajax4jsf.org/cdk/u"
+ xmlns:x="
http://ajax4jsf.org/cdk/x"
+
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.HtmlToolTipRenderer"
+ baseclass="org.richfaces.renderkit.html.ToolTipRenderer"
+ component="org.richfaces.component.UIToolTip" >
+
+ <!-- h:styles>
+ /org/richfaces/renderkit/html/css/tooltip.xcss
+ </h:styles>
+ <h:scripts>
+ new org.ajax4jsf.framework.resource.PrototypeScript(),
+ new org.ajax4jsf.framework.ajax.AjaxScript(),
+ /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/richfaces/renderkit/html/scripts/tooltip.js
+ </h:scripts-->
+
+ <f:clientid var="clientId"/>
+ <span id="#{clientId}" style="position: absolute; display :
none;z-index:99; #{component.attributes['style']}"
class="dr-rich-tool-tip rich-tool-tip
#{component.attributes['styleClass']}">
+ <f:call name="utils.encodePassThru" />
+ <span id="#{clientId}defaultContent"
style="display:none">
+ <u:insertFacet name="defaultContent" />
+ </span>
+ <vcp:body>
+ <f:call name="encodeTooltipText"/>
+ </vcp:body>
+ <f:clientid var="clientId"/>
+ <span id="#{clientId}script" style="display:none">
+ <f:call name="insertScript"/>
+ </span>
+ </span>
+
+
+
+
+ <!-- f:call name="utils.encodeEndFormIfNessesary"/-->
+</f:root>
Added: trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltipblock.jspx
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltipblock.jspx
(rev 0)
+++
trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltipblock.jspx 2007-07-20
16:59:22 UTC (rev 1751)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+
xmlns:f="http:/jsf.exadel.com/template"
+ xmlns:h="
http://ajax4jsf.org/cdk/headers"
+ xmlns:c="
http://java.sun.com/jsf/core"
+ xmlns:ui="
http://ajax4jsf.org/cdk/ui"
+ xmlns:u="
http://ajax4jsf.org/cdk/u"
+ xmlns:x="
http://ajax4jsf.org/cdk/x"
+
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.HtmlToolTipRendererBlock"
+ baseclass="org.richfaces.renderkit.html.ToolTipRenderer"
+ component="org.richfaces.component.UIToolTip" >
+
+ <!-- h:styles>
+ /org/richfaces/renderkit/html/css/tooltip.xcss
+ </h:styles>
+ <h:scripts>
+ new org.ajax4jsf.framework.resource.PrototypeScript(),
+ new org.ajax4jsf.framework.ajax.AjaxScript(),
+ /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/richfaces/renderkit/html/scripts/tooltip.js
+ </h:scripts-->
+
+ <f:clientid var="clientId"/>
+ <div id="#{clientId}" style="position: absolute; display :
none;z-index:99; #{component.attributes['style']}"
class="dr-rich-tool-tip rich-tool-tip
#{component.attributes['styleClass']}">
+ <f:call name="utils.encodePassThru" />
+ <div id="#{clientId}defaultContent"
style="display:none">
+ <u:insertFacet name="defaultContent" />
+ </div>
+ <vcp:body>
+ <f:call name="encodeTooltipText"/>
+ </vcp:body>
+ <f:clientid var="clientId"/>
+ <span id="#{clientId}script" style="display:none">
+ <f:call name="insertScript"/>
+ </span>
+ </div>
+ <!-- f:call name="utils.encodeEndFormIfNessesary"/-->
+</f:root>
Added:
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java
===================================================================
--- trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java
(rev 0)
+++
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java 2007-07-20
16:59:22 UTC (rev 1751)
@@ -0,0 +1,53 @@
+/**
+ * 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.component;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import javax.faces.component.UIComponent;
+
+/**
+ * Unit test for simple Component.
+ */
+public class JSFComponentTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public JSFComponentTest( String testName )
+ {
+ super( testName );
+ }
+
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testComponent()
+ {
+ assertTrue( true );
+ }
+}
Added:
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/renderkit/html/ToolTipRendererTest.java
===================================================================
---
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/renderkit/html/ToolTipRendererTest.java
(rev 0)
+++
trunk/sandbox/ui/tooltip/src/test/java/org/richfaces/renderkit/html/ToolTipRendererTest.java 2007-07-20
16:59:22 UTC (rev 1751)
@@ -0,0 +1,40 @@
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+public class ToolTipRendererTest extends AbstractAjax4JsfTestCase{
+
+ public ToolTipRendererTest(String name) {
+ super(name);
+ // TODO Auto-generated constructor stub
+ }
+
+
+ public void setUp() throws Exception {
+ // TODO Auto-generated method stub
+
+ super.setUp();
+ }
+
+
+ protected void setupResponseWriter() throws IOException {
+ // TODO Auto-generated method stub
+ super.setupResponseWriter();
+ }
+
+
+ protected void setupWebClient() {
+ // TODO Auto-generated method stub
+ super.setupWebClient();
+ }
+
+
+ public void tearDown() throws Exception {
+ // TODO Auto-generated method stub
+ super.tearDown();
+ }
+
+
+}