Package com.webobjects.directtoweb

Examples of com.webobjects.directtoweb.ErrorPageInterface


        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(entityName, session());
            epi.setNextPage(session().context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
            ErrorPageInterface epf = D2W.factory().errorPage(session());
            epf.setMessage(e.toString());
            epf.setNextPage(session().context().page());
            nextPage = (WOComponent) epf;
        }
        return nextPage;
    }
View Full Code Here


        return (QueryPageInterface) result;
    }

    public WOComponent errorPageForException(Throwable e, WOSession s) {
        myCheckRules();
        ErrorPageInterface epi = D2W.factory().errorPage(s);
        if (epi instanceof ERDErrorPageInterface && e instanceof Exception) {
            ((ERDErrorPageInterface) epi).setException((Exception) e);
        }
        epi.setMessage(ERXUtilities.stackTrace(e));
        epi.setNextPage(s.context().page());
        return (WOComponent) epi;
    }
View Full Code Here

     * @param session - the active session
     * @return the error page
     */
    public WOComponent errorPageWithMessageAndDestination(String message, WOComponent destination, WOSession session) {
        myCheckRules();
        ErrorPageInterface epi = D2W.factory().errorPage(session);
        epi.setMessage(message);
        epi.setNextPage(destination);
        return (WOComponent)epi;
    }
View Full Code Here

        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(entityName, session());
            epi.setNextPage(session().context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
            ErrorPageInterface epf = D2W.factory().errorPage(session());
            epf.setMessage(e.toString());
            epf.setNextPage(session().context().page());
            nextPage = (WOComponent) epf;
        }
        return nextPage;
    }
View Full Code Here

     * @param ex
     */
    public WOActionResults reportException(Exception ex) {
        WOActionResults newPage = null;
        try {
            ErrorPageInterface epf=D2W.factory().errorPage(session());
            if(epf instanceof ERDErrorPageInterface) {
              ((ERDErrorPageInterface)epf).setException(ex);
            }
            epf.setMessage(ex.toString());
            epf.setNextPage(previousPageFromRequest());
            newPage = (WOActionResults)epf;
        } catch (Exception otherException) {
            log.error("Exception while trying to report exception!", otherException);
        }
        return newPage;
View Full Code Here

        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(_manipulatedEntityName, session());
            epi.setNextPage(context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
            ErrorPageInterface epf = D2W.factory().errorPage(session());
            epf.setMessage(e.toString());
            epf.setNextPage(context().page());
            nextPage = (WOComponent) epf;
        }
        return nextPage;
    }
View Full Code Here

        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(_manipulatedEntityName, session());
            epi.setNextPage(context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
            ErrorPageInterface epf = D2W.factory().errorPage(session());
            epf.setMessage(e.toString());
            epf.setNextPage(context().page());
            nextPage = (WOComponent) epf;
        }
        return nextPage;
    }
View Full Code Here

                    ((ERXValidationException) exception).setContext(context);
                }
                log.info("Validation Exception: " + exception + exception.getMessage());
                editingContext.revert();
                String errorMessage = ERXLocalizer.currentLocalizer().localizedTemplateStringForKeyWithObject("CouldNotSave", exception);
                ErrorPageInterface epf = D2W.factory().errorPage(sender.session());
                if (epf instanceof ERDErrorPageInterface) {
                    ((ERDErrorPageInterface) epf).setException(exception);
                }
                epf.setMessage(errorMessage);
                epf.setNextPage(followPage(sender));
                return (WOComponent) epf;
            }
        }
        return followPage(sender);
    }
View Full Code Here

      EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(entityName, session());
      epi.setNextPage(session().context().page());
      nextPage = (WOComponent) epi;
    } catch (IllegalArgumentException e)
    {
      ErrorPageInterface epf = D2W.factory().errorPage(session());
      epf.setMessage(e.toString());
      epf.setNextPage(session().context().page());
      nextPage = (WOComponent) epf;
    }
    return nextPage;
  }
View Full Code Here

        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(entityName, session());
            epi.setNextPage(session().context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
            ErrorPageInterface epf = D2W.factory().errorPage(session());
            epf.setMessage(e.toString());
            epf.setNextPage(session().context().page());
            nextPage = (WOComponent) epf;
        }
        return nextPage;
    }
View Full Code Here

TOP

Related Classes of com.webobjects.directtoweb.ErrorPageInterface

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.