Package com.webobjects.directtoweb

Examples of com.webobjects.directtoweb.ErrorPageInterface


                }
                try {
                    ec.saveChanges();
                } catch (NSValidation.ValidationException e) {
                    String errorMessage = " Could not save your changes: "+e.getMessage()+" ";
                    ErrorPageInterface epf=D2W.factory().errorPage(sender.session());
                    if(epf instanceof ERDErrorPageInterface) {
                      ((ERDErrorPageInterface)epf).setException(e);
                    }
                    epf.setMessage(errorMessage);
                    epf.setNextPage(nextPage);
                    result=(WOComponent)epf;
                }
            }
            return result;
        }
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

        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(d2wContext().entity().name(), 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

        }
        return user;
    }

    private static WOComponent errorPage(String message, Session session) {
        ErrorPageInterface error = D2W.factory().errorPage(session);
        error.setMessage(message);
        error.setNextPage(WOApplication.application().pageWithName("HomePage", session.context()));
        return (WOComponent) error;
    }
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.