You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/11/20 09:13:24 UTC
svn commit: r596564 - in /myfaces/tobago/trunk:
core/src/main/java/org/apache/myfaces/tobago/renderkit/html/
theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
Author: bommel
Date: Tue Nov 20 00:13:19 2007
New Revision: 596564
URL: http://svn.apache.org/viewvc?rev=596564&view=rev
Log:
(TOBAGO-550) tc:button / tc:link does not render Tooltip on Images
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java?rev=596564&r1=596563&r2=596564&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java Tue Nov 20 00:13:19 2007
@@ -646,4 +646,13 @@
writer.writeAttribute(HtmlAttributes.TITLE, String.valueOf(objTip), true);
}
}
+
+ public static void renderImageTip(UIComponent component, TobagoResponseWriter writer) throws IOException {
+ Object objTip = component.getAttributes().get(ATTR_TIP);
+ if (objTip != null) {
+ writer.writeAttribute(HtmlAttributes.ALT, String.valueOf(objTip), true);
+ } else {
+ writer.writeAttribute(HtmlAttributes.ALT, "", false);
+ }
+ }
}
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=596564&r1=596563&r2=596564&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Tue Nov 20 00:13:19 2007
@@ -99,7 +99,7 @@
}
writer.startElement(HtmlConstants.IMG, null);
writer.writeAttribute(HtmlAttributes.SRC, image, true);
- writer.writeAttribute(HtmlAttributes.ALT, "", false);
+ HtmlRendererUtil.renderImageTip(component, writer);
writer.endElement(HtmlConstants.IMG);
}
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java?rev=596564&r1=596563&r2=596564&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java Tue Nov 20 00:13:19 2007
@@ -97,8 +97,8 @@
}
writer.startElement(HtmlConstants.IMG, command);
writer.writeAttribute(HtmlAttributes.SRC, image, true);
- writer.writeAttribute(HtmlAttributes.ALT, "", false);
writer.writeAttribute(HtmlAttributes.BORDER, 0); // TODO: is border=0 setting via style possible?
+ HtmlRendererUtil.renderImageTip(command, writer);
HtmlRendererUtil.renderTip(command, writer);
writer.endElement(HtmlConstants.IMG);
}