From: Xavier D. <web...@an...> - 2010-01-28 22:10:54
|
Thanks Chuck, I'll give it a try next week:) Xavier > Hi Xavier, > > I am not sure how much sense this will make extracted from the > application... > > DictionaryPopup: ERXOptGroupPopupButton { > list = orderedKeys; > group = sortGroup; > item = key; > displayString = displayString; > selection = ^selection; > value = value; > noSelectionString = ^noSelectionString; > escapeHTML = ^escapeHTML; > } > > public NSArray orderedKeys() { > if (orderedKeys == null) { > orderedKeys = > ERXDictionaryUtilities.keysSortedByValueAscending(dictionary()); > } > > return orderedKeys; > } > > public String displayString() { > return ((DisplayAdState) > dictionary().objectForKey(key)).shortName(); > } > > public Object sortGroup() { > return ((DisplayAdState) > dictionary().objectForKey(key)).sortGroup(); > } > > > > The key binding is group. The list is bound to an array of keys > that are sorted and are used in a dictionary of objects that have > different groups. When the group changes, the component starts a > new group. If the "label" binding is present, it is used to > separate groups, otherwise a blank option is used. There is not > much to it, you just have to return a different value for group when > appropriate for the data bound to the list. > > > > /** > * Quick hack at extending WOPopUpButton to use HTML 4 optgroups. It > adds two bindings: > * group and label. group is required. When this value changes, a > new optgroup is created. > * label is optional. This is used as the label for an option > group. If label is not > * bound, an empty string is used as the option group label. > * > * @binding group Object, required - keyPath to value that changes > when the group of options changes > * @binding label String, optional - String used as label for an > option group > */ > > > Chuck > > On Jan 28, 2010, at 2:48 AM, Xavier Destombes wrote: > >> Hello Chuck, >> >> Just in case you have this at hand, do you have a small sample to >> showcase the usage? >> >> Thanks, >> >> Xavier >> >> >>> It is there in package >>> com.webobjects.appserver._private.ERXOptGroupPopupButton >>> >>> I made it, I use it still. >>> >>> Chuck >>> >>> >>> >>> On Jan 20, 2010, at 10:50 AM, Xavier Destombes wrote: >>> >>>> Hello, >>>> >>>> I remember something about ERXOptGroupPopupButton in the release of >>>> Wonder 4.0. >>>> But it appears there's nothing in the source nor the documentation. >>>> >>>> Is this something that should be there or the component has been >>>> dropped? >>>> >>>> >>>> Thanks, >>>> >>>> Xavier >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Throughout its 18-year history, RSA Conference consistently >>>> attracts the >>>> world's best and brightest in the field, creating opportunities >>>> for Conference >>>> attendees to learn about information security's most important >>>> issues through >>>> interactions with peers, luminaries and emerging and established >>>> companies. >>>> http://p.sf.net/sfu/rsaconf-dev2dev >>>> _______________________________________________ >>>> Wonder-disc mailing list >>>> Won...@li... >>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >>> >>> -- >>> Chuck Hill Senior Consultant / VP Development >>> >>> Practical WebObjects - for developers who want to increase their >>> overall knowledge of WebObjects or who are trying to solve >>> specific problems. >>> http://www.global-village.net/products/practical_webobjects >>> >>> >>> >>> >>> >>> >>> >>> >> > > -- > Chuck Hill Senior Consultant / VP Development > > Practical WebObjects - for developers who want to increase their > overall knowledge of WebObjects or who are trying to solve specific > problems. > http://www.global-village.net/products/practical_webobjects > > > > > > > > |