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

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

本文整理了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

  1. protected Map<String, String> getParameters() {
  2. Request request = RequestCycle.get().getRequest();
  3. HashMap<String, String> p = new HashMap<String, String>();
  4. Map<String, ?> requestParams = request.getRequestParameters().getParameters();
  5. for (String key : requestParams.keySet()) {
  6. if (key.startsWith(AbstractXinhaPlugin.XINHA_PARAM_PREFIX)) {
  7. p.put(key.substring(AbstractXinhaPlugin.XINHA_PARAM_PREFIX.length()), request.getParameter(key));
  8. }
  9. }
  10. return p;
  11. }

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

  1. /**
  2. * @return Any query parameters associated with the request for this resource
  3. */
  4. protected ValueMap getParameters()
  5. {
  6. if (parameters.get() == null)
  7. {
  8. return new ValueMap(RequestCycle.get().getRequest().getRequestParameters()
  9. .getParameters());
  10. }
  11. return (ValueMap)parameters.get();
  12. }

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

  1. /**
  2. * @return Any query parameters associated with the request for this resource
  3. */
  4. protected ValueMap getParameters()
  5. {
  6. if (parameters.get() == null)
  7. {
  8. return new ValueMap(RequestCycle.get()
  9. .getRequest()
  10. .getRequestParameters()
  11. .getParameters());
  12. }
  13. return (ValueMap)parameters.get();
  14. }

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

  1. @Override
  2. public final void respond(AjaxRequestTarget target) {
  3. try {
  4. Request req = RequestCycle.get().getRequest();
  5. if (logger().isDebugEnabled()) {
  6. logger().debug("params : {}", req.getRequestParameters());
  7. }
  8. onDnD(target,
  9. //req.getParameter("itemId"),
  10. req.getParameter("srcContainerId"),
  11. Integer.parseInt(req.getParameter("srcPosition")),
  12. req.getParameter("destContainerId"),
  13. Integer.parseInt(req.getParameter("destPosition"))
  14. );
  15. } catch (RuntimeException exc) {
  16. throw exc;
  17. } catch (Exception exc) {
  18. throw new RuntimeException("wrap: " + exc.getMessage(), exc);
  19. }
  20. }

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

  1. /**
  2. * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked()
  3. */
  4. public final void onLinkClicked()
  5. {
  6. RequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters();
  7. String oldPageMapName = parameters.getPageMapName();
  8. try
  9. {
  10. if (pageMapName != null)
  11. {
  12. RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName);
  13. }
  14. setResponsePage(pageLink.getPage());
  15. }
  16. finally
  17. {
  18. RequestCycle.get().getRequest().getRequestParameters().setPageMapName(oldPageMapName);
  19. }
  20. }

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

  1. /**
  2. * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked()
  3. */
  4. public final void onLinkClicked()
  5. {
  6. RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName);
  7. setResponsePage(pageLink.getPage());
  8. }

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

  1. /**
  2. * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked()
  3. */
  4. public final void onLinkClicked()
  5. {
  6. RequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters();
  7. String oldPageMapName = parameters.getPageMapName();
  8. try
  9. {
  10. if (pageMapName != null)
  11. {
  12. RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName);
  13. }
  14. setResponsePage(pageLink.getPage());
  15. }
  16. finally
  17. {
  18. RequestCycle.get().getRequest().getRequestParameters().setPageMapName(oldPageMapName);
  19. }
  20. }

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

  1. /**
  2. * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked()
  3. */
  4. public final void onLinkClicked()
  5. {
  6. RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName);
  7. setResponsePage(pageLink.getPage());
  8. }

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

  1. /**
  2. * Initializes Page by adding it to the Session and initializing it.
  3. */
  4. private final void init()
  5. {
  6. final RequestCycle cycle = getRequestCycle();
  7. String pageMapName = null;
  8. if (cycle != null)
  9. {
  10. RequestParameters parameters = getRequest().getRequestParameters();
  11. pageMapName = parameters.getPageMapName();
  12. if (pageMapName != null)
  13. {
  14. pageMapName = Strings.escapeMarkup(pageMapName).toString();
  15. }
  16. }
  17. final IPageMap pageMap = PageMap.forName(pageMapName);
  18. init(pageMap);
  19. }

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

  1. /**
  2. * Initializes Page by adding it to the Session and initializing it.
  3. */
  4. private final void init()
  5. {
  6. final RequestCycle cycle = getRequestCycle();
  7. String pageMapName = null;
  8. if (cycle != null)
  9. {
  10. RequestParameters parameters = getRequest().getRequestParameters();
  11. pageMapName = parameters.getPageMapName();
  12. }
  13. final IPageMap pageMap = PageMap.forName(pageMapName);
  14. init(pageMap);
  15. }

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

  1. /**
  2. * THIS METHOD IS NOT PART OF THE WICKET API. DO NOT ATTEMPT TO OVERRIDE OR CALL IT.
  3. *
  4. * Called when a link is clicked. The implementation of this method is currently to simply call
  5. * onClick(), but this may be augmented in the future.
  6. *
  7. * @see ILinkListener
  8. */
  9. public final void onLinkClicked()
  10. {
  11. // if there are popupsettings and this link is clicked.
  12. // set the popup page map in the request parameters, so that pages that
  13. // are created in the onClick are made in the wanted pagemap
  14. if (popupSettings != null)
  15. {
  16. RequestCycle.get()
  17. .getRequest()
  18. .getRequestParameters()
  19. .setPageMapName(popupSettings.getPageMapName(this));
  20. }
  21. // Invoke subclass handler
  22. onClick();
  23. }

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

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

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

  1. request.getRequestParameters());

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

  1. request.getRequestParameters());

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

  1. /**
  2. * Redirects to intercept page using the page map for the current request
  3. *
  4. * @param interceptPageClass
  5. * The intercept page class to redirect to
  6. */
  7. private void redirectToInterceptPage(final Class interceptPageClass)
  8. {
  9. final RequestCycle cycle = RequestCycle.get();
  10. final Page requestPage = cycle.getRequest().getPage();
  11. /*
  12. * requestPage can be null if we throw the restart response exception before any page is
  13. * instantiated in user's session. if this happens we switch to the pagemap of the request.
  14. */
  15. final IPageMap pageMap;
  16. if (requestPage != null)
  17. {
  18. pageMap = requestPage.getPageMap();
  19. }
  20. else
  21. {
  22. RequestParameters parameters = cycle.getRequest().getRequestParameters();
  23. pageMap = PageMap.forName(parameters.getPageMapName());
  24. }
  25. pageMap.redirectToInterceptPage(interceptPageClass);
  26. }
  27. }

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

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

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

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

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

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

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

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

相关文章