Package org.apache.wicket.request

Examples of org.apache.wicket.request.ObsoleteRequestParameters


    }
    final AppendingStringBuffer url = new AppendingStringBuffer(40);
    url.append(getMountPath());
    final ISharedResourceRequestTarget target = (ISharedResourceRequestTarget)requestTarget;

    ObsoleteRequestParameters requestParameters = target.getRequestParameters();
    appendParameters(url, requestParameters.getParameters());
    return url;
  }
View Full Code Here


    // create url to shared resource
    final AppendingStringBuffer url = new AppendingStringBuffer();
    url.append(getMountPath());

    final ObsoleteRequestParameters requestParameters = target.getRequestParameters();

    Map<String, ?> params = requestParameters.getParameters();

    if (params != null)
    {
      params = new LinkedHashMap<String, Object>(params);
View Full Code Here

    if (index == -1)
    {
      throw new IllegalArgumentException("Behavior " + this +
        " was not registered with this component: " + component.toString());
    }
    ObsoleteRequestParameters params = new ObsoleteRequestParameters();
    params.setBehaviorId(String.valueOf(index));
    if (request instanceof ServletWebRequest)
    {
      ServletWebRequest swr = (ServletWebRequest)request;
      // If we're coming in with an existing depth, use it. Otherwise,
      // compute from the URL. This provides correct behavior for repeated
      // AJAX requests: If we need to generate a URL within an AJAX
      // request for another one, it needs to be at the same depth as the
      // original AJAX request.
      int urlDepth = swr.getObsoleteRequestParameters().getUrlDepth();
      params.setUrlDepth(urlDepth > -1 ? urlDepth : swr.getDepthRelativeToWicketHandler());
    }

    final IRequestHandler target = new BehaviorRequestTarget(component.getPage(), component,
      listener, params);
    return encodeUrlFor(target);
View Full Code Here

   *            The parameters to pass to the resource.
   * @return The url for the shared resource
   */
  public final CharSequence urlFor(final ResourceReference resourceReference, ValueMap parameters)
  {
    ObsoleteRequestParameters requestParameters = new ObsoleteRequestParameters();
    requestParameters.setResourceKey(resourceReference.getSharedResourceKey());
    String name = resourceReference.getName();
    if (getApplication().getResourceSettings().getAddLastModifiedTimeToResourceReferenceUrl() &&
      !Strings.isEmpty(name) && !name.endsWith("/")) // test for / because it could be a
    // resource reference to a path..
    {
      Time time = resourceReference.lastModifiedTime();
      if (time != null)
      {
        if (parameters == null)
        {
          parameters = new ValueMap();
          parameters.put("w:lm", new Long(time.getMilliseconds() / 1000));
        }
      }
    }

    requestParameters.setParameters(parameters);
    return encodeUrlFor(new SharedResourceRequestTarget(requestParameters));
  }
View Full Code Here

    }

    url.append(Component.PATH_SEPARATOR);

    // Add behaviourId
    ObsoleteRequestParameters params = requestTarget.getRequestParameters();
    if (params != null && params.getBehaviorId() != null)
    {
      url.append(params.getBehaviorId());
    }
    url.append(Component.PATH_SEPARATOR);

    // Add URL depth
    if (params != null && params.getUrlDepth() != 0)
    {
      url.append(params.getUrlDepth());
    }
    if (IActivePageBehaviorListener.INTERFACE.getName().equals(rli.getName()))
    {
      url.append(url.indexOf("?") > -1 ? "&" : "?").append(
        IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME).append("=true");
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.ObsoleteRequestParameters

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.