Package com.gwtplatform.mvp.client.proxy

Examples of com.gwtplatform.mvp.client.proxy.PlaceRequest$Builder


            @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


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

        PlaceRequest currentPlace = placeManager.getCurrentPlaceRequest();
        if (!hasBeenRevealed) {
            hasBeenRevealed = true;
            onFirstReveal(currentPlace);
        }

        if (!token.equals(currentPlace.getNameToken())) {
            // remember for the next time
            lastPlace = currentPlace;
        } else if (lastPlace != null) {
            onLastPlace(lastPlace);
        } else {
View Full Code Here

            widget.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    placeManager.revealPlace(
                            new PlaceRequest(name)
                    );
                }
            });
            linksPane.add(widget, id);
View Full Code Here

            browser.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent clickEvent) {
                    toolsPopup.hide();
                    placeManager.revealPlace(
                            new PlaceRequest(NameTokens.ToolsPresenter).with("name", tool[1])
                    );
                }
            });

            toolsList.add(browser);
        }
        toolsPopup.setWidget(toolsList);

        final HTML toolsLink = new HTML("<i class='icon-caret-up'></i>&nbsp;"+"Tools");
        toolsLink.addStyleName("footer-link");
        toolsLink.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {

                int listHeight = toolsList.getWidgetCount() * 25;

                toolsPopup.setPopupPosition(
                        toolsLink.getAbsoluteLeft()-45,
                        toolsLink.getAbsoluteTop()-(listHeight-25)-50

                );

                toolsPopup.setWidth("165");
                toolsPopup.setHeight(listHeight +"");

                toolsPopup.show();
            }
        });

        HTML settings = new HTML("<i class='icon-wrench'></i>&nbsp;"+Console.CONSTANTS.common_label_settings());
        settings.addStyleName("footer-link");
        settings.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                placeManager.revealPlace(
                        new PlaceRequest(NameTokens.SettingsPresenter)
                );
            }
        });


View Full Code Here

    private static void parseSingleToken(List<PlaceRequest> places, String token) {

        if(token.contains(";")) // parametrized?
        {
            StringTokenizer params = new StringTokenizer(token, ";");
            PlaceRequest request = null;
            while(params.hasMoreTokens())
            {
                String tok = params.nextToken();
                if(tok.contains("="))
                {
                    if(null==request) break;

                    // parameter
                    String[] parameter = tok.split("=");
                    request = request.with(parameter[0], parameter[1]);
                }
                else
                {
                    // address
                    request = new PlaceRequest(tok);

                }
            }

            // exit, either wrong token or different formatter
            if(null==request)
                throw new IllegalArgumentException("Illegal token: "+token);

            places.add(request);
        }
        else
        {
            places.add(new PlaceRequest(token));
        }
    }
View Full Code Here

            widget.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    Console.MODULES.getPlaceManager().revealPlace(
                            new PlaceRequest(name)
                    );
                }
            });
            linksPane.add(widget, id);
View Full Code Here

        return getProperty(key)!=null;
    }

    public PlaceRequest getDefaultPlace() {

        PlaceRequest defaultPlace  = getProperty(STANDALONE).equals("true") ?
                new PlaceRequest(NameTokens.serverConfig) : new PlaceRequest(NameTokens.HostMgmtPresenter);
        return defaultPlace;
    }
View Full Code Here

                ServerGroupRecord selectedRecord = selectionModel.getSelectedObject();
                final String groupName = selectedRecord.getGroupName();

                Console.MODULES.getPlaceManager().revealPlaceHierarchy(
                        new ArrayList<PlaceRequest>() {{
                            add(new PlaceRequest("domain"));
                            add(new PlaceRequest(NameTokens.ServerGroupPresenter).with("name", groupName));
                        }}
                );
            }
        });
View Full Code Here

            }                                       */

            LoadingOverlay.on(getView().asWidget(), true);
            getView().asWidget().setVisible(false);

            PlaceRequest myRequest = new PlaceRequest(NameTokens.mainLayout);
            placeManager.revealPlace(myRequest);
        }
        else {
            showErrorDialog();
        }
View Full Code Here

        Console.MODULES.getHeader().setContent(header);

        if(!hasBeenRevealed)
        {
            placeManager.revealRelativePlace(
                    new PlaceRequest(NameTokens.ModelBrowserPresenter)
            );
            hasBeenRevealed = true;
        }
    }
View Full Code Here

TOP

Related Classes of com.gwtplatform.mvp.client.proxy.PlaceRequest$Builder

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.