No problem, glad I could help. 2010/2/8 Michal Kováč <[email protected]>: > Weird how I looked at API and I missed it. Thank you very much, plain, > simple, helpful. > > On Sun, Feb 7, 2010 at 11:24 PM, Richard Hauswald > <[email protected]> wrote: >> >> @ValidationMethod(when=ValidationState.ALWAYS) >> >> 2010/2/7 Michal Kováč <[email protected]>: >> > Just to make it clear, @ValidateNestedProperties is bound to >> > private Customer customer; >> > >> > 2010/2/7 Michal Kováč <[email protected]> >> >> >> >> Thank you, this helped. I'm using LocalizableError("emailError", >> >> customer.getEmail()); and it works, but I also validate form with >> >> >> >> @ValidateNestedProperties(value = { >> >> @Validate(on = {"register", "saveChanges"}, field = >> >> "firstName", >> >> required = true), >> >> @Validate(on = {"register", "saveChanges"}, field = "surname", >> >> required = true), >> >> }) >> >> >> >> The way it works now is when firstName and surname are missing and >> >> email >> >> won't validate, I only get error messages for firstName and surname and >> >> only >> >> when I those are filled and the error is only in email, then I get the >> >> error >> >> message for email. Is it possible to get them all printed at the same >> >> time? >> >> >> >> On Sun, Feb 7, 2010 at 9:18 PM, Richard Hauswald >> >> <[email protected]> wrote: >> >>> >> >>> @ValidationMethod(on = {"register", "saveChanges"}) >> >>> public void validateEmail(ValidationErrors errors) { >> >>> if(isNoVAlidStuffSubmitted) >> >>> errors.addGlobalError(new SimpleError("Das geht so ni >> >>> hier!")); >> >>> } >> >>> >> >>> 2010/2/7 Michal Kováč <[email protected]>: >> >>> > Hey, I'm trying to make a validation method for one project. >> >>> > >> >>> > @ValidationMethod(on = {"register", "saveChanges"}) >> >>> > public boolean validateEmail() { >> >>> > .... >> >>> > return result; >> >>> > } >> >>> > >> >>> > I want this method to be called before event register() is called >> >>> > and I >> >>> > want >> >>> > it to prevent register() from running if the result is false and >> >>> > show >> >>> > error >> >>> > message. >> >>> > >> >>> > Problem is, even though the method returns false, register is >> >>> > called. >> >>> > How to >> >>> > solve this? >> >>> > >> >>> > >> >>> > >> >>> > ------------------------------------------------------------------------------ >> >>> > The Planet: dedicated and managed hosting, cloud storage, colocation >> >>> > Stay online with enterprise data centers and the best network in the >> >>> > business >> >>> > Choose flexible plans and management services without long-term >> >>> > contracts >> >>> > Personal 24x7 support from experience hosting pros just a phone call >> >>> > away. >> >>> > http://p.sf.net/sfu/theplanet-com >> >>> > _______________________________________________ >> >>> > Stripes-users mailing list >> >>> > [email protected] >> >>> > https://lists.sourceforge.net/lists/listinfo/stripes-users >> >>> > >> >>> > >> >>> >> >>> >> >>> >> >>> -- >> >>> Richard Hauswald >> >>> Blog: http://tnfstacc.blogspot.com/ >> >>> LinkedIn: http://www.linkedin.com/in/richardhauswald >> >>> Xing: http://www.xing.com/profile/Richard_Hauswald >> >>> >> >>> >> >>> >> >>> ------------------------------------------------------------------------------ >> >>> The Planet: dedicated and managed hosting, cloud storage, colocation >> >>> Stay online with enterprise data centers and the best network in the >> >>> business >> >>> Choose flexible plans and management services without long-term >> >>> contracts >> >>> Personal 24x7 support from experience hosting pros just a phone call >> >>> away. >> >>> http://p.sf.net/sfu/theplanet-com >> >>> _______________________________________________ >> >>> Stripes-users mailing list >> >>> [email protected] >> >>> https://lists.sourceforge.net/lists/listinfo/stripes-users >> >> >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > The Planet: dedicated and managed hosting, cloud storage, colocation >> > Stay online with enterprise data centers and the best network in the >> > business >> > Choose flexible plans and management services without long-term >> > contracts >> > Personal 24x7 support from experience hosting pros just a phone call >> > away. >> > http://p.sf.net/sfu/theplanet-com >> > _______________________________________________ >> > Stripes-users mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/stripes-users >> > >> > >> >> >> >> -- >> Richard Hauswald >> Blog: http://tnfstacc.blogspot.com/ >> LinkedIn: http://www.linkedin.com/in/richardhauswald >> Xing: http://www.xing.com/profile/Richard_Hauswald >> >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the >> business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> Stripes-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/stripes-users > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > >
-- Richard Hauswald Blog: http://tnfstacc.blogspot.com/ LinkedIn: http://www.linkedin.com/in/richardhauswald Xing: http://www.xing.com/profile/Richard_Hauswald ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
