Package com.gwtplatform.mvp.shared.proxy

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


                    circuit.dispatch(new HostSelection(hosts.getSelectedValue()));

                    Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                        @Override
                        public void execute() {
                            placeManager.revealPlace(new PlaceRequest(NameTokens.DomainRuntimePresenter));
                        }
                    });
                }
            }
        }));
View Full Code Here


  public PlaceRequest toPlaceRequest(String placeToken) throws TokenFormatException {
    return unescapedToPlaceRequest(URL.decodeQueryString(placeToken));
  }

  private PlaceRequest unescapedToPlaceRequest(String unescapedPlaceToken) throws TokenFormatException {
    PlaceRequest req = null;

    int split = unescapedPlaceToken.indexOf(paramSeparator);
    if (split == 0) {
      throw new TokenFormatException("Place history token is missing.");
    } else if (split == -1) {
      req = new PlaceRequest(unescapedPlaceToken);
    } else if (split >= 0) {
      req = new PlaceRequest(unescapedPlaceToken.substring(0, split));
      String paramsChunk = unescapedPlaceToken.substring(split + 1);
      String[] paramTokens = paramsChunk.split(paramSeparator);
      for (String paramToken : paramTokens) {
        if (paramToken.isEmpty()) {
          throw new TokenFormatException("Bad parameter: Successive parameters require a single '" + paramSeparator + "' between them.");
        }
        String[] param = splitParamToken(paramToken);
        String key = paramValueUnescape(param[0]);
        String value = paramValueUnescape(param[1]);
        req = req.with(key, value);
      }
    }
    return req;
  }
View Full Code Here

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

                // chose default view if necessary
                PlaceRequest preference = NameTokens.ServerProfile
                        .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

        Column<JcaWorkmanager, JcaWorkmanager> option = new Column<JcaWorkmanager, JcaWorkmanager>(
                new ViewLinkCell<JcaWorkmanager>(Console.CONSTANTS.common_label_view(), new ActionCell.Delegate<JcaWorkmanager>() {
                    @Override
                    public void execute(JcaWorkmanager selection) {
                        presenter.getPlaceManager().revealPlace(
                                new PlaceRequest(NameTokens.JcaPresenter).with("name", selection.getName())
                        );
                    }
                })
        ) {
            @Override
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

        Column<JPADeployment, JPADeployment> option = new Column<JPADeployment, JPADeployment>(
                new ViewLinkCell<JPADeployment>(Console.CONSTANTS.common_label_view(), new ActionCell.Delegate<JPADeployment>() {
                    @Override
                    public void execute(JPADeployment selection) {
                        presenter.getPlaceManager().revealPlace(
                                new PlaceRequest(NameTokens.JPAMetricPresenter)
                                        .with("dpl", selection.getDeploymentName())
                                        .with("unit", selection.getPersistenceUnit())
                        );
                    }
                })
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

        Column<Property, String> option = new Column<Property, 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

            public void onChange(Action action) {
                List<SubsystemRecord> subsystems = subsysStore.getSubsystems(profileSelection.getName());
                getView().setSubsystems(subsystems);

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

        Column<JGroupsStack, JGroupsStack> option = new Column<JGroupsStack, JGroupsStack>(
                new ViewLinkCell<JGroupsStack>(Console.CONSTANTS.common_label_view(), new ActionCell.Delegate<JGroupsStack>() {
                    @Override
                    public void execute(JGroupsStack selection) {
                        presenter.getPlaceManager().revealPlace(
                                new PlaceRequest(NameTokens.JGroupsPresenter).with("name", selection.getName())
                        );
                    }
                })
        ) {
            @Override
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.