Author: mvitenkov
Date: 2008-04-17 08:26:38 -0400 (Thu, 17 Apr 2008)
New Revision: 7891
Modified:
branches/3.1.x/test-applications/jsp/src/main/java/tooltip/Tooltip.java
branches/3.1.x/test-applications/jsp/src/main/webapp/Tooltip/Tooltip.jsp
branches/3.1.x/test-applications/jsp/src/main/webapp/Tooltip/TooltipProperty.jsp
Log:
ToolTip binding was added.
Modified: branches/3.1.x/test-applications/jsp/src/main/java/tooltip/Tooltip.java
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/java/tooltip/Tooltip.java 2008-04-17
12:11:15 UTC (rev 7890)
+++ branches/3.1.x/test-applications/jsp/src/main/java/tooltip/Tooltip.java 2008-04-17
12:26:38 UTC (rev 7891)
@@ -1,5 +1,9 @@
package tooltip;
+import org.richfaces.component.html.HtmlToolTip;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
public class Tooltip {
private boolean followMouse;
@@ -16,6 +20,8 @@
private String style;
private String layout;
private String event;
+ private String bindLabel;
+ private HtmlToolTip myToolTip;
public String getEvent() {
return event;
@@ -48,8 +54,27 @@
delay = 0;
style = "none";
layout = "inline";
+ bindLabel = "not ready";
+ myToolTip = new HtmlToolTip();
}
+ public void setBindLabel(String bindLabel){
+ this.bindLabel = bindLabel;
+ }
+ public String getBindLabel(){
+ return bindLabel;
+ }
+ public void setMyToolTip(HtmlToolTip myToolTip){
+ this.myToolTip = myToolTip;
+ }
+ public HtmlToolTip getMyToolTip(){
+ return myToolTip;
+ }
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = myToolTip.getClientId(context).toString();
+ }
+
public String getDirection() {
return direction;
}
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/Tooltip/Tooltip.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/Tooltip/Tooltip.jsp 2008-04-17
12:11:15 UTC (rev 7890)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/Tooltip/Tooltip.jsp 2008-04-17
12:26:38 UTC (rev 7891)
@@ -22,7 +22,8 @@
onmousemove="showEvent('onmousemoveInputID', 'onmousemove
work!')"
onmouseout="showEvent('onmouseoutInputID', 'onmouseout
work!')"
onmouseover="showEvent('onmouseoverInputID', 'onmouseover
work!')" onmouseup="showEvent('onmouseupInputID', 'onmouseup
work!')"
- onshow="showEvent('onshowInputID', 'onshow work!')">
+ onshow="showEvent('onshowInputID', 'onshow work!')"
+ >
<f:facet name="defaultContent">
<f:verbatim>DEFAULT VALUE</f:verbatim>
</f:facet>
@@ -74,7 +75,7 @@
onmousemove="showEvent('onmousemoveInputID', 'onmousemove
work!')"
onmouseout="showEvent('onmouseoutInputID', 'onmouseout
work!')"
onmouseover="showEvent('onmouseoverInputID', 'onmouseover
work!')" onmouseup="showEvent('onmouseupInputID', 'onmouseup
work!')"
- onshow="showEvent('onshowInputID', 'onshow work!')">
+ onshow="showEvent('onshowInputID', 'onshow work!')"
binding="#{tooltip.myToolTip}">
<h:graphicImage id="pricsID"
value="/pics/ajax_process.gif"></h:graphicImage>
</rich:toolTip>
</rich:panel>
Modified:
branches/3.1.x/test-applications/jsp/src/main/webapp/Tooltip/TooltipProperty.jsp
===================================================================
---
branches/3.1.x/test-applications/jsp/src/main/webapp/Tooltip/TooltipProperty.jsp 2008-04-17
12:11:15 UTC (rev 7890)
+++
branches/3.1.x/test-applications/jsp/src/main/webapp/Tooltip/TooltipProperty.jsp 2008-04-17
12:26:38 UTC (rev 7891)
@@ -90,5 +90,8 @@
<h:selectBooleanCheckbox value="#{tooltip.rendered}">
<a4j:support event="onclick" reRender="tooltipID" />
</h:selectBooleanCheckbox>
+
+ <h:commandButton actionListener="#{tooltip.checkBinding}"
value="Binding" />
+ <h:outputText value="#{tooltip.bindLabel}" />
</h:panelGrid>
</f:subview>
\ No newline at end of file
Show replies by date