Re: ERXOptGroupPopupButton
Chuck Hill <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Here is a sketch of how I use it:
DictionaryPopup: ERXOptGroupPopupButton {
list = orderedKeys;
group = sortGroup;
item = key;
displayString = displayString;
selection = ^selection;
value = value;
noSelectionString = ^noSelectionString;
escapeHTML = ^escapeHTML;
class = ^class;
style = ^style;
id = id;
name = ^name;
}
/**
* List of keys that control the order that the values are shown in the UI.
*
* @return the value bound to keyOrder, or sorted by corresponding value from dictionary if not bound
*/
public NSArray orderedKeys()
{
if (orderedKeys == null)
{
if (keyOrder() != null)
{
// Only include the ordered keys that are also in dictionary
// This allows keyOrder() to be a superset of dictionary().allKeys()
orderedKeys = keyOrder().mutableClone();
for (int i = 0; i < keyOrder.count(); i++)
{
Object aKey = keyOrder.objectAtIndex(i);
if (dictionary().objectForKey(aKey) == null)
{
orderedKeys.remove(aKey);
}
}
}
else
{
orderedKeys = ERXDictionaryUtilities.keysSortedByValueAscending(dictionary());
}
}
return orderedKeys;
public Object sortGroup()
{
return ((Foo) dictionary().objectForKey(key)).sortGroup();
}
public String displayString()
{
return ((Foo) dictionary().objectForKey(key)).shortName();
}
public Object value()
{
// key == null indicates a bug in WO where it sets a value on the <select> tag, just ignore it
return key != null ? displayString() : null;
}
On 2012-12-18, at 9:14 AM, Mourad wrote:
> Dear all,
>
> I am trying to track an example using ERXOptGroupPopupButton, I downloaded the latest version of wonder but cannot find it.
>
> Anyone can point me in the right direction?
>
> Thanks
>
> Mourad
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Wonder-disc mailing list
> [email protected]
> 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/gvc/practical_webobjects
Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d