X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=sope-appserver%2FNGObjWeb%2FDynamicElements%2FWOBrowser.m;h=508989d5e02e86cdce9f14e82e29dabc506f9cdb;hb=bd4843ea229d39a280a851d331828a7999c955e9;hp=93a7435e40f320c6f79ebbaba049ce1cd7d8446d;hpb=86295932bc0ca183dfb49a9bd978c1d7cf80faf4;p=sope diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m b/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m index 93a7435e..508989d5 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m @@ -32,16 +32,18 @@ @protected WOAssociation *list; WOAssociation *item; - WOAssociation *selection; + WOAssociation *selection; // => use 'selections'! WOAssociation *string; // WO4 => use 'displayString'! WOAssociation *noSelectionString; // WO4 // non-WO: WOAssociation *singleSelection; // selection contains an item, not an array + + // WO 4.5 WOAssociation *multiple; // multiple selections allowed WOAssociation *size; - // TODO: WO 4.5: selectedValues, escapeHTML, selections + // TODO: WO 4.5: selectedValues, escapeHTML } @end /* WOBrowser */ @@ -65,7 +67,6 @@ if ((self = [super initWithName:_name associations:_config template:_c])) { self->list = OWGetProperty(_config, @"list"); self->item = OWGetProperty(_config, @"item"); - self->selection = OWGetProperty(_config, @"selection"); self->singleSelection = OWGetProperty(_config, @"singleSelection"); self->multiple = OWGetProperty(_config, @"multiple"); self->size = OWGetProperty(_config, @"size"); @@ -83,6 +84,18 @@ @"are set, use only one! ('string' is deprecated!)"]; } + if ((self->selection = OWGetProperty(_config, @"selections")) == nil) { + if ((self->selection = OWGetProperty(_config, @"selection")) == nil) { + [self debugWithFormat: + @"Note: using deprecated 'selection' binding, " + @"use 'selections' instead."]; + } + } + else if (OWGetProperty(_config, @"selection") != nil) { + [self debugWithFormat:@"WARNING: 'selections' AND 'selection' bindings " + @"are set, use only one! ('selection' is deprecated!)"]; + } + // compatiblity if (self->noSelectionString == nil) self->noSelectionString = OWGetProperty(_config, @"nilString");