public AWResponseGenerating actionClicked() { // if (_isGlobal) return MetaNavTabBar.getState(session()).fireAction(_action, // requestContext()); Context context = MetaContext.currentContext(this); UIMeta meta = (UIMeta) context.meta(); return meta.fireAction(_action, context, requestContext()); }
public List<ItemProperties> actionCategories() { if (!_isGlobal) { Context context = MetaContext.currentContext(this); UIMeta meta = (UIMeta) context.meta(); context.push(); _actionsByCategory = new HashMap(); List<ItemProperties> categories = meta.actionsByCategory(context, _actionsByCategory, UIMeta.ActionZones); context.pop(); return categories; } List<String> showCategories = (List) valueForBinding("showOnly"); List<ItemProperties> categories = MetaNavTabBar.getState(session()).getActionCategories(); if (showCategories != null) { List<ItemProperties> filteredCategories = new ArrayList(); for (ItemProperties category : categories) { if (showCategories.contains(category.name())) { filteredCategories.add(category); } } categories = filteredCategories; } _actionsByCategory = MetaNavTabBar.getState(session()).getActionsByCategory(); return categories; }
public void init() { super.init(); _displayGroup = new AWTDisplayGroup(); Context context = MetaContext.currentContext(this); String field = (String) context.values().get(UIMeta.KeyField); DetailDataSource dataSource = new DetailDataSource(null, field); _displayGroup.setDataSource(dataSource); }
public void prepareForGlobal() { Context context = MetaContext.currentContext(this); _isGlobal = booleanValueForBinding("showGlobal", context.values().get(UIMeta.KeyClass) == null); if (_isGlobal) { MetaContext.currentContext(this); MetaNavTabBar.getState(session()).assignCurrentModuleContext(context); } // bogus -- should take from Context String filterActions = stringValueForBinding("filterActions"); if (filterActions != null) { context.set("filterActions", filterActions); } }