Author: nbelaevski
Date: 2008-08-06 09:00:44 -0400 (Wed, 06 Aug 2008)
New Revision: 9949
Modified:
trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
Log:
https://jira.jboss.org/jira/browse/RF-4024
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2008-08-06
13:00:10 UTC (rev 9948)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2008-08-06
13:00:44 UTC (rev 9949)
@@ -4,12 +4,14 @@
import java.util.Set;
import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.renderkit.AjaxChildrenRenderer;
import org.richfaces.renderkit.html.ToolTipRenderer;
public abstract class UIToolTip extends UICommand implements
org.ajax4jsf.component.AjaxChildrenEncoder{
@@ -132,7 +134,23 @@
ajaxContext.addRegionsFromComponent(this);
}
}
+
+ /**
+ * Instance of default renderer in ajax responses.
+ */
+ private static final AjaxChildrenRenderer _childrenRenderer = new AjaxChildrenRenderer()
{
+
+ protected Class<? extends UIComponent> getComponentClass() {
+ return UIToolTip.class;
+ }
+
+ };
+
+ protected AjaxChildrenRenderer getChildrenRenderer() {
+ return _childrenRenderer;
+ }
+
public void encodeAjaxChild(FacesContext context, String path, Set ids,
Set renderedAreas) throws IOException {
@@ -142,10 +160,7 @@
r.encodeTooltipText(context, this);
ajaxContext.getAjaxRenderedAreas().add(this.getClientId(context) +
"content");
} else {
- // todo
-// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
-// ajaxContext.e
-
+ _childrenRenderer.encodeAjaxChildren(context, this, path, ids, renderedAreas);
}
}