Author: nbelaevski
Date: 2008-01-11 20:47:59 -0500 (Fri, 11 Jan 2008)
New Revision: 5320
Modified:
trunk/samples/tooltip-sample/pom.xml
trunk/samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/tooltip-sample/src/main/webapp/pages/demo.jsp
trunk/samples/tooltip-sample/src/main/webapp/pages/index.jsp
Log:
http://jira.jboss.com/jira/browse/RF-1833
http://jira.jboss.com/jira/browse/RF-1896
Modified: trunk/samples/tooltip-sample/pom.xml
===================================================================
--- trunk/samples/tooltip-sample/pom.xml 2008-01-12 01:46:01 UTC (rev 5319)
+++ trunk/samples/tooltip-sample/pom.xml 2008-01-12 01:47:59 UTC (rev 5320)
@@ -18,6 +18,11 @@
<version>3.2.0-SNAPSHOT</version>
</dependency>
<dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>componentControl</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
<version>3.2.0-SNAPSHOT</version>
Modified: trunk/samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-01-12
01:46:01 UTC (rev 5319)
+++ trunk/samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-01-12
01:47:59 UTC (rev 5320)
@@ -12,5 +12,16 @@
<managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
-
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>demo</from-outcome>
+ <to-view-id>/pages/demo.jsp</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>index</from-outcome>
+ <to-view-id>/pages/index.jsp</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
</faces-config>
Modified: trunk/samples/tooltip-sample/src/main/webapp/pages/demo.jsp
===================================================================
--- trunk/samples/tooltip-sample/src/main/webapp/pages/demo.jsp 2008-01-12 01:46:01 UTC
(rev 5319)
+++ trunk/samples/tooltip-sample/src/main/webapp/pages/demo.jsp 2008-01-12 01:47:59 UTC
(rev 5320)
@@ -10,7 +10,9 @@
</head>
<body>
<f:view>
- <h:outputLink value="pages/index.jsf">index.jsf</h:outputLink>
+ <h:form>
+ <h:commandLink action="index">index.jsf</h:commandLink>
+ </h:form>
<h:panelGrid columns="2">
<a4j:outputPanel layout="block"
style="width:350px;height:75px;cursor:arrow;border-width:2px;text-align:center;border:2px
solid red">
<f:verbatim>
Modified: trunk/samples/tooltip-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/tooltip-sample/src/main/webapp/pages/index.jsp 2008-01-12 01:46:01 UTC
(rev 5319)
+++ trunk/samples/tooltip-sample/src/main/webapp/pages/index.jsp 2008-01-12 01:47:59 UTC
(rev 5320)
@@ -3,6 +3,7 @@
<%--@ taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j"--%>
<%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/tooltip"
prefix="rich"%>
+<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/componentControl"
prefix="cc"%>
<html>
<head>
@@ -10,8 +11,10 @@
</head>
<body>
<f:view>
- <h:outputLink value="pages/demo.jsf">demo.jsf</h:outputLink>
<h:form>
+ <h:commandLink action="demo">demo.jsf</h:commandLink>
+ </h:form>
+ <h:form>
<h:selectOneRadio binding="#{skinBean.component}" />
<h:commandLink action="#{skinBean.change}" value="set skin"
/>
<f:verbatim>
@@ -46,6 +49,21 @@
</h:commandButton--%>
<%--a4j:log popup="false" level="ALL"></a4j:log--%>
+
+ <h:outputText id="text1" value="Text with tooltip">
+ <rich:toolTip id="controlledTooltip" followMouse="false"
direction="top-right" value="#{bean.toolTipContent}"
horizontalOffset="5" verticalOffset="5" layout="inline">
+ </rich:toolTip>
+ </h:outputText>
+
+ <f:verbatim>
+ <br />
+ <span id="controlInput">
+ Mouse down here
+ </span>
+ </f:verbatim>
+
+ <cc:componentControl event="mousedown" operation="show"
for="controlledTooltip" attachTo="controlInput" />
+ <cc:componentControl event="mouseup" operation="hide"
for="controlledTooltip" attachTo="controlInput" />
</h:form>
</f:view>