use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class PageResources method editAsXmlPerformed.
private void editAsXmlPerformed(ResourceType resourceType) {
PageParameters parameters = new PageParameters();
parameters.add(PageDebugView.PARAM_OBJECT_ID, resourceType.getOid());
parameters.add(PageDebugView.PARAM_OBJECT_TYPE, ResourceType.class.getSimpleName());
navigateToNext(PageDebugView.class, parameters);
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project wicket-dashboard by decebals.
the class OpenFlashChart method getUrlForJson.
private String getUrlForJson() {
PageParameters parameters = new PageParameters();
parameters.add("widgetId", getModelObject().getId());
String jsonUrl = urlFor(new DataResourceReference(), parameters).toString();
return toAbsolutePath(jsonUrl);
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project wicket-orientdb by OrienteerBAP.
the class ReverseProxyResource method mapUrl.
protected HttpUrl mapUrl(Attributes attributes) {
HttpUrl.Builder builder = getBaseUrl(attributes).newBuilder();
WebRequest webRequest = (WebRequest) attributes.getRequest();
Url url = webRequest.getUrl();
PageParameters pageParameters = attributes.getParameters();
for (int i = 0; i < pageParameters.getIndexedCount(); i++) {
builder.addPathSegment(pageParameters.get(i).toString());
}
// builder.addEncodedPathSegments(url.getPath());
builder.fragment(url.getFragment());
builder.encodedQuery(webRequest.asHttpServletRequest().getQueryString());
onMapUrl(attributes, builder);
return builder.build();
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project wicket by apache.
the class QueryStringWithVersionResourceCachingStrategyTest method testUrlVersionStoredInRequestCycle.
@Test
void testUrlVersionStoredInRequestCycle() {
WicketTester tester = new WicketTester();
tester.getApplication().getResourceSettings().setCachingStrategy(strategy);
try {
PageParameters urlParameters = new PageParameters();
urlParameters.add(versionParameter, "9A0364B9E99BB480DD25E1F0284C8555", INamedParameters.Type.QUERY_STRING);
ResourceUrl resourceUrl = new ResourceUrl("some-resource.txt", urlParameters);
strategy.undecorateUrl(resourceUrl);
String version = tester.getRequestCycle().getMetaData(IResourceCachingStrategy.URL_VERSION);
assertEquals("9A0364B9E99BB480DD25E1F0284C8555", version);
} finally {
tester.destroy();
}
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project wicket by apache.
the class QueryStringWithVersionResourceCachingStrategyTest method testDecorateUrl.
@Test
void testDecorateUrl() throws Exception {
ResourceUrl resourceUrl = new ResourceUrl("some-resource.txt", new PageParameters());
strategy.decorateUrl(resourceUrl, new TestResource());
assertEquals("some-resource.txt", resourceUrl.getFileName());
assertEquals(TEST_RESOURCE_VERSION, resourceUrl.getParameters().get(versionParameter).toString());
}
Aggregations