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 2015/02/02 14:09:00 UTC
svn commit: r1656454 - in
/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag:
ButtonRenderer.java LinkRenderer.java
Author: lofwyr
Date: Mon Feb 2 13:08:59 2015
New Revision: 1656454
URL: http://svn.apache.org/r1656454
Log:
workaround for MyFaces trace logging
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java?rev=1656454&r1=1656453&r2=1656454&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java Mon Feb 2 13:08:59 2015
@@ -124,6 +124,10 @@ public class ButtonRenderer extends Comm
@Override
public Measure getPreferredWidth(final FacesContext facesContext, final Configurable component) {
+ if (!(component instanceof UIButton)) {
+ return Measure.valueOf(100);
+ }
+
final UIButton button = (UIButton) component;
Measure width = Measure.ZERO;
final boolean image = button.getImage() != null;
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java?rev=1656454&r1=1656453&r2=1656454&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java Mon Feb 2 13:08:59 2015
@@ -132,6 +132,11 @@ public class LinkRenderer extends Comman
@Override
public Measure getPreferredWidth(final FacesContext facesContext, final Configurable component) {
+
+ if (!(component instanceof AbstractUILink)) {
+ return Measure.valueOf(100);
+ }
+
final AbstractUILink link = (AbstractUILink) component;
final LabelWithAccessKey label = new LabelWithAccessKey(link);
final String text = label.getLabel();