package er.iui.example.components; import com.webobjects.appserver.WOActionResults; import com.webobjects.appserver.WOContext; import er.extensions.components.ERXComponent; import com.webobjects.foundation.NSArray; import com.webobjects.foundation.NSDictionary; // Generated by the WOLips Templateengine Plug-in at Mar 7, 2008 10:43:33 PM public class DictionaryView extends ERXComponent { public boolean _searchVisible; public DictionaryView(WOContext context) { super(context); } public NSDictionary obj; public String key; public Object value() { return obj.objectForKey(key); } public boolean keyPointsToArray() { return (obj.objectForKey(key) instanceof com.webobjects.foundation.NSArray); } public boolean keyPointsToDictionary() { return (obj.objectForKey(key) instanceof com.webobjects.foundation.NSDictionary); } public WOActionResults select() { System.out.println("DictionaryView.select: key = "+key); ERXComponent nextPage = pageWithName(ArrayView.class); nextPage.takeValueForKey((NSArray<Object>)obj.objectForKey(key) ,"objs"); return nextPage; } public WOActionResults back() { System.out.println("DictionaryView.back: BACK"); return pageWithName(Main.class); } public WOActionResults search() { _searchVisible = false; System.out.println("DictionaryView.search: SEARCH"); return null; } public WOActionResults cancel() { _searchVisible = false; return null; } }