Package org.apache.wicket.ng.request

Examples of org.apache.wicket.ng.request.IRequestHandler


   *
   * @return the page or null
   */
  public final Page getResponsePage()
  {
    IRequestHandler target = getRequestTarget();
    if (target instanceof IPageRequestTarget)
    {
      return ((IPageRequestTarget)target).getPage();
    }
    else if (target instanceof BookmarkablePageRequestTarget)
View Full Code Here


   *
   * @return the page class or null
   */
  public final Class<? extends Page> getResponsePageClass()
  {
    IRequestHandler target = getRequestTarget();
    if (target != null && (target instanceof IBookmarkablePageRequestTarget))
    {
      return ((IBookmarkablePageRequestTarget)target).getPageClass();
    }
    return null;
View Full Code Here

  {
    if (log.isDebugEnabled())
    {
      if (!requestTargets.isEmpty())
      {
        IRequestHandler former = requestTargets.peek();
        log.debug("replacing request target " + former + " with " + requestTarget);
      }
      else
      {
        log.debug("setting request target to " + requestTarget);
View Full Code Here

   *            The pagemap in which the response page should be created
   */
  public final <C extends Page> void setResponsePage(final Class<C> pageClass,
    final PageParameters pageParameters)
  {
    IRequestHandler target = new BookmarkablePageRequestTarget(pageClass, pageParameters);
    setRequestTarget(target);
  }
View Full Code Here

   * @param page
   *            The page to render as a response
   */
  public final void setResponsePage(final Page page)
  {
    IRequestHandler target = new PageRequestTarget(page);
    setRequestTarget(target);
  }
View Full Code Here

      // 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

  public final CharSequence urlFor(final Component component,
    final RequestListenerInterface listener, ValueMap params)
  {
    // Get Page holding component and mark it as stateful.
    final Page page = component.getPage();
    final IRequestHandler target;
    if ((listener != IRedirectListener.INTERFACE) && component.isStateless() &&
      page.isBookmarkable() && page.getStatelessHint())
    {
      PageParameters pageParameters = page.getPageParameters();
      if (pageParameters == null)
View Full Code Here

   * @return Bookmarkable URL to page
   */
  public final <C extends Page> CharSequence urlFor(final Class<C> pageClass,
    final PageParameters parameters)
  {
    final IRequestHandler target = new BookmarkablePageRequestTarget(pageClass, parameters);
    return encodeUrlFor(target);
  }
View Full Code Here

   *            The page
   * @return The url pointing to the provided page
   */
  public final CharSequence urlFor(final Page page)
  {
    IRequestHandler target = new PageRequestTarget(page);
    getSession().getPageManager().touchPage(((IPageRequestTarget)target).getPage());
    return encodeUrlFor(target);
  }
View Full Code Here

    // clean up target stack; calling detach has effects like
    // NOTE: don't remove the targets as testing code might need them
    // furthermore, the targets will be gc-ed with this cycle too
    for (int i = 0; i < requestTargets.size(); i++)
    {
      IRequestHandler target = requestTargets.get(i);
      if (target != null)
      {
        try
        {
          target.detach(this);
        }
        catch (RuntimeException e)
        {
          log.error("there was an error cleaning up target " + target + ".", e);
        }
View Full Code Here

TOP

Related Classes of org.apache.wicket.ng.request.IRequestHandler

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.