本文整理汇总了Java中com.gwtplatform.mvp.shared.proxy.PlaceRequest.with方法的典型用法代码示例。如果您正苦于以下问题:Java PlaceRequest.with方法的具体用法?Java PlaceRequest.with怎么用?Java PlaceRequest.with使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.gwtplatform.mvp.shared.proxy.PlaceRequest
的用法示例。
在下文中一共展示了PlaceRequest.with方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: 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);
}