Author: abelevich
Date: 2011-01-31 11:41:49 -0500 (Mon, 31 Jan 2011)
New Revision: 21334
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/tooltip.xmlunit.xml
Log:
RF-10286 rich:tooltip - @zindex doesn't work
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
16:27:30 UTC (rev 21333)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java 2011-01-31
16:41:49 UTC (rev 21334)
@@ -102,7 +102,12 @@
writer.startElement(getMarkupElement(tooltip), component);
writer.writeAttribute(ID_ATTRIBUTE, component.getClientId(context),
"clientId");
writer.writeAttribute(CLASS_ATTRIBUTE, getStyleClass(component), null);
- String style = getStyle(component);
+ int zindex = tooltip.getZindex();
+ if (zindex == Integer.MIN_VALUE) {
+ zindex = 1000;
+ }
+ String style = concatStyles("z-index:"+zindex, getStyle(component));
+
if (style != null && style.trim().length() > 0) {
writer.writeAttribute(HtmlConstants.STYLE_ATTRIBUTE, style, null);
}
Modified:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/tooltip.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/tooltip.xmlunit.xml 2011-01-31
16:27:30 UTC (rev 21333)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/tooltip.xmlunit.xml 2011-01-31
16:41:49 UTC (rev 21334)
@@ -1,4 +1,4 @@
-<span id="f:tooltip" class="rf-tt">
+<span id="f:tooltip" class="rf-tt"
style="z-index:1000">
<span id="f:tooltip:cntr" class="rf-tt-cntr">
<span id="f:tooltip:content"
class="rf-tt-cnt"></span>
</span>