Package net.sourceforge.stripes.validation

Examples of net.sourceforge.stripes.validation.SimpleError


            password = "";
        if (passwordRetype == null)
            passwordRetype = "";

        if(password.length() < 5) {
            errors.add("password", new SimpleError("Heslo mus� b�t nejm�n� 5 znak� dlouh�"));
        }
        if(!password.equals(passwordRetype)) {
            errors.add("passwordRetype", new SimpleError("Hesla nesouhlas�"));
        }
    }
View Full Code Here


            u.setRoles(roles);

            try {
                userDao.insertUser(u);
            } catch (DataIntegrityViolationException e) {
                getContext().getValidationErrors().add("username", new SimpleError("Tento u�ivatel ji� existuje."));
                return getContext().getSourcePageResolution();
            }

        } else {
            userDao.updatePassword(id, encodedPassword);
View Full Code Here

    public Resolution delete() {
        try {
            categoryDao.deleteCategory(id);
        } catch (DataIntegrityViolationException e) {
            getContext().getValidationErrors().addGlobalError(new SimpleError("Tuto kategorii nelze smazat, proto�e jsou k n� p�i�azeny pr�ce"));
            return getContext().getSourcePageResolution();
        }
        return new RedirectResolution(this.getClass());
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.validation.SimpleError

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.