Author: nbelaevski
Date: 2011-01-31 18:13:58 -0500 (Mon, 31 Jan 2011)
New Revision: 21345
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:
https://issues.jboss.org/browse/RF-10369
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-31
22:26:32 UTC (rev 21344)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java 2011-01-31
23:13:58 UTC (rev 21345)
@@ -145,30 +145,6 @@
// ------------------------------------------------ Html Attributes End
@Override
- public void encodeAll(FacesContext context) throws IOException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (!isRendered()) {
- return;
- }
-
- encodeBegin(context);
- if (getMode() == TooltipMode.client) {
- if (getRendersChildren()) {
- encodeChildren(context);
- } else if (this.getChildCount() > 0) {
- for (UIComponent kid : getChildren()) {
- kid.encodeAll(context);
- }
- }
- }
-
- encodeEnd(context);
- }
-
- @Override
public boolean visitTree(VisitContext context, VisitCallback callback) {
if (context instanceof ExtendedVisitContext) {
ExtendedVisitContext extendedVisitContext = (ExtendedVisitContext) context;
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-31
22:26:32 UTC (rev 21344)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java 2011-01-31
23:13:58 UTC (rev 21345)
@@ -23,6 +23,23 @@
package org.richfaces.renderkit.html;
+import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
+import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
+import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
+import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.PartialResponseWriter;
+import javax.faces.context.ResponseWriter;
+
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.TooltipMode;
import org.richfaces.cdk.annotations.JsfRenderer;
@@ -32,22 +49,6 @@
import org.richfaces.renderkit.MetaComponentRenderer;
import org.richfaces.renderkit.util.RendererUtils;
-import javax.faces.application.ResourceDependencies;
-import javax.faces.application.ResourceDependency;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.PartialResponseWriter;
-import javax.faces.context.ResponseWriter;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
-import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
-import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
-import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
-
/**
* @author amarkhel
* @since 2010-10-24
@@ -238,6 +239,25 @@
return AbstractTooltip.class;
}
+ @Override
+ protected void doEncodeChildren(ResponseWriter writer, FacesContext context,
UIComponent component)
+ throws IOException {
+
+ AbstractTooltip tooltip = (AbstractTooltip) component;
+
+ if (tooltip.getMode() == TooltipMode.client) {
+ if (tooltip.getChildCount() > 0) {
+ for (UIComponent kid : tooltip.getChildren()) {
+ kid.encodeAll(context);
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean getRendersChildren() {
+ return true;
+ }
}