Also, note that the use-cases for <s:validateForm> and the latter example are different in their usage. IMO, <s:validateForm> is much more declarative and simple than the example provided from extval.
Just write a validator and attach it like you would normal to a component in the view, wherever you want to use it. You can also re-use form-validators using this method, instead of using some (in my opinion) strange view-filtering logic in the FormValidator annotation. <s:validateForm> is/was one of the most well recieved feature of Seam Faces, and I think it deserves serious consideration. Can you do form validation other ways? absolutely, but this way is pretty compelling based on the feedback we got. It also ties in very normally with the way in which JSF handles validation and components, which is not something that I can speak about with regard to extval, but I can say that seam faces does this nicely. ~Lincoln On Mon, Dec 17, 2012 at 4:37 PM, Thomas Andraschko < [email protected]> wrote: > Please do not mix both :) > We had the discussion about commons bv constrains. s:validateForm is > completely different compared to bv constraints. > s:validateForm does not fit the project for common bv constraints. > > 2012/12/17 Karl Kildén <[email protected]> > > > Looks really nice I understand finally :-) > > > > In retrospect I don't know why I didn't check the docs myself, probably > > because I read most of the discussion on the phone to begin with. > > > > I then agree with the many suggestions regarding doing it as a parallel > > project. Perhaps that module could have a sub module for CDI users that > > included producers and such. > > > > Best regards / Karl > > > > > > > > > > 2012/12/17 Gerhard Petracek <[email protected]> > > > > > hi karl, > > > > > > it's implemented via a producer - see [1]. > > > but you don't really need cdi for it - see e.g. [2]. > > > > > > regards, > > > gerhard > > > > > > [1] http://s.apache.org/ury > > > [2] > > > > > > > > > http://os890.blogspot.co.at/2010/06/multi-field-form-validation-with-jsr.html > > > > > > > > > > > > 2012/12/17 Thomas Andraschko <[email protected]> > > > > > > > As far as i understand, validateAll just validates all components but > > you > > > > can't use custom logic. > > > > > > > > Checkout the seam docu here: > > > > > > > > > > > > > > http://docs.jboss.org/seam/3/faces/latest/reference/en-US/html/components.html > > > > > > > > 2012/12/17 Karl Kildén <[email protected]> > > > > > > > > > Hrmm still not sure I understand. First off didn't Pete just say it > > was > > > > > just a JSF-validator? It also sounds and reads just like > validateAll > > > from > > > > > omnifaces? > > > > > > > > > > What is lacking that you would like to see solved by CDI? And is > it a > > > > > natural fit for CDI extensions rather then BV / JSF extensions? > > > > > > > > > > Best regards / Karl > > > > > > > > > > > > > > > > > > > > 2012/12/17 Thomas Andraschko <[email protected]> > > > > > > > > > > > Hi, > > > > > > > > > > > > they are nice but i can't see a replacement for s:validateForm. > > > > > > IMO s:validateForm is really a simple solution for cross-field > > > > > validation, > > > > > > which is CDI based. > > > > > > > > > > > > Regards, > > > > > > THomas > > > > > > > > > > > > 2012/12/17 Karl Kildén <[email protected]> > > > > > > > > > > > > > Well these are the validators from omnifaces as per my previous > > > > > > > recommendation: > > > > > > > > > > > > > > > > > > > > > - RequiredCheckboxValidator< > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/RequiredCheckboxValidator.xhtml > > > > > > > > > > > > > > > - validateAll< > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/validateAll.xhtml > > > > > > > > > > > > > > > - validateAllOrNone< > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/validateAllOrNone.xhtml > > > > > > > > > > > > > > > - validateEqual< > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/validateEqual.xhtml > > > > > > > > > > > > > > > - validateOne< > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/validateOne.xhtml > > > > > > > > > > > > > > > - validateOneOrMore< > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/validateOneOrMore.xhtml > > > > > > > > > > > > > > > - validateOneOrNone< > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/validateOneOrNone.xhtml > > > > > > > > > > > > > > > - validateOrder< > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/validateOrder.xhtml > > > > > > > > > > > > > > > - validateUnique > > > > > > > > > > > > > > > > > > > > > < > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://showcase-omnifaces.rhcloud.com/showcase/validators/validateUnique.xhtml > > > > > > > >Best > > > > > > > regards / Karl > > > > > > > > > > > > > > > > > > > > > > > > > > > > 2012/12/17 Thomas Andraschko <[email protected]> > > > > > > > > > > > > > > > PrimeFaces doesn't have such a component/utility. > > > > > > > > Also AFAICS it's based on CDI, so IMO DeltaSpike is a good > > place > > > > for > > > > > > it. > > > > > > > > > > > > > > > > 2012/12/17 Jason Porter <[email protected]> > > > > > > > > > > > > > > > > > On Mon, Dec 17, 2012 at 4:54 AM, Pete Muir < > [email protected] > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 17 Dec 2012, at 08:55, Gerhard Petracek wrote: > > > > > > > > > > > > > > > > > > > > > hi karl, > > > > > > > > > > > > > > > > > > > > > > #1 apache myfaces (extval) doesn't implement jsr 303 > > (e.g. > > > > > apache > > > > > > > > > > > bval implements it) > > > > > > > > > > > #2 there is no agreement that ds is only backend > oriented > > > > > > > > > > > > > > > > > > > > > > regards, > > > > > > > > > > > gerhard > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 2012/12/17 Karl Kildén <[email protected]> > > > > > > > > > > > > > > > > > > > > > >> Hi Thomas, fellow user here. > > > > > > > > > > >> > > > > > > > > > > >> BV is as you may know specified in JSR-303. It has > great > > > > > > > > > > implementations by > > > > > > > > > > >> myfaces and hibernate that you can find easily. Thus > > this > > > > will > > > > > > not > > > > > > > > be > > > > > > > > > > >> implemented in deltaspike afaik. However providing > some > > > > common > > > > > > > > > > constraints > > > > > > > > > > >> beyond the specification sounds like a good idea. Note > > > that > > > > in > > > > > > the > > > > > > > > > mean > > > > > > > > > > >> while @Email is almost trivial to implement yourself > if > > > you > > > > > > search > > > > > > > > it > > > > > > > > > a > > > > > > > > > > >> little. JSR-303 is highly extensible just like CDI. > The > > > > > > > > implementation > > > > > > > > > > you > > > > > > > > > > >> choose might have it as an extra already. > > > > > > > > > > >> > > > > > > > > > > >> For frontend extras I can't say I see an obvious home > in > > > > > > > deltaspike > > > > > > > > > > >> (someone correct me if I am wrong about this). But I > > think > > > > for > > > > > > now > > > > > > > > > > >> Deltaspike is more backend oriented. I recommend > having > > a > > > > look > > > > > > at > > > > > > > > > > omnifaces > > > > > > > > > > >> that already provide several great custom > jsf-validators > > > and > > > > > has > > > > > > > an > > > > > > > > > open > > > > > > > > > > >> request for users to ask for additional ones. > > > > > > > > > > >> > > > > > > > > > > >> best regards / Karl > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> 2012/12/16 Thomas Andraschko < > > [email protected] > > > > > > > > > > > > > > >> > > > > > > > > > > >>> Hi, > > > > > > > > > > >>> > > > > > > > > > > >>> is there a roadmap available for all upcoming > features? > > > > > > > > > > >>> > > > > > > > > > > >>> Will there also be a BV module in the future? Will it > > > also > > > > > > > include > > > > > > > > > some > > > > > > > > > > >>> commons constraints like Email? > > > > > > > > > > > > > > > > > > > > Hmm, I think this could be a good thing for a parallel > > > project > > > > to > > > > > > > > > > DeltaSpike actually - a library of BV constraints not > > branded > > > > by > > > > > a > > > > > > > > > specific > > > > > > > > > > impl. I've cc'd Emmanuel, spec lead for BV, to see if he > > has > > > > any > > > > > > > plans > > > > > > > > > for > > > > > > > > > > such a thing. > > > > > > > > > > > > > > > > > > > > >>> > > > > > > > > > > >>> What about the Seam s:validateForm? IMO it's a simple > > way > > > > for > > > > > > > cross > > > > > > > > > > field > > > > > > > > > > >>> validation. Will this be added in future releases? > > > > > > > > > > > > > > > > > > > > This is not actually a BV validator, but a JSF > validator. I > > > > know > > > > > > Mark > > > > > > > > is > > > > > > > > > > working on JSF stuff for DeltaSpike atm, perhaps this is > > > > > something > > > > > > > > Jason > > > > > > > > > > could add to that. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Is this something that belongs in DeltaSpike, or should it > be > > > in > > > > a > > > > > > JSF > > > > > > > > > component library? I know RichFaces has something very > > > similar, I > > > > > > > believe > > > > > > > > > PrimeFaces does as well (haven't looked for a while) and I > > have > > > > no > > > > > > idea > > > > > > > > > about other component libraries. > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>> > > > > > > > > > > >>> How can i contribue to DeltaSpike? I could do some > > > smaller > > > > > > tasks > > > > > > > > > > without > > > > > > > > > > >>> problems. > > > > > > > > > > >>> I also implemented constraints like > > > > > EqualsExpression("#{...}"). > > > > > > > > Maybe > > > > > > > > > > >> this > > > > > > > > > > >>> could be useful for other users, too. > > > > > > > > > > > > > > > > > > > > This page should help - > > > > > > > > > > > > > http://deltaspike.staging.apache.org/deltaspike/community.html > > > > > > > > > > > > > > > > > > > > >>> > > > > > > > > > > >>> Best regards, > > > > > > > > > > >>> Thomas > > > > > > > > > > >>> > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > Jason Porter > > > > > > > > > http://lightguard-jp.blogspot.com > > > > > > > > > http://twitter.com/lightguardjp > > > > > > > > > > > > > > > > > > Software Engineer > > > > > > > > > Open Source Advocate > > > > > > > > > > > > > > > > > > PGP key id: 926CCFF5 > > > > > > > > > PGP key available at: keyserver.net, pgp.mit.edu > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- Lincoln Baxter, III http://ocpsoft.org "Simpler is better."
