users@javaserverfaces-spec-public.java.net

[jsr344-experts mirror] [jsr344-experts] Re: [1142-ResourceLibraryContracts] How the property is calculated (was: [971-MultiTemplate])

From: Edward Burns <edward.burns_at_oracle.com>
Date: Mon, 12 Nov 2012 19:26:03 -0800

>>>>> On Mon, 12 Nov 2012 14:37:24 -0500, Leonardo Uribe <lu4242_at_gmail.com> said:

LU> Hi
LU> 2012/11/9 Edward Burns <edward.burns_at_oracle.com>:
>> Hello Volunteers,
>>
>> This email thread will resolve how the value of the
>> resourceLibraryContracts property is calculated. There are two other
>> threads, one that resolves the name of the property for storing the
>> resource library contracts, and when and where the value of that
>> property is set, and another regarding *how* the value of the property
>> is used.
>>
>> CONDITIONALLY_RESOLVED: How are contracts made available to the
>> application.

[...]

LU> Sounds good, maybe we should consider put this under <application> element.
LU> For example, to define the "locale" both the list of supported locales and the
LU> default locale are defined under <locale-config> inside
LU> <application>

Yes, I agree to move it under <application>

LU> I don't know if the contract id has sense beyond simplify
LU> configuration, because outside initialization step, it is not used
LU> anymore.

I'll have to think about that.

>> CONDITIONALLY_RESOLVED: Add new method on ViewDeclarationLanguage:
>>
>> public List<String> calculateResourceLibraryContracts(
>> FacesContext context, String viewId);
>>
>> This method takes the argument viewId and uses the data structure to
>> find the list of contracts that should be applied.
>>
>> Manfred has discovered some important corner cases, but I'll wait til
>> some discussion happens to determine if I need to introduce them here.
>>

LU> Ok, sounds good. I was thinking about only pass FacesContext as
LU> parameter, because
LU> this method is always related to the current viewRoot.

We can't drop the viewId because we have to pass it in. It's not
available to the method in any other way, and we need it to perform the calculation.

Ed

-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage:               | http://ridingthecrest.com/