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 2011/07/07 15:42:45 UTC

svn commit: r1143821 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java

Author: lofwyr
Date: Thu Jul  7 13:42:45 2011
New Revision: 1143821

URL: http://svn.apache.org/viewvc?rev=1143821&view=rev
Log:
TOBAGO-1012: Date Picker Popup: fix time input

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.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/DatePickerRenderer.java?rev=1143821&r1=1143820&r2=1143821&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java Thu Jul  7 13:42:45 2011
@@ -86,6 +86,10 @@ public class DatePickerRenderer extends 
         facesContext, UICalendar.COMPONENT_TYPE, RendererTypes.CALENDAR, "calendar");
     box.getChildren().add(calendar);
 
+     // fixme: should work automatically from the layout manager
+    final Measure width = getResourceManager().getThemeMeasure(facesContext, calendar, "minimumWidth");
+    layoutOfBox.setColumns(width.toString());
+
     // add time input
     final UIPanel timePanel = (UIPanel) CreateComponentUtils.createComponent(
         facesContext, UIPanel.COMPONENT_TYPE, RendererTypes.PANEL, "timePanel");
@@ -212,9 +216,6 @@ public class DatePickerRenderer extends 
     UIComponent timePanel = box.findComponent("timePanel");
     if (converterPattern != null && (converterPattern.indexOf('h') > -1 || converterPattern.indexOf('H') > -1)) {
       UITime time = (UITime) timePanel.findComponent("time");
-      Measure popupHeight = popup.getCurrentHeight();
-      popupHeight = popupHeight.add(getResourceManager().getThemeMeasure(facesContext, time, "preferredHeight"));
-      popup.setHeight(popupHeight);
       DateTimeConverter dateTimeConverter
           = (DateTimeConverter) facesContext.getApplication().createConverter(DateTimeConverter.CONVERTER_ID);
       if (converterPattern.indexOf('s') > -1) {