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
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];