Package org.apache.wicket

Examples of org.apache.wicket.Request


    if (decodedQueryParams != null)
    {
      // The difficulty now is that this.defaultStrategy.decode(request)
      // doesn't know the just decoded url which is why must create
      // a fake Request for.
      Request fakeRequest = new DecodedUrlRequest(request, url, decodedQueryParams);
      return defaultStrategy.decode(fakeRequest);
    }

    return defaultStrategy.decode(request);
  }
View Full Code Here


    if (inputArrayCache == null)
    {
      // this array will aggregate all input names
      ArrayList names = null;

      final Request request = getRequest();
      if (request instanceof IMultipartWebRequest)
      {
        // retrieve the filename->FileItem map from request
        final Map itemNameToItem = ((IMultipartWebRequest)request).getFiles();
        Iterator it = itemNameToItem.entrySet().iterator();
View Full Code Here

            target = EmptyAjaxRequestHandler.getInstance();
          }
        }
        else
        {
          Request request = requestCycle.getRequest();
          if (request instanceof WebRequest && ((WebRequest)request).isAjax() &&
            processRequest == 2)
          {
            // if processRequest is false in an ajax request just have an empty ajax
            // target
View Full Code Here

   * @return The uploaded file
   */
  public FileUpload getFileUpload()
  {
    // Get request
    final Request request = getRequest();

    // If we successfully installed a multipart request
    if (request instanceof IMultipartWebRequest)
    {
      // Get the item for the path
View Full Code Here

    if (inputArrayCache == null)
    {
      // this array will aggregate all input names
      ArrayList<String> names = null;

      final Request request = getRequest();
      if (request instanceof IMultipartWebRequest)
      {
        // retrieve the filename->FileItem map from request
        final Map<String, FileItem> itemNameToItem = ((IMultipartWebRequest)request).getFiles();
        Iterator<Entry<String, FileItem>> it = itemNameToItem.entrySet().iterator();
View Full Code Here

   *
   * @param pageClass
   */
  public void cacheRequest(Class<? extends Page> pageClass) {
    // build absolute url with correctly encoded parameters?!
    Request req = WebRequestCycle.get().getRequest();
    Map<String, ?> params = req.getRequestParameters().getParameters();
    PageParameters pageParams = new PageParameters(params);
    String relativeUrl = WebRequestCycle.get().urlFor(pageClass, pageParams).toString();
    requestUrl = RequestUtils.toAbsolutePath(relativeUrl);
    if (isTemporary())
    {
View Full Code Here

   *
   * @param pageClass
   */
  public void cacheRequest(Class<? extends Page> pageClass) {
    // build absolute url with correctly encoded parameters?!
    Request req = WebRequestCycle.get().getRequest();
    Map<String, ?> params = req.getRequestParameters().getParameters();
    PageParameters pageParams = new PageParameters(params);
    String relativeUrl = WebRequestCycle.get().urlFor(pageClass, pageParams).toString();
    requestUrl = RequestUtils.toAbsolutePath(relativeUrl);
    if (isTemporary())
    {
View Full Code Here

    if (decodedQueryParams != null)
    {
      // The difficulty now is that this.defaultStrategy.decode(request)
      // doesn't know the just decoded url which is why must create
      // a fake Request for.
      Request fakeRequest = new DecodedUrlRequest(request, url, decodedQueryParams);
      return defaultStrategy.decode(fakeRequest);
    }

    return defaultStrategy.decode(request);
  }
View Full Code Here

public class Fixture_Request_Stub extends MockFixtureAdapter<Request> {

    @Override
    public void setUp(final MockFixture.Context fixtureContext) {
        final Mockery mockery = fixtureContext.getMockery();
        final Request mock = createMock(fixtureContext, Request.class);
        mockery.checking(new Expectations() {
            {
                // must provide explicit expectation, since Locale is final.
                allowing(mock).getLocale();
                will(returnValue(Locale.getDefault()));
View Full Code Here

    public void setUp(final MockFixture.Context fixtureContext) {
        final FixtureMockery mockery = fixtureContext.getMockery();

        final AuthenticationManager mockAuthMgr =
            mockery.fixture(Fixture_AuthenticationManager_AuthenticateOk.class).object();
        final Request stubRequest = mockery.fixture(Fixture_Request_Stub.class).object();

        webSession = new AuthenticatedWebSessionForIsis(stubRequest) {
            private static final long serialVersionUID = 1L;

            @Override
View Full Code Here

TOP

Related Classes of org.apache.wicket.Request

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.