Package com.gwtplatform.mvp.shared.proxy

Examples of com.gwtplatform.mvp.shared.proxy.PlaceRequest


        this.tokenFormatter = tokenFormatter;
    }

    @Override
    protected void onReveal() {
        PlaceRequest request = new PlaceRequest.Builder()
                .nameToken(NameTokens.LOGIN)
                .with(ParameterTokens.REDIRECT, History.getToken())
                .build();

        getView().setLinkToLogin(tokenFormatter.toPlaceToken(request));
View Full Code Here


    private void redirectToLoggedOnPage() {
        String token = placeManager
                .getCurrentPlaceRequest()
                .getParameter(ParameterTokens.REDIRECT, NameTokens.getOnLoginDefaultPage());
        PlaceRequest placeRequest = new Builder().nameToken(token).build();

        placeManager.revealPlace(placeRequest);
    }
View Full Code Here

                public void onClick(ClickEvent event) {

                    menuPopup.hide();

                    placeManager.revealPlace(
                            new PlaceRequest(NameTokens.ToolsPresenter).with("name", "run-as-role"), false
                    );


                }
            });
View Full Code Here

    @Override
    public void execute() {
        String initialToken = History.getToken();
        if (!initialToken.isEmpty() && !isBlackListed(initialToken)) {
            List<PlaceRequest> hierarchy = formatter.toPlaceRequestHierarchy(initialToken);
            final PlaceRequest placeRequest = hierarchy.get(hierarchy.size() - 1);

            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
                public void execute() {
                    placeManager.revealPlace(placeRequest, true);
                }
            });
            bootstrapContext.setInitialPlace(placeRequest.getNameToken());
        } else {
            placeManager.revealDefaultPlace();
        }
    }
View Full Code Here

        Column<String, String> option = new Column<String, String>(
                new ViewLinkCell<String>(Console.CONSTANTS.common_label_view(), new ActionCell.Delegate<String>() {
                    @Override
                    public void execute(String selection) {
                        presenter.getPlaceManager().revealPlace(
                                new PlaceRequest(token).with("name", selection)
                        );
                    }
                })
        ) {
            @Override
View Full Code Here

            @Override
            public void onSuccess(List<SubsystemRecord> result) {
                getView().setSubsystems(result);

                // prefer to reveal the last place, if exists in selected profile
                PlaceRequest preference = getLastPlace() != null ? getLastPlace() : preferredPlace();
                revealDefaultSubsystem(preference, result);
            }
        });
    }
View Full Code Here

                public void onClick(ClickEvent event) {

                    menuPopup.hide();

                    placeManager.revealPlace(
                            new PlaceRequest(NameTokens.ToolsPresenter).with("name", "run-as-role")
                    );


                }
            });
View Full Code Here

    @Override
    protected void onReset() {
        super.onReset();
        header.highlight(token);

        PlaceRequest requestedPlace = placeManager.getCurrentPlaceRequest();
        boolean isChildRequest = !token.equals(requestedPlace.getNameToken());

        if (isChildRequest) {
            // remember for the next time
            lastPlace = requestedPlace;
        }
View Full Code Here

            @Override
            public void onSuccess(List<SubsystemRecord> existingSubsystems) {
                getView().updateFrom(existingSubsystems);

                // chose default view if necessary
                PlaceRequest preference = NameTokens.serverConfig
                        .equals(placeRequest.getNameToken()) ? preferredPlace() : placeRequest;

                final String[] defaultSubsystem = SubsystemMetaData
                        .getDefaultSubsystem(preference.getNameToken(), existingSubsystems);

                if(revealDefault)
                {
                    placeManager.revealPlace(new PlaceRequest.Builder().nameToken(defaultSubsystem[1]).build());
                }
View Full Code Here

                    public void onSuccess(final ContextCreation context) {
                        // unlock(); // remove?
                        Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                            @Override
                            public void execute() {
                                final PlaceRequest placeRequest = context.getRequest();
                                DefaultPlaceManager.super.doRevealPlace(placeRequest, updateBrowserUrl);

                                // we only fire LHS highlight events for real sections not top level categories
                                if(updateBrowserUrl) {
                                    StringBuffer nameToken = new StringBuffer(placeRequest.getNameToken());

                                    if (!placeRequest.getParameterNames().isEmpty()) {
                                        nameToken.append(";");
                                        for (String param : placeRequest.getParameterNames()) {
                                            nameToken.append(param).append("=").append(placeRequest.getParameter(param, ""));
                                        }
                                    }
                                    eventBus.fireEvent(new LHSHighlightEvent(nameToken.toString()));
                                }
                            }
View Full Code Here

TOP

Related Classes of com.gwtplatform.mvp.shared.proxy.PlaceRequest

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.