myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1701207 - /myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
Date Fri, 04 Sep 2015 10:53:56 GMT
Author: lofwyr
Date: Fri Sep  4 10:53:55 2015
New Revision: 1701207

URL: http://svn.apache.org/r1701207
Log:
TOBAGO-1368: Create a new theme which uses Bootstrap 
- separator implementation

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java?rev=1701207&r1=1701206&r2=1701207&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
Fri Sep  4 10:53:55 2015
@@ -22,8 +22,6 @@ package org.apache.myfaces.tobago.render
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UILabel;
 import org.apache.myfaces.tobago.component.UISeparator;
-import org.apache.myfaces.tobago.config.Configurable;
-import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -42,8 +40,7 @@ public class SeparatorRenderer extends L
 
     final UISeparator separator = (UISeparator) component;
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
-
-    String label = getLabel(separator);
+    final String label = getLabel(separator);
 
     if (label != null) {
       writer.startElement(HtmlElements.FIELDSET, component);
@@ -68,19 +65,10 @@ public class SeparatorRenderer extends L
 
   private String getLabel(final UISeparator separator) {
     String label = separator.getLabel();
-    if (label == null && separator.getFacet(Facets.LABEL) != null) {
-      label = String.valueOf(((UILabel) separator.getFacet(Facets.LABEL)).getValue());
+    final UIComponent facet = separator.getFacet(Facets.LABEL);
+    if (label == null && facet != null) {
+      label = String.valueOf(((UILabel) facet).getValue());
     }
     return label;
   }
-
-  @Override
-  public Measure getHeight(final FacesContext facesContext, final Configurable component)
{
-    final String label = getLabel((UISeparator) component);
-    if (label == null) {
-      return getResourceManager().getThemeMeasure(facesContext, component, "withoutLabelHeight");
-    } else {
-      return super.getHeight(facesContext, component);
-    }
-  }
 }



Mime
View raw message