Package ariba.ui.widgets

Examples of ariba.ui.widgets.ActionHandler


        return _state.userSelectedModule(this, _currentModule);
    }

    public String disabled ()
    {
        ActionHandler handler = ActionHandler.resolveHandlerInComponent(AribaAction.HomeAction, this);
        boolean homeActionIsDisabled = (handler != null) && !handler.isEnabled(requestContext());
        return (isOnModalPage() || homeActionIsDisabled) ? "disabled" : null;
    }
View Full Code Here


            }
        }

        public AWResponseGenerating userSelectedModule (final AWComponent component, ItemProperties module)
        {
            ActionHandler handler = new ActionHandler() {
                public AWResponseGenerating actionClicked (AWRequestContext requestContext)
                {
                    return gotoModule(_lastSelectedModule, requestContext);
                }
            };

            handler = ActionHandler.resolveHandlerInComponent(
                    AribaAction.HomeAction, component, handler);
            return handler.actionClicked(component.requestContext());
        }
View Full Code Here

    private static AWResponseGenerating terminateWizard (Wizard wizard,
                                                 AWRequestContext requestContext)
    {
        requestContext.session().truncatePageCache(wizard.getPageCacheMark());
        WizardFrame exitFrame = wizard.getExitFrame();
        ActionHandler exitHandler = WizardExitActionHandler.actionHandler(exitFrame);
        wizard.cleanup();
        if (exitHandler != null) {
            return exitHandler.actionClicked(requestContext);
        }
        return null;
    }
View Full Code Here

            {
                return User.isLoggedIn();
            }
        });

        ActionHandler.setHandler(AribaAction.LogoutAction, new ActionHandler() {
            public AWResponseGenerating actionClicked (AWRequestContext requestContext)
            {
                // Force user to anonymous and kill session
                User.bindUserToSession(User.getAnonymous(), requestContext.session());
                // MetaNavTabBar.invalidateState(requestContext.session());
                requestContext.session().terminate();
                return AWComponentActionRequestHandler.SharedInstance.processFrontDoorRequest(requestContext);
            }
        });

        ConditionHandler.setHandler("disableLogoutAction", new ConditionHandler() {
            public boolean evaluateCondition (AWRequestContext requestContext)
            {
                return !User.isLoggedIn();
            }
        });

        if (allowAccessWithoutLogin) {
            ConditionHandler.setHandler("showLoginAction", new ConditionHandler() {
                public boolean evaluateCondition (AWRequestContext requestContext)
                {
                    return !User.isLoggedIn();
                }
            });

            ActionHandler.setHandler("login", new ActionHandler() {
                public AWResponseGenerating actionClicked (AWRequestContext requestContext)
                {
                    // force a login
                    if (!User.isLoggedIn()) throw new AWSessionValidationException();
                    return null;
View Full Code Here

                                         AWRequestContext requestContext)
    {
        if (defaultHandler != null && defaultHandler.isInterrupting(requestContext)) {
            if (_frame == _wizard.getExitFrame()) {
                    // We are already on the exit frame, so ignore these links
                ActionHandler override = new ActionHandler(false, true, null);
                return override;
            }
            WizardExitActionHandler override =
                WizardExitActionHandler.createHandler(defaultHandler, _wizard);
            return override;
View Full Code Here

        return true;
    }

    public AWResponseGenerating currentItemClicked ()
    {
        ActionHandler handler = ActionHandler.resolveHandlerInComponent(
                AribaAction.GlobalNavAction, this, new NavActionHandler(MetaContext.currentContext(this)));

        return handler.actionClicked(requestContext());
    }
View Full Code Here

                    if (application.resourceManager().packageResourceNamed(application.mainPageName()+".awl") == null) {
                        application.setMainPageName(MetaHomePage.class.getName());
                    }

                    if (ActionHandler.resolveHandler(AribaAction.HomeAction) == null) {
                        ActionHandler.setHandler(AribaAction.HomeAction, new ActionHandler() {
                            public AWResponseGenerating actionClicked(AWRequestContext requestContext) {
                                MetaNavTabBar.getState(requestContext.session()).gotoHomeModule(requestContext);
                                return requestContext.application().mainPage(requestContext);
                            }
                        });
View Full Code Here

TOP

Related Classes of ariba.ui.widgets.ActionHandler

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.