Examples of IRequestablePage


Examples of org.apache.wicket.request.component.IRequestablePage

   * @see org.apache.wicket.request.IRequestHandler#respond(org.apache.wicket.request.IRequestCycle)
   */
  @Override
  public void respond(final IRequestCycle requestCycle)
  {
    final IRequestablePage page = getPage();
    final boolean freshPage = pageComponentProvider.isPageInstanceFresh();
    final boolean isAjax = ((WebRequest)requestCycle.getRequest()).isAjax();

    IRequestableComponent component = null;
    try
    {
      component = getComponent();
    }
    catch (ComponentNotFoundException e)
    {
      // either the page is stateless and the component we are looking for is not added in the
      // constructor
      // or the page is stateful+stale and a new instances was created by pageprovider
      // we denote this by setting component to null
      component = null;
    }


    if ((component == null && !freshPage) || (component != null && component.getPage() != page))
    {
      throw new ComponentNotFoundException("Component '" + getComponentPath()
          + "' has been removed from page.");
    }

    if (page instanceof Page)
    {
      // initialize the page to be able to check whether it is stateless
      ((Page)page).internalInitialize();
    }
    final boolean isStateless = page.isPageStateless();

    RedirectPolicy policy = isStateless
        ? RedirectPolicy.NEVER_REDIRECT
        : RedirectPolicy.AUTO_REDIRECT;
    final IPageProvider pageProvider = new PageProvider(page);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.