Re: Comparable validation design

2005-10-25 Thread Martin Marinschek
@attribute name: is there something like this in the RI 1.2? I think that yes, so maybe we should go with their name for this. @comparable: right, there is the interface name - I didn't think about that. But then the equalsValidator is named by the method it calls - so maybe we should take the

Re: Comparable validation design

2005-10-25 Thread Mike Kienenberger
@attribute name: Couldn't find anything in the 1.2 spec. Looks like it's been postponed to 2.0 for everything but the required attribute, and for the required attribute it's named requiredMessage So I'm recommending that we use message as the attribute. @validator name: compareToValidator

Re: Comparable validation design

2005-10-25 Thread Mike Kienenberger
A few more questions. 1) What should happen if the compared values do not implement Comparable and no Comparable is provided? Right now, it's passively passing validation. I wonder if it should throw a FacesException (not ValidationException) instead? 2) If either the foreign component value

Re: Comparable validation design

2005-10-25 Thread Mike Kienenberger
I've put an initial version of this validator at the following URL (manually constructed since the link isn't active yet -- may have typos). http://cvs.sourceforge.net/viewcvs.py/jsf-comp/componentsandbox/src/java/org/apache/myfaces/custom/comparetovalidator/CompareToValidator.java It'll

Re: Comparable validation design

2005-10-24 Thread Mike Kienenberger
comparingValidator works for me. As Alexander pointed out, I used comparableValidator as a first guess because it works on any objects implementing Comparable. I don't see the need for comparingValidator to depend on the OptionalValidatorFramework, although the supporting boolean wrapping

Re: Comparable validation design

2005-10-22 Thread Martin Marinschek
I agree with Jesse on his preferences. Just a naming thing - shouldn't it be comparingValidator or compareValidator instead of comparableValidator? By the way, are you guys going to move the optional validator framework over as well? regards, Martin On 10/21/05, Jesse Alexander (KBSA 21)

RE: Comparable validation design

2005-10-22 Thread Jesse Alexander \(KBSA 21\)
-Original Message- Just a naming thing - shouldn't it be comparingValidator or compareValidator instead of comparableValidator? -/Original Message- I guess the name is just a first throw... maybe comparable because it accepts any Comparable object... But part of bringing it up here

RE: Comparable validation design

2005-10-21 Thread Jesse Alexander \(KBSA 21\)
-Original Message- 1) greaterThanValidator for=startDateInput/ is what I'm currently doing. 2) comparableValidator for=startDateInput operator=gt/ a) Operator values being eq, ne, lt, gt, ge, and le in addition to (or maybe instead of) b) ==, !=, , , =', and =. -/Original

Re: Comparable validation design

2005-10-21 Thread Mike Kienenberger
t:booleanValidator op=or Ha ha! You're the expert on designing validators that wrap other validators. I'll let you write that one! :-) On 10/21/05, Jesse Alexander (KBSA 21) [EMAIL PROTECTED] wrote: -Original Message- 1) greaterThanValidator for=startDateInput/ is what I'm

RE: Comparable validation design

2005-10-21 Thread Jesse Alexander \(KBSA 21\)
-Original Message- t:booleanValidator op=or Ha ha! You're the expert on designing validators that wrap other validators. I'll let you write that one! :-) -/Original Message- Remember how I first objected to have OVW defined also as Validator... Just a few seconds later a