Package org.apache.wicket

Examples of org.apache.wicket.RestartResponseAtInterceptPageException


          {
            if (block &&
              (componentClass == TargetPage.class || componentClass == HomePage.class))
            {
              block = false;
              throw new RestartResponseAtInterceptPageException(InterceptPage.class);
            }
            return true;
          }
        });
        super.init();
View Full Code Here


      Class<T> componentClass)
    {
      if (MockHomePage.class.equals(componentClass) &&
        !((MySession)Session.get()).isLoggedIn())
      {
        throw new RestartResponseAtInterceptPageException(MockLoginPage.class);
      }
      return true;
    }
View Full Code Here

          // unauthorized component is a page, but it's not the
          // sign in page
          if (component instanceof Page)
          {
            // Redirect to page to let the user sign in
            throw new RestartResponseAtInterceptPageException(signInPageClass);
          }
          else
          {
            // The component was not a page, so throw exception
            throw new UnauthorizedInstantiationException(component.getClass());
View Full Code Here

  public void intercept()
  {
    showIntercept = !showIntercept;
    if (showIntercept)
    {
      throw new RestartResponseAtInterceptPageException(B.class);
    }
  }
View Full Code Here

      // else we need to make a page (see below) or set it hard to a
      // redirect.
      Class<? extends Page> accessDeniedPageClass = application.getApplicationSettings()
        .getAccessDeniedPage();

      throw new RestartResponseAtInterceptPageException(accessDeniedPageClass);
    }
    else if (e instanceof PageExpiredException)
    {
      Class<? extends Page> pageExpiredErrorPageClass = application.getApplicationSettings()
        .getPageExpiredErrorPage();
View Full Code Here

   */
  public BookmarkableThrowsInterceptPage()
  {
    if (Application.get().getMetaData(SECURITY) == null)
    {
      throw new RestartResponseAtInterceptPageException(BookmarkableSetSecurityPage.class);
    }
  }
View Full Code Here

    button = new Button("redirectToPageWithInterceptionBtn") {
      private static final long serialVersionUID = 1L;
     
      @Override
      public void onSubmit() {
        throw new RestartResponseAtInterceptPageException(SayHiPage.class);
      }
    };
    form.add(button);
   
    button = new Button("redirectToURLBtn") {
      private static final long serialVersionUID = 1L;
     
      @Override
      public void onSubmit() {
        throw new RedirectToUrlException("http://wicketdemo.sourceforge.net");
      }
    };
    form.add(button);
   
    button = new Button("redirectToDetourBtn") {
      private static final long serialVersionUID = 1L;
     
      @Override
      public void onSubmit() {
        throw new RestartResponseAtInterceptPageException(ContinuationPage.class);
      }
    };
    form.add(button);
  }
View Full Code Here

                                String serviceUrl = jtracCasProxyTicketValidator.getServiceProperties().getService();
                                String loginUrl = jtracCasProxyTicketValidator.getLoginUrl();
                                logger.debug("cas authentication: service URL: " + serviceUrl);
                                String redirectUrl = loginUrl + "?service=" + serviceUrl;
                                logger.debug("attempting to redirect to: " + redirectUrl);
                                throw new RestartResponseAtInterceptPageException(
                                        new RedirectPage(redirectUrl));
                            } else {
                                throw new RestartResponseAtInterceptPageException(
                                        LoginPage.class);
                            }
                        }
                        return true;
                    }
View Full Code Here

       
        User user = getPrincipal();
       
        if(!user.isAllocatedToSpace(item.getSpace().getId())) {
            logger.debug("user is not allocated to space");
            throw new RestartResponseAtInterceptPageException(ErrorPage.class);
        }               
       
        // Edit: Only if there is no history (related item) of the Item
        boolean nohistory = true;
        if (item.getHistory() != null) {
View Full Code Here

          // Intercept the request, but remember the target for later.
          // Invoke Component.continueToOriginalDestination() after successful logon to
          // continue with the target remembered.

          throw new RestartResponseAtInterceptPageException(SignIn.class);
        }

        // okay to proceed
        return true;
      }
View Full Code Here

TOP

Related Classes of org.apache.wicket.RestartResponseAtInterceptPageException

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.