本文整理汇总了Java中com.gwtplatform.mvp.shared.proxy.PlaceRequest类的典型用法代码示例。如果您正苦于以下问题:Java PlaceRequest类的具体用法?Java PlaceRequest怎么用?Java PlaceRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlaceRequest类属于com.gwtplatform.mvp.shared.proxy包,在下文中一共展示了PlaceRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: logout
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override
public void logout() {
dispatch.execute(userService.logout(), new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) {
Window.alert("Error during logging out the connected user...");
}
@Override
public void onSuccess(Void result) {
PlaceRequest placeRequest = new PlaceRequest.Builder()
.nameToken(NameTokens.getLogin())
.build();
currentUser.setLoggedIn(false);
placeManager.revealPlace(placeRequest);
}
});
}
开发者ID:imrabti,项目名称:gwtp-spring-security,代码行数:19,代码来源:ApplicationPresenter.java
示例2: select
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override public void select(Drawing drawing) {
PlaceRequest placeRequest = new PlaceRequest.Builder()
.nameToken(NameTokens.PLAYER)
.with("user", "" + drawing.getUserId())
.with("deal", "" + drawing.getDealId())
.with("drawing", "" + drawing.getId())
.build();
String historyToken = placeManager.buildHistoryToken(placeRequest);
UrlBuilder urlBuilder = new UrlBuilder()
.setProtocol(Window.Location.getProtocol())
.setHost(Window.Location.getHost())
.setPath(Window.Location.getPath())
.setHash(historyToken);
String port = Window.Location.getPort();
if (port != null && port.length() > 1) {
urlBuilder.setPort(Integer.parseInt(port));
}
getView().displayLink(urlBuilder.buildString());
}
开发者ID:Unisay,项目名称:preferanser,代码行数:20,代码来源:DrawingsDialogPresenter.java
示例3: sendPlaceRequest
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
public XAnalytics sendPlaceRequest(final PlaceRequest placeRequest) {
return whenReady(new Function() {
@Override
public void f() {
sendRequestFn.apply(placeRequest);
}
});
}
开发者ID:spirylics,项目名称:x-gwt,代码行数:9,代码来源:XAnalytics.java
示例4: prepareFromRequest
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override
public void prepareFromRequest(final PlaceRequest prequest) {
super.prepareFromRequest(prequest);
final String page = prequest.getParameter(AppParameters.ID, null);
if (StringUtils.isNumeric(page)) {
this.readEntry(Long.valueOf(page));
}
}
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators-example,代码行数:9,代码来源:PersonPresenter.java
示例5: fillForm
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
private void fillForm(final Person ppersonData, final String pmessage) {
this.personData = ppersonData;
this.getView().fillForm(this.personData);
this.getView().showMessage(pmessage);
final Builder placeRequestBuilder =
new PlaceRequest.Builder().nameToken(NameTokens.PERSON_WITH_ID);
placeRequestBuilder.with(AppParameters.ID,
Objects.toString(this.personData.getId(), StringUtils.EMPTY));
this.placeManager.updateHistory(placeRequestBuilder.build(), true);
}
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators-example,代码行数:11,代码来源:PersonPresenter.java
示例6: onApplicationSelected
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
/**
* Notifies the presenter that the user has selected an application. The
* presenter will load the application details and pass them back to the
* view to be displayed.
*
* @param application the selected application.
*/
public void onApplicationSelected(Application application) {
PlaceRequest request = new PlaceRequest(NameTokens.APPLICATIONS_PRESENTER);
if (application != null) {
request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(application.getName()));
}
_placeManager.revealRelativePlace(request, -1);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:15,代码来源:ApplicationPresenter.java
示例7: onArtifactSelected
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
/**
* Notifies the presenter that the user has selected an artifact reference.
* The presenter will navigate to the artifacts page.
*
* @param artifact the selected artifact.
*/
public void onArtifactSelected(ArtifactReference artifact) {
PlaceRequest request = new PlaceRequest(NameTokens.ARTIFACTS_PRESENTER);
if (artifact != null) {
request = request.with(NameTokens.ARTIFACT_REFERENCE_KEY_PARAM, URL.encode(artifact.key()));
}
_placeManager.revealRelativePlace(request, -1);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:14,代码来源:ApplicationPresenter.java
示例8: onNavigateToService
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
/**
* Notifies the presenter that the user wishes to view details about a
* specific service.
*
* @param service the service.
* @param application the application containing the service.
*/
public void onNavigateToService(Service service, Application application) {
if (service == null || application == null) {
Console.error(Singleton.MESSAGES.error_navigateToService());
return;
}
_placeManager.revealRelativePlace(
new PlaceRequest(NameTokens.SERVICES_PRESENTER).with(NameTokens.SERVICE_NAME_PARAM,
URL.encode(service.getName())).with(NameTokens.APPLICATION_NAME_PARAM,
URL.encode(application.getName())), -1);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:18,代码来源:ApplicationPresenter.java
示例9: onNavigateToReference
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
/**
* Notifies the presenter that the user wishes to view details about a
* specific reference.
*
* @param reference the reference.
* @param application the application containing the reference.
*/
public void onNavigateToReference(Reference reference, Application application) {
if (reference == null || application == null) {
Console.error(Singleton.MESSAGES.error_navigateToReference());
return;
}
_placeManager.revealRelativePlace(
new PlaceRequest(NameTokens.REFERENCES_PRESENTER).with(NameTokens.REFERENCE_NAME_PARAM,
URL.encode(reference.getName())).with(NameTokens.APPLICATION_NAME_PARAM,
URL.encode(application.getName())), -1);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:18,代码来源:ApplicationPresenter.java
示例10: prepareFromRequest
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override
public void prepareFromRequest(PlaceRequest request) {
super.prepareFromRequest(request);
_applicationName = request.getParameter(NameTokens.APPLICATION_NAME_PARAM, null);
if (_applicationName != null) {
_applicationName = URL.decode(_applicationName);
}
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:9,代码来源:ApplicationPresenter.java
示例11: onApplicationSelected
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
/**
* Navigates to the application page, displaying the details of the
* application.
*
* @param application the selected application
*/
public void onApplicationSelected(Application application) {
if (application == null) {
Console.error(Singleton.MESSAGES.error_navigateToApplication());
return;
}
_placeManager.revealRelativePlace(
new PlaceRequest(NameTokens.APPLICATIONS_PRESENTER).with(NameTokens.APPLICATION_NAME_PARAM,
URL.encode(application.getName())), -1);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:16,代码来源:ArtifactPresenter.java
示例12: prepareFromRequest
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override
public void prepareFromRequest(PlaceRequest request) {
super.prepareFromRequest(request);
_artifactKey = request.getParameter(NameTokens.ARTIFACT_REFERENCE_KEY_PARAM, null);
if (_artifactKey != null) {
_artifactKey = URL.decode(_artifactKey);
}
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:9,代码来源:ArtifactPresenter.java
示例13: createApplicationLink
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
private String createApplicationLink(String applicationName) {
PlaceRequest request = new PlaceRequest(NameTokens.APPLICATIONS_PRESENTER);
if (applicationName != null) {
request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(applicationName));
}
return _presenter.getPlaceManager().buildRelativeHistoryToken(request, -1);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:8,代码来源:ServiceEditor.java
示例14: onServiceSelected
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
/**
* Notifies the presenter that the user has selected a service. The
* presenter will load the service details and pass them back to the view to
* be displayed.
*
* @param service the selected service.
*/
public void onServiceSelected(Service service) {
PlaceRequest request = new PlaceRequest(NameTokens.SERVICES_PRESENTER);
if (service != null && service.getName() != null) {
request = request.with(NameTokens.SERVICE_NAME_PARAM, URL.encode(service.getName()));
if (service.getApplication() != null) {
request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(service.getApplication()));
}
}
_placeManager.revealRelativePlace(request, -1);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:18,代码来源:ServicePresenter.java
示例15: prepareFromRequest
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override
public void prepareFromRequest(PlaceRequest request) {
super.prepareFromRequest(request);
_serviceName = _placeManager.getCurrentPlaceRequest().getParameter(NameTokens.SERVICE_NAME_PARAM, null);
_applicationName = _placeManager.getCurrentPlaceRequest().getParameter(NameTokens.APPLICATION_NAME_PARAM, null);
if (_serviceName != null) {
_serviceName = URL.decode(_serviceName);
}
if (_applicationName != null) {
_applicationName = URL.decode(_applicationName);
}
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:15,代码来源:ServicePresenter.java
示例16: prepareFromRequest
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override
public void prepareFromRequest(PlaceRequest request) {
super.prepareFromRequest(request);
_componentName = request.getParameter(NameTokens.COMPONENT_NAME_PARAM, null);
if (_componentName != null) {
_componentName = URL.decode(_componentName);
}
_extensionName = request.getParameter(NameTokens.EXTENSION_NAME_PARAM, null);
if (_extensionName != null) {
_extensionName = URL.decode(_extensionName);
}
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:13,代码来源:ConfigPresenter.java
示例17: GWTPTabPanel
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
/**
* Create a new GWTPTabPanel.
*
* @param placeManager the place manager to use when processing tab
* selections.
*/
public GWTPTabPanel(final PlaceManager placeManager) {
_layout = new LayoutPanel();
_layout.addStyleName("fill-layout"); //$NON-NLS-1$
_tabBar = new DefaultTabLayoutPanel(40, Unit.PX);
// _tabBar = new TabBar();
_tabBar.addSelectionHandler(new SelectionHandler<Integer>() {
@Override
public void onSelection(SelectionEvent<Integer> event) {
if (_modifyingTabs) {
// add/remove tab may change the selection
return;
}
if (event.getSelectedItem() < 0) {
// TODO: WHAT????
return;
}
final PlaceRequest current = placeManager.getCurrentPlaceRequest();
final String selectedToken = _tabs.get(event.getSelectedItem()).getTargetHistoryToken();
final String currentToken = current == null ? null : current.getNameToken();
if (!selectedToken.equals(currentToken)) {
placeManager.revealPlace(new PlaceRequest(selectedToken));
}
}
});
_content = new LayoutPanel();
_content.setStyleName("fill-layout"); //$NON-NLS-1$
_layout.add(_tabBar);
_layout.add(_content);
((LayoutPanel) _layout).setWidgetTopHeight(_tabBar, 0, Unit.PX, 40, Unit.PX);
((LayoutPanel) _layout).setWidgetTopHeight(_content, 40, Unit.PX, 100, Unit.PCT);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:42,代码来源:GWTPTabPanel.java
示例18: onReferenceSelected
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
/**
* Notifies the presenter that the user has selected a reference. The
* presenter will load the reference details and pass them back to the view
* to be displayed.
*
* @param reference the selected reference.
*/
public void onReferenceSelected(Reference reference) {
PlaceRequest request = new PlaceRequest(NameTokens.REFERENCES_PRESENTER);
if (reference != null && reference.getName() != null) {
request = request.with(NameTokens.REFERENCE_NAME_PARAM, URL.encode(reference.getName()));
if (reference.getApplication() != null) {
request = request.with(NameTokens.APPLICATION_NAME_PARAM, URL.encode(reference.getApplication()));
}
}
_placeManager.revealRelativePlace(request, -1);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:18,代码来源:ReferencePresenter.java
示例19: prepareFromRequest
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override
public void prepareFromRequest(PlaceRequest request) {
super.prepareFromRequest(request);
_referenceName = _placeManager.getCurrentPlaceRequest().getParameter(NameTokens.REFERENCE_NAME_PARAM, null);
_applicationName = _placeManager.getCurrentPlaceRequest().getParameter(NameTokens.APPLICATION_NAME_PARAM, null);
if (_referenceName != null) {
_referenceName = URL.decode(_referenceName);
}
if (_applicationName != null) {
_applicationName = URL.decode(_applicationName);
}
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:15,代码来源:ReferencePresenter.java
示例20: prepareFromRequest
import com.gwtplatform.mvp.shared.proxy.PlaceRequest; //导入依赖的package包/类
@Override
public void prepareFromRequest(PlaceRequest request) {
String query = request.getParameter(ParameterTokens.QUERY, null);
String appearance = request.getParameter(ParameterTokens.APPEARANCE, null);
String view = request.getParameter(ParameterTokens.VIEW, DEFAULT_VIEW);
String connectionString = request.getParameter(ParameterTokens.CONNECTION_STRING, null);
if (connectionString != null)
AppUtils.CONNECTION_STRING = URL.decodePathSegment(connectionString);
if (query != null)
query = AppUtils.decodeBase64(URL.decodePathSegment(query));
if (appearance != null)
appearance = AppUtils.decodeBase64(URL.decodePathSegment(appearance));
if (query != null && !query.equals(AppUtils.QUERY)) {
AppUtils.QUERY = query;
result = null;
}
if (appearance != null && !appearance.equals(AppUtils.APPEARANCE)) {
AppUtils.APPEARANCE = appearance;
result = null;
}
if (view != null && !view.equals(AppUtils.VIEW)) {
AppUtils.VIEW = view;
}
}
开发者ID:donbeave,项目名称:grails-console-charts,代码行数:31,代码来源:AbstractApplicationPresenter.java
注:本文中的com.gwtplatform.mvp.shared.proxy.PlaceRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论