Package ariba.ui.meta.core

Examples of ariba.ui.meta.core.Context


        // If drag onto ones-self, no-op
        if (editSet == null || draggedItem.equals(dropItem)) return;

        // Need to find all fields with `draggedItem` as predecessor and give them
        // its predecessor
        Context context = _meta.newContext();
        prepareContext(context, dragContext, dragContext.scopeKey, false);
        List<String> zones = (List)context.propertyForKey("zones");
        String[] zoneArr = (zones != null) ? zones.toArray(new String[zones.size()]) : UIMeta.ZonesTLRB;
        String defaultZone = zoneArr[0];
        Map<String, List> preds = _meta.predecessorMap(context, dragContext.scopeKey, defaultZone);

        // Any items after the dragged should now be after its predecessor
View Full Code Here


    // Todo: evaluate visibility
   
    public String currentTabLabel ()
    {
        Context context = MetaContext.currentContext(this);
        context.push();
        context.set(UIMeta.KeyLayout, _currentTabName);
        String label = (String)context.propertyForKey(UIMeta.KeyLabel);
        context.pop();
        return label;
    }
View Full Code Here

    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);
    }
View Full Code Here

                if (basePath != null) page = resourceRelative(basePath, page, requestContext());
            }
        }

        if (action != null) {
            Context ctx = MetaContext.currentContext(this);
            ctx.push();
            String queryString = m.group(2);
            if (queryString != null) {
                String deescaped = queryString.replace("&amp;","&");
                Map<String, String[]> queryParams = AWUtil.parseQueryString(deescaped);
                for (Map.Entry<String,String[]> e : queryParams.entrySet()) {
                    ctx.set(e.getKey(), e.getValue()[0]);
                }
            }
            ctx.set(UIMeta.KeyAction, action);
            if (page != null) ctx.set("page", page);
            _actionResults = ((UIMeta)ctx.meta()).fireAction(ctx, requestContext());
            _actionTarget = (String)ctx.propertyForKey("linkTarget");
            ctx.pop();
        } else {
            // static URL -- initialize action target
            Context ctx = MetaContext.currentContext(this);
            ctx.push();
            ctx.set("page", _actionUrl);
            _actionTarget = (String)ctx.propertyForKey("linkTarget");
            ctx.pop();

            _actionResults = AWRedirect.getRedirect(requestContext(), _actionUrl);
        }
    }
View Full Code Here

        _menuId = null;
    }

    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);
        }
    }
View Full Code Here

    }

    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();
View Full Code Here

    boolean _supportsTextSearch;

    public EntityChoiceSource (String className) {
        _className = className;

        Context context = UIMeta.getInstance().newContext();
        context.set(ObjectMeta.KeyClass, className);
        _supportsTextSearch = context.booleanPropertyForKey(PersistenceMeta.PropTextSearchSupported, false);
    }
View Full Code Here

    }

    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());
    }
View Full Code Here

        }
    }

    public void initClass ()
    {
        Context context = MetaContext.currentContext(this);
        _className = (String)context.values().get(ObjectMeta.KeyClass);
        String zonePath = UIMeta.getInstance().zonePath(context);
        _zonePath = (zonePath == null) ? null : zonePath.concat(".");

        _editManager = EditManager.activeEditManager(UIMeta.getInstance(), session());

        // register validation callback if necessary
        Boolean editing = (Boolean)context.propertyForKey(UIMeta.KeyEditing);
        if (editing != null && editing.booleanValue()) {
            _object = context.values().get("object");
            _contextSnapshot = context.snapshot();
            // ToDo: Need to change error manager not to add dups
            errorManager().registerFullValidationHandler(this);
        }
    }
View Full Code Here

    }

    public void handleClickedAction ()
    {
        MetaSideInspector.initialize();
        Context context = MetaContext.currentContext(this);       
        _editManager.setSelectedRecord((Context.AssignmentRecord)context.debugTracePropertyProvider());
    }
View Full Code Here

TOP

Related Classes of ariba.ui.meta.core.Context

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.