org.apache.wicket.Request.getRequestParameters()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(271)

本文整理了Java中org.apache.wicket.Request.getRequestParameters方法的一些代码示例,展示了Request.getRequestParameters的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getRequestParameters方法的具体详情如下:
包路径:org.apache.wicket.Request
类名称:Request
方法名:getRequestParameters

Request.getRequestParameters介绍

[英]Gets the request parameters object using the instance of IRequestCodingStrategy of the provided request cycle processor.
[中]使用提供的请求周期处理器的IRequestCodingStrategy实例获取请求参数对象。

代码示例

代码示例来源:origin: org.onehippo.cms7/hippo-cms-xinha-integration

protected Map<String, String> getParameters() {
  Request request = RequestCycle.get().getRequest();
  HashMap<String, String> p = new HashMap<String, String>();
  Map<String, ?> requestParams = request.getRequestParameters().getParameters();
  for (String key : requestParams.keySet()) {
    if (key.startsWith(AbstractXinhaPlugin.XINHA_PARAM_PREFIX)) {
      p.put(key.substring(AbstractXinhaPlugin.XINHA_PARAM_PREFIX.length()), request.getParameter(key));
    }
  }
  return p;
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * @return Any query parameters associated with the request for this resource
 */
protected ValueMap getParameters()
{
  if (parameters.get() == null)
  {
    return new ValueMap(RequestCycle.get().getRequest().getRequestParameters()
        .getParameters());
  }
  return (ValueMap)parameters.get();
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @return Any query parameters associated with the request for this resource
 */
protected ValueMap getParameters()
{
  if (parameters.get() == null)
  {
    return new ValueMap(RequestCycle.get()
      .getRequest()
      .getRequestParameters()
      .getParameters());
  }
  return (ValueMap)parameters.get();
}

代码示例来源:origin: org.wicketstuff/jquery

@Override
public final void respond(AjaxRequestTarget target) {
  try {
    Request req = RequestCycle.get().getRequest();
    if (logger().isDebugEnabled()) {
      logger().debug("params : {}", req.getRequestParameters());
    }
    onDnD(target,
        //req.getParameter("itemId"),
        req.getParameter("srcContainerId"),
        Integer.parseInt(req.getParameter("srcPosition")),
        req.getParameter("destContainerId"),
        Integer.parseInt(req.getParameter("destPosition"))
    );
  } catch (RuntimeException exc) {
    throw exc;
  } catch (Exception exc) {
    throw new RuntimeException("wrap: " + exc.getMessage(), exc);
  }
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked()
 */
public final void onLinkClicked()
{
  RequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters();
  String oldPageMapName = parameters.getPageMapName();
  try
  {
    if (pageMapName != null)
    {
      RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName);
    }
    setResponsePage(pageLink.getPage());
  }
  finally
  {
    RequestCycle.get().getRequest().getRequestParameters().setPageMapName(oldPageMapName);
  }
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked()
 */
public final void onLinkClicked()
{
  RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName);
  setResponsePage(pageLink.getPage());
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked()
 */
public final void onLinkClicked()
{
  RequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters();
  String oldPageMapName = parameters.getPageMapName();
  try
  {
    if (pageMapName != null)
    {
      RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName);
    }
    setResponsePage(pageLink.getPage());
  }
  finally
  {
    RequestCycle.get().getRequest().getRequestParameters().setPageMapName(oldPageMapName);
  }
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked()
 */
public final void onLinkClicked()
{
  RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName);
  setResponsePage(pageLink.getPage());
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Initializes Page by adding it to the Session and initializing it.
 */
private final void init()
{
  final RequestCycle cycle = getRequestCycle();
  String pageMapName = null;
  if (cycle != null)
  {
    RequestParameters parameters = getRequest().getRequestParameters();
    pageMapName = parameters.getPageMapName();
    if (pageMapName != null)
    {
      pageMapName = Strings.escapeMarkup(pageMapName).toString();
    }
  }
  final IPageMap pageMap = PageMap.forName(pageMapName);
  init(pageMap);
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Initializes Page by adding it to the Session and initializing it.
 */
private final void init()
{
  final RequestCycle cycle = getRequestCycle();
  String pageMapName = null;
  if (cycle != null)
  {
    RequestParameters parameters = getRequest().getRequestParameters();
    pageMapName = parameters.getPageMapName();
  }
  final IPageMap pageMap = PageMap.forName(pageMapName);
  init(pageMap);
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * THIS METHOD IS NOT PART OF THE WICKET API. DO NOT ATTEMPT TO OVERRIDE OR CALL IT.
 * 
 * Called when a link is clicked. The implementation of this method is currently to simply call
 * onClick(), but this may be augmented in the future.
 * 
 * @see ILinkListener
 */
public final void onLinkClicked()
{
  // if there are popupsettings and this link is clicked.
  // set the popup page map in the request parameters, so that pages that
  // are created in the onClick are made in the wanted pagemap
  if (popupSettings != null)
  {
    RequestCycle.get()
      .getRequest()
      .getRequestParameters()
      .setPageMapName(popupSettings.getPageMapName(this));
  }
  // Invoke subclass handler
  onClick();
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * THIS METHOD IS NOT PART OF THE WICKET API. DO NOT ATTEMPT TO OVERRIDE OR CALL IT.
 * 
 * Called when a link is clicked. The implementation of this method is currently to simply call
 * onClick(), but this may be augmented in the future.
 * 
 * @see ILinkListener
 */
public final void onLinkClicked()
{
  // if there are popupsettings and this link is clicked.
  // set the popup page map in the request parameters, so that pages that
  // are created in the onClick are made in the wanted pagemap
  if (popupSettings != null)
  {
    RequestCycle.get().getRequest().getRequestParameters().setPageMapName(
      popupSettings.getPageMap(this).getName());
  }
  // Invoke subclass handler
  onClick();
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

request.getRequestParameters());

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

request.getRequestParameters());

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
   * Redirects to intercept page using the page map for the current request
   * 
   * @param interceptPageClass
   *            The intercept page class to redirect to
   */
  private void redirectToInterceptPage(final Class interceptPageClass)
  {
    final RequestCycle cycle = RequestCycle.get();
    final Page requestPage = cycle.getRequest().getPage();

    /*
     * requestPage can be null if we throw the restart response exception before any page is
     * instantiated in user's session. if this happens we switch to the pagemap of the request.
     */
    final IPageMap pageMap;
    if (requestPage != null)
    {
      pageMap = requestPage.getPageMap();
    }
    else
    {
      RequestParameters parameters = cycle.getRequest().getRequestParameters();
      pageMap = PageMap.forName(parameters.getPageMapName());
    }

    pageMap.redirectToInterceptPage(interceptPageClass);
  }
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

RequestParameters parameters = cycle.getRequest().getRequestParameters();
pageMap = PageMap.forName(parameters.getPageMapName());

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

.getComponentPath(), Component.PATH_SEPARATOR);
String currentPageId = Strings.firstPathComponent(currentRequestCycle.getRequest()
  .getRequestParameters()
  .getComponentPath(), Component.PATH_SEPARATOR);

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

.getComponentPath(), Component.PATH_SEPARATOR);
String currentPageId = Strings.firstPathComponent(currentRequestCycle.getRequest()
    .getRequestParameters().getComponentPath(), Component.PATH_SEPARATOR);

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

RequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters();
String oldPageMapName = parameters.getPageMapName();

相关文章