Author: Alex.Kolonitsky
Date: 2011-01-18 10:56:26 -0500 (Tue, 18 Jan 2011)
New Revision: 21058
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java
Log:
RF-9641: rich:tooltip - @target is taking clientId, but component.id is expected
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java 2011-01-18
15:40:18 UTC (rev 21057)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java 2011-01-18
15:56:26 UTC (rev 21058)
@@ -66,7 +66,7 @@
}
public String getTarget() {
- return (String) getStateHelper().eval(Properties.target,
getParent().getClientId());
+ return (String) getStateHelper().eval(Properties.target, getParent().getId());
}
public void setTarget(String target) {
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java 2011-01-18
15:40:18 UTC (rev 21057)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java 2011-01-18
15:56:26 UTC (rev 21058)
@@ -30,6 +30,7 @@
import org.richfaces.context.ExtendedPartialViewContext;
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.MetaComponentRenderer;
+import org.richfaces.renderkit.util.RendererUtils;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
@@ -69,6 +70,8 @@
public static final String BEFORE_HIDE = "beforehide";
public static final String BEFORE_SHOW = "beforeshow";
+ private static final RendererUtils RENDERER_UTILS = RendererUtils.getInstance();
+
@Override
protected void doDecode(FacesContext context, UIComponent component) {
AbstractTooltip tooltip = (AbstractTooltip) component;
@@ -171,7 +174,7 @@
options.put("showDelay", tooltip.getShowDelay());
options.put("showEvent", tooltip.getShowEvent());
options.put("followMouse", tooltip.isFollowMouse());
- options.put("target", tooltip.getTarget());
+ options.put("target", RENDERER_UTILS.findComponentFor(component,
tooltip.getTarget()).getClientId(context));
addEventOption(context, tooltip, options, HIDE);
addEventOption(context, tooltip, options, SHOW);