jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: StateHelper for non-components

From: Leonardo Uribe <lu4242_at_gmail.com>
Date: Fri, 16 Sep 2011 12:35:37 -0500

Hi

Just FYI, in myfaces commons there exists these classes implementing
PartialStateHolder:

http://svn.apache.org/repos/asf/myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/java/org/apache/myfaces/commons/converter/ConverterBase.java
http://svn.apache.org/repos/asf/myfaces/commons/branches/jsf_20/myfaces-commons-validators/src/main/java/org/apache/myfaces/commons/validator/ValidatorBase.java

and in tomahawk sandbox:

http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/core20/src/main/java/org/apache/myfaces/custom/behavior/ClientBehaviorBase.java

It is worth to include it on the spec, because usually converter and
validators need special hacks like the previous one to allow
parameters to be evaluated when conversion occur instead when the view
is built.

regards,

Leonardo Uribe

2011/9/16 Andy Schwartz <andy.schwartz_at_oracle.com>:
> On 9/16/11 8:41 AM, Çağatay Çivici wrote:
>>
>> Hi,
>>
>> Can't find sth related in spec issue tracker so posting here.
>
> The spec issue is here:
>
> 959 - Common StateHelper for all JSF StateHolder/PartialStateHolder
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-959
>
>
>>
>> Shouldn't we expose the stateHelper api to non-component artifacts like
>> converters, validators, behaviors ... ?
>
> Yep.  One of the things that has been tremendously useful about Trinidad's
> FacesBean is that it is UIComponent-agnostic (ie. can be used with
> converters, validators, beahviors, listeners, etc...)
>
> BTW, implementing a generate StateHelper solution should also help us solve
> issues like this:
>
> 983 - Enable all standard validator and converter attributes for
> ValueExpressions
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-983
>
> Andy
>
>>
>> Regards,
>>
>> *Çağatay Çivici*
>> Principal Consultant
>> PrimeFaces Lead | JSF EG Member
>>
>> Prime Teknoloji
>> Bilkent Cyberpark, A-303d
>> 06800 Ankara/Turkey
>> Tel: +90 312 265 05 07
>> http://www.prime.com.tr
>>
>
>