/** * Default constructor */ public RichTextNewTabPage(){ throw new PageExpiredException("Construtor without arguments was called!"); }
/** * Handles the case where a non-bookmarkable url with a hybrid base refers to a page that is no * longer in session. eg <code>/context/hybrid-mount.0.23?wicket:interface=...</code>. The * default behavior is to throw a <code>PageExpiredException</code>. * * This method can be overwritten to, for example, return the user to a new instance of the * bookmarkable page that was mounted using hybrid strategy - this, however, should only be used * in cases where the page expects no page parameters because they are no longer available. * * @param pageMapName * page map name this page is mounted in * @param pageClass * class of mounted page * @param trailingSlashesCount * count of trailing slsahes in the url * @param redirect * whether or not a redirect should be issued * @return request target used to handle this situation */ protected IRequestTarget handleExpiredPage(String pageMapName, Class pageClass, int trailingSlashesCount, boolean redirect) { throw new PageExpiredException( "Request cannot be processed. The target page does not exist anymore."); }
/** * @param ex * * @return xxx * @deprecated Use {@link #onError(Exception, String)} */ @Deprecated protected String onError(final Exception ex) { throw new PageExpiredException("Invalid URL", ex); }
/** * Handles the case where a non-bookmarkable url with a hybrid base refers to a page that is no * longer in session. eg <code>/context/hybrid-mount.0.23?wicket:interface=...</code>. The * default behavior is to throw a <code>PageExpiredException</code>. * * This method can be overwritten to, for example, return the user to a new instance of the * bookmarkable page that was mounted using hybrid strategy - this, however, should only be used * in cases where the page expects no page parameters because they are no longer available. * * @param pageMapName * page map name this page is mounted in * @param pageClass * class of mounted page * @param trailingSlashesCount * count of trailing slsahes in the url * @param redirect * whether or not a redirect should be issued * @return request target used to handle this situation */ protected IRequestTarget handleExpiredPage(final String pageMapName, final Class<? extends Page> pageClass, final int trailingSlashesCount, final boolean redirect) { throw new PageExpiredException( "Request cannot be processed. The target page does not exist anymore."); }
private void checkExpiration(PageProvider provider, PageInfo pageInfo) { if (provider.wasExpired() && !getRecreateMountedPagesAfterExpiry()) { throw new PageExpiredException(String.format("Bookmarkable page with id '%d' has expired.", pageInfo.getPageId())); } }
private void checkExpiration(PageProvider provider, PageInfo pageInfo) { if (provider.wasExpired() && !getRecreateMountedPagesAfterExpiry()) { throw new PageExpiredException(String.format("Bookmarkable page with id '%d' has expired.", pageInfo.getPageId())); } }
throw new PageExpiredException("Expired");
@Override public IRequestablePage getPageInstance() throws PageExpiredException { IRequestablePage page = getProvision().getPage(); if (page == null && wasExpired()) { throw new PageExpiredException("Page with id '" + pageId + "' has expired."); } return page; }
@Override public IRequestablePage getPageInstance() throws PageExpiredException { IRequestablePage page = getProvision().getPage(); if (page == null && wasExpired()) { throw new PageExpiredException("Page with id '" + pageId + "' has expired."); } return page; }
/** * Get the given container's descendent by markup id. * * @param container * container to find descendent of * @param id * markup id * @return component * @throws PageExpiredException * if no descendent has the given markup id */ public static Component getComponent(MarkupContainer container, String id) { if (id.equals(container.getMarkupId(false))) { return container; } Component component = container .visitChildren(new MarkupIdVisitor(id)); if (component == null) { throw new PageExpiredException("No component with markup id " + id); } return component; } }
throw new PageExpiredException("Encrypted URL is no longer decryptable");
throw new PageExpiredException("Encrypted URL is no longer decryptable");
throw new PageExpiredException( "Parameter behaviorId was not provided: unable to locate listener. Component: " + component.toString()); if (behaviors == null) throw new PageExpiredException("No behaviors attached to component " + component.toString()); throw new PageExpiredException("No behavior listener found with behaviorId " + id + "; Component: " + component.toString());
!application.getPageSettings().getRecreateBookmarkablePagesAfterExpiry()) throw new PageExpiredException(String.format( "Bookmarkable page id '%d' class '%s' has expired.", pageInfo.getPageId(), pageClass.getName()));
/** * Get the drag source of the given request. * * @param request * request on which a drag happened * @return drag source */ final static DragSource read(Page page, Request request) { String path = request.getRequestParameters().getParameterValue("path").toString(); Component component = page.get(path); if (component == null) { throw new PageExpiredException("No drag source found " + path); } int behavior = request.getRequestParameters().getParameterValue("behavior").toInt(); return (DragSource)component.getBehaviorById(behavior); } }
throw new PageExpiredException( "Request cannot be processed. The target page does not exist anymore.");
throw new PageExpiredException("Request cannot be processed"); throw new PageExpiredException( "Cannot find the rendered page in session [pagemap=" + requestParameters.getPageMapName() + ",componentPath=" +
throw new PageExpiredException("Request cannot be processed"); throw new PageExpiredException( "Cannot find the rendered page in session [pagemap=" + requestParameters.getPageMapName() + ",componentPath=" +