You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/05/28 16:38:04 UTC
svn commit: r949188 -
/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
Author: lofwyr
Date: Fri May 28 14:38:04 2010
New Revision: 949188
URL: http://svn.apache.org/viewvc?rev=949188&view=rev
Log:
TOBAGO-881: Make ToolBar work with new LayoutManager
- fixing popup menu image (was not visible)
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java?rev=949188&r1=949187&r2=949188&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java Fri May 28 14:38:04 2010
@@ -353,7 +353,7 @@ public abstract class ToolBarRendererBas
itemStyle.setHeight(buttonStyle.getHeight());
// change values when only have one button
- if (popupMenu != null && !separateButtons) {
+ if (popupMenu != null && !separateButtons && (!lackImage || StringUtils.isNotBlank(label.getText()))) {
openerStyle.setLeft(openerStyle.getLeft().add(buttonStyle.getWidth()));
buttonStyle.setWidth(buttonStyle.getWidth().add(menuStyle.getWidth()));
}
@@ -378,8 +378,8 @@ public abstract class ToolBarRendererBas
writer.writeStyleAttribute(buttonStyle);
writer.writeAttribute(HtmlAttributes.ONCLICK, commandClick != null ? commandClick : menuClick, true);
// render icon
- if (showIcon) {
- HtmlRendererUtils.addImageSources(facesContext, writer, iconName != null ? iconName : "image/1x1.gif", graphicId);
+ if (showIcon && iconName != null) {
+ HtmlRendererUtils.addImageSources(facesContext, writer, iconName, graphicId);
writer.startElement(HtmlConstants.IMG, command);
writer.writeAttribute(HtmlAttributes.SRC, image, false);
writer.writeAttribute(HtmlAttributes.ALT, label.getText(), true);