myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan-Kees van Andel <jankeesvanan...@gmail.com>
Subject Re: [JSF 2.0] JSR 303 support in MyFaces 2.0
Date Wed, 21 Oct 2009 16:36:39 GMT
I've added those "constants". Can't remember why I made them public. I
assume because they are used by the BeanValidator class.

The reason to make them static final with the static initializer block
was because it made them easy to use and also because it's very
efficient (performance wise).

Maybe they need to be refactored to some other class than UIInput? I
think so, especially since Bean Validation is not the only JSF2
dependency. In the future we'll also have Web Beans and maybe JSR 330?
The amount of "is***Available" checks will definitely increase...

Regards,
Jan-Kees


2009/10/21 Matthias Wessendorf <matzew@apache.org>:
> Nope, I checked the JavaDoc (I am not looking at the code, for a
> couple of reasons),
> and there is nothing like that.
>
> So, maybe there is need for such an helper, as there are already today
> - as a matter
> of practical use - some issues with the current spec.
>
> Let me file an ER for this.
>
> -Matthias
>
> On Wed, Oct 21, 2009 at 6:15 AM, Martin Marinschek
> <mmarinschek@apache.org> wrote:
>> Well, we can definitely not add a public field to the API which is not
>> specified. The question is only if maybe the RI added some public
>> field which was not specified - then this could be a spec bug.
>>
>> regards,
>>
>> Martin
>>
>> On 10/20/09, Matthias Wessendorf <matzew@apache.org> wrote:
>>> I think the question is why there isn't a helper like
>>> BeanValidation.isBeanValidation() specified ?
>>> Implementation could be somewhat similar to what MyFaces
>>> does today. But I wonder why this wasn't done...
>>>
>>> -M
>>>
>>> On Mon, Oct 19, 2009 at 9:14 PM, Matthias Wessendorf <matzew@apache.org>
>>> wrote:
>>>> Hi,
>>>>
>>>> in order to work on Trinidad 2.0 and 303 support (yeah need to check
>>>> what Gerhard did for extVal) I
>>>> took a quick look at the UIInput.
>>>>
>>>> I noticed a few lines containing a call like this:
>>>>
>>>> => BeanValidator.isAvailable
>>>>
>>>> This is a public field which is only there in MyFaces, not in the JSF
>>>> 2.0 API ([1]).
>>>>
>>>> I know that the entire handling of checking if there is a JSR 303
>>>> implementation is
>>>> a little bit ugly, but I am not sure if we should introduce such a
>>>> "public" field to the
>>>> BeanValidator validator class.
>>>>
>>>> => wouldn't be good if extensions would start to rely on this field; I
>>>> guess not there on the RI ;-)
>>>> => does this violate the TCK ? Or would it be ? I am not sure here
>>>> two, as it is a public field
>>>>
>>>> Maybe we should make the make the check become a private thing ?
>>>>
>>>> -Matthias
>>>>
>>>>
>>>> [1] http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/index.html
>>>>
>>>> --
>>>> Matthias Wessendorf
>>>>
>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>> sessions: http://www.slideshare.net/mwessendorf
>>>> twitter: http://twitter.com/mwessendorf
>>>>
>>>
>>>
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>>
>>
>>
>> --
>>
>> http://www.irian.at
>>
>> Your JSF powerhouse -
>> JSF Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Mime
View raw message