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 2012/04/24 16:07:59 UTC

svn commit: r1329736 - /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: Tue Apr 24 14:07:59 2012
New Revision: 1329736

URL: http://svn.apache.org/viewvc?rev=1329736&view=rev
Log:
TOBAGO-1105: tc:datepicker does not respect disabled/readonly-Flag of corresponding tc:date, if an Expression ist used

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=1329736&r1=1329735&r2=1329736&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 Tue Apr 24 14:07:59 2012
@@ -186,13 +186,12 @@ public class DatePickerRenderer extends 
       LOG.error("No required UIDate component found.");
       return;
     }
+    // this can't be done in "onComponentPopulated()" of the picker, it seems to be to early
     if (FacesUtils.hasValueBindingOrValueExpression(dateInput, Attributes.READONLY)) {
-      FacesUtils.copyValueBindingOrValueExpression(picker, Attributes.DISABLED,
-          dateInput, Attributes.READONLY);
+      FacesUtils.copyValueBindingOrValueExpression(dateInput, Attributes.READONLY, picker, Attributes.DISABLED);
     } else {
       if (FacesUtils.hasValueBindingOrValueExpression(dateInput, Attributes.DISABLED)) {
-        FacesUtils.copyValueBindingOrValueExpression(picker, Attributes.DISABLED,
-            dateInput, Attributes.DISABLED);
+        FacesUtils.copyValueBindingOrValueExpression(dateInput, Attributes.DISABLED, picker, Attributes.DISABLED);
       } else {
         picker.setDisabled(dateInput.isReadonly() || dateInput.isDisabled());
       }