Hi,
I put up a stab at api's, prodded by Arjuna.
http://issues.apache.org/jira/browse/ADFFACES-258
here's the content:
invalidDaysOfWeek: java.util.Set<String>. In the tag the user would
provide a whitespace delimited list of weekdays. The list should consist
of one or more of the following abbreviations: sun, mon, tue, wed, thu,
fri, sat
invalidMonths: java.util.Set<String> In the tag a whitespace delimited
list of months. The list should consist of one or more of the following
abbreviations: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec.
invalidDays - this one is trickier. The obvious thing is to pass in a
giant list of invalid dates. Trouble is, this is a lot of work up front,
you might want to calculate this. For example we provide a
DateListProvider API to return a set of dates in a range. I was thinking
that maybe we should generalize this class so that it has 2 methods.
getDateList() and isDateIncluded, or something like that. I think it's
fine if the client validator doesn't support this one, because I don't
think we want to ship over all possible invalid dates. It's fine if the
client validation is less strict than the server.
Thanks,
Gabrielle
Arjuna Wijeyekoon wrote:
I like the name
DateRestrictionValidator
--arjuna
On 10/26/06, Adam Winer <[EMAIL PROTECTED]> wrote:
+1 to the validator.
Would definitely hope for client-side validation too!
A tricky question from an API standpoint, though: for an inputText,
you'd
just add this validator. But for inputDate, I think it'd be easier for
users if we supported setting the attributes directly on inputDate, and
synthesized the validator for them.
-- Adam
On 10/25/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
>
> I bet!
>
>
> On 10/25/06, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > P.S.: will it be client-side enabled as well?
> >
> > regards,
> >
> > Martin
> >
> > On 10/26/06, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > > Great idea!
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 10/25/06, Gabrielle Crawford <[EMAIL PROTECTED]>
wrote:
> > > > Thanks Matthias. Okay, this is issue 258
> > > > https://issues.apache.org/jira/browse/ADFFACES-258
> > > >
> > > > Thanks,
> > > >
> > > > Gab
> > > >
> > > > Matthias Wessendorf wrote:
> > > >
> > > > > That would be a great improvement to all the inputDate /
calendar
> > > > > (Tomahawk) components.
> > > > >
> > > > > I am also fine w/ the name.
> > > > >
> > > > > Opening an issue in jira does never hurt, when discussing an
> enhancement.
> > > > > :)
> > > > >
> > > > > -M
> > > > >
> > > > >
> > > > > On 10/25/06, Gabrielle Crawford
<[EMAIL PROTECTED]>
> wrote:
> > > > >
> > > > >> Hi,
> > > > >>
> > > > >> I'd like to add a new validator. My proposed name is
> > > > >> DateRestrictionValidator, other suggestions welcome. This
would
> support
> > > > >> attributes like:
> > > > >>
> > > > >> invalidMonths - example: dates in April are invalid
> > > > >> invalidDaysOfWeek - example: Saturdays and Sundays are
invalid
> > > > >> invalidDays - example: 12-25-06 and 1-1-07 are invalid
> > > > >>
> > > > >> The exact api's will be discussed further as the
implemenation
is
> worked
> > > > >> out.
> > > > >>
> > > > >> Does anyone oppose this or can I open an issue?
> > > > >>
> > > > >> Thanks,
> > > > >>
> > > > >> Gabrielle
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>