]> err.no Git - sope/commitdiff
changed handling of 'disabled' binding
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 5 Oct 2005 14:11:13 +0000 (14:11 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 5 Oct 2005 14:11:13 +0000 (14:11 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1158 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/DynamicElements/WORadioButtonList.m
sope-appserver/NGObjWeb/Version

index e9547aba6884766d3fe1c838f074b5e2087b6d39..4ae72567b2729455acfb87c79733bafa9c00f06c 100644 (file)
@@ -1,5 +1,11 @@
 2005-10-05  Helge Hess  <helge.hess@skyrix.com>
 
+       * DynamicElements/WORadioButtonList.m: changed handling of 'disabled'
+         during -takeValuesFromRequest:. Now the index/item bindings are
+         pushed, and then the 'disabled' binding is checked prior setting the
+         'selection' to the item (the item will not get selected if its
+         disabled). (v4.5.206)
+
        * DynamicElements/WOSubmitButton.m: disable KVC push for 'value'
          binding in -takeValuesFromRequest:inContext:. This is usually not
          required but results in issue #1568 on OSX. The old behaviour can
index ffacf53982a43b9ff271d1bdfdbe873af8c73b74..63f7821648362a7d00e1f4ed849dfed01c7360f4 100644 (file)
   NSArray  *array;
   id       formValue;
   
-  if ([self->disabled boolValueInComponent:sComponent])
-    return;
-  
   formValue = [_rq formValueForKey:OWFormElementName(self, _ctx)];
   if (formValue == nil)
     return;
   
   idx   = [formValue unsignedIntValue];
   array = [self->list valueInComponent:sComponent];
-
+  
+  /* setup item/index */
+  
   if ([self->index isValueSettable])
     [self->index setUnsignedIntValue:idx inComponent:sComponent];
 
   if ([self->item isValueSettable])
     [self->item setValue:[array objectAtIndex:idx] inComponent:sComponent];
-      
+  
+  /* now check whether the item is disabled/allowed as the selection */
+
+  if ([self->disabled boolValueInComponent:sComponent])
+    return;
+  
+  /* set selection if possible */
+  
   if ([self->selection isValueSettable]) {
     [self->selection setValue:[array objectAtIndex:idx]
                     inComponent:sComponent];
index 9efa18fac147d4760c7433548ef08386537be991..67c4ebe6f618b01ff56a93639122b16dd8e0cc7f 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=205
+SUBMINOR_VERSION:=206
 
 # v4.5.122 requires libNGExtensions v4.5.153
 # v4.5.91  requires libNGExtensions v4.5.134