You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Matthias Wessendorf <ma...@apache.org> on 2009/10/20 22:56:31 UTC
JSF 2.0 - resource handling - localePrefix ?
Hi,
I am reading SPEC 2.6.1.3 and I am not sure on the localePrefix...
Imagine I am using a "library" in the $WEB_ROOT/resources
so the USA, the resourceIdentifier would be like:
en_US/mycorp/cool.gif
and for Germany, it would be:
de_DE/mycorp/cool.gif
I wonder why it was done this way ?
For the properties files, they syntax is following this schema:
Messages_en_US.properties
Messages_de_DE.properties
Perhaps I am not really understanding the benefit of the JSF 2.0
resource handling, but
why shouldn't a "library" contain multiple images (etc), like:
/mycorp/cool_de_DE.gif
/mycorp/cool_en_US.gif
-Matthias
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
Re: JSF 2.0 - resource handling - localePrefix ?
Posted by Matthias Wessendorf <ma...@apache.org>.
Hi Udo,
that sounds good. I am pretty sure if the entire process was a little
bit more open,
perhaps this would have been addressed a bit earlier. Oh well
-Matthias
On Wed, Oct 21, 2009 at 12:24 AM, Udo Schnurpfeil <ud...@schnurpfeil.de> wrote:
> By the way,
>
> Tobago uses also a Resource Management since years, and also uses the "good
> old Java style" (with suffix).
> We have good experience with that way, with properties, images, scripts,
> styles, etc.
>
> Regards
>
> Udo
>
> Matthias Wessendorf schrieb:
>>
>> Got a response from Ed Burns:
>>
>> <ed>
>> This is a well documented and understood shortcoming of the Resource
>> Handling system. We will address it in 2.1.
>> </ed>
>>
>> On Tue, Oct 20, 2009 at 2:05 PM, Grant Smith <wo...@gmail.com> wrote:
>>
>>>
>>> I prefer the spec's way. I would hate to have to have the resource
>>> identifier as part of each file in the library.. Imaging naming hundreds
>>> of
>>> .gif files. This way it's just part of the directory name.
>>>
>>> The properties file is just one file per locale, so that's not such a big
>>> deal.
>>>
>>> On Tue, Oct 20, 2009 at 1:56 PM, Matthias Wessendorf <ma...@apache.org>
>>> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> I am reading SPEC 2.6.1.3 and I am not sure on the localePrefix...
>>>>
>>>> Imagine I am using a "library" in the $WEB_ROOT/resources
>>>> so the USA, the resourceIdentifier would be like:
>>>> en_US/mycorp/cool.gif
>>>>
>>>> and for Germany, it would be:
>>>> de_DE/mycorp/cool.gif
>>>>
>>>> I wonder why it was done this way ?
>>>>
>>>> For the properties files, they syntax is following this schema:
>>>>
>>>> Messages_en_US.properties
>>>> Messages_de_DE.properties
>>>>
>>>> Perhaps I am not really understanding the benefit of the JSF 2.0
>>>> resource handling, but
>>>> why shouldn't a "library" contain multiple images (etc), like:
>>>>
>>>> /mycorp/cool_de_DE.gif
>>>> /mycorp/cool_en_US.gif
>>>>
>>>> -Matthias
>>>>
>>>> --
>>>> Matthias Wessendorf
>>>>
>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>> sessions: http://www.slideshare.net/mwessendorf
>>>> twitter: http://twitter.com/mwessendorf
>>>>
>>>
>>> --
>>> Grant Smith
>>>
>>>
>>>
>>
>>
>>
>>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
Re: JSF 2.0 - resource handling - localePrefix ?
Posted by Udo Schnurpfeil <ud...@schnurpfeil.de>.
By the way,
Tobago uses also a Resource Management since years, and also uses the
"good old Java style" (with suffix).
We have good experience with that way, with properties, images, scripts,
styles, etc.
Regards
Udo
Matthias Wessendorf schrieb:
> Got a response from Ed Burns:
>
> <ed>
> This is a well documented and understood shortcoming of the Resource
> Handling system. We will address it in 2.1.
> </ed>
>
> On Tue, Oct 20, 2009 at 2:05 PM, Grant Smith <wo...@gmail.com> wrote:
>
>> I prefer the spec's way. I would hate to have to have the resource
>> identifier as part of each file in the library.. Imaging naming hundreds of
>> .gif files. This way it's just part of the directory name.
>>
>> The properties file is just one file per locale, so that's not such a big
>> deal.
>>
>> On Tue, Oct 20, 2009 at 1:56 PM, Matthias Wessendorf <ma...@apache.org>
>> wrote:
>>
>>> Hi,
>>>
>>> I am reading SPEC 2.6.1.3 and I am not sure on the localePrefix...
>>>
>>> Imagine I am using a "library" in the $WEB_ROOT/resources
>>> so the USA, the resourceIdentifier would be like:
>>> en_US/mycorp/cool.gif
>>>
>>> and for Germany, it would be:
>>> de_DE/mycorp/cool.gif
>>>
>>> I wonder why it was done this way ?
>>>
>>> For the properties files, they syntax is following this schema:
>>>
>>> Messages_en_US.properties
>>> Messages_de_DE.properties
>>>
>>> Perhaps I am not really understanding the benefit of the JSF 2.0
>>> resource handling, but
>>> why shouldn't a "library" contain multiple images (etc), like:
>>>
>>> /mycorp/cool_de_DE.gif
>>> /mycorp/cool_en_US.gif
>>>
>>> -Matthias
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>>
>>
>> --
>> Grant Smith
>>
>>
>>
>
>
>
>
Re: JSF 2.0 - resource handling - localePrefix ?
Posted by Matthias Wessendorf <ma...@apache.org>.
Got a response from Ed Burns:
<ed>
This is a well documented and understood shortcoming of the Resource
Handling system. We will address it in 2.1.
</ed>
On Tue, Oct 20, 2009 at 2:05 PM, Grant Smith <wo...@gmail.com> wrote:
> I prefer the spec's way. I would hate to have to have the resource
> identifier as part of each file in the library.. Imaging naming hundreds of
> .gif files. This way it's just part of the directory name.
>
> The properties file is just one file per locale, so that's not such a big
> deal.
>
> On Tue, Oct 20, 2009 at 1:56 PM, Matthias Wessendorf <ma...@apache.org>
> wrote:
>>
>> Hi,
>>
>> I am reading SPEC 2.6.1.3 and I am not sure on the localePrefix...
>>
>> Imagine I am using a "library" in the $WEB_ROOT/resources
>> so the USA, the resourceIdentifier would be like:
>> en_US/mycorp/cool.gif
>>
>> and for Germany, it would be:
>> de_DE/mycorp/cool.gif
>>
>> I wonder why it was done this way ?
>>
>> For the properties files, they syntax is following this schema:
>>
>> Messages_en_US.properties
>> Messages_de_DE.properties
>>
>> Perhaps I am not really understanding the benefit of the JSF 2.0
>> resource handling, but
>> why shouldn't a "library" contain multiple images (etc), like:
>>
>> /mycorp/cool_de_DE.gif
>> /mycorp/cool_en_US.gif
>>
>> -Matthias
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>
>
>
> --
> Grant Smith
>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
Re: JSF 2.0 - resource handling - localePrefix ?
Posted by Grant Smith <wo...@gmail.com>.
I prefer the spec's way. I would hate to have to have the resource
identifier as part of each file in the library.. Imaging naming hundreds of
.gif files. This way it's just part of the directory name.
The properties file is just one file per locale, so that's not such a big
deal.
On Tue, Oct 20, 2009 at 1:56 PM, Matthias Wessendorf <ma...@apache.org>wrote:
> Hi,
>
> I am reading SPEC 2.6.1.3 and I am not sure on the localePrefix...
>
> Imagine I am using a "library" in the $WEB_ROOT/resources
> so the USA, the resourceIdentifier would be like:
> en_US/mycorp/cool.gif
>
> and for Germany, it would be:
> de_DE/mycorp/cool.gif
>
> I wonder why it was done this way ?
>
> For the properties files, they syntax is following this schema:
>
> Messages_en_US.properties
> Messages_de_DE.properties
>
> Perhaps I am not really understanding the benefit of the JSF 2.0
> resource handling, but
> why shouldn't a "library" contain multiple images (etc), like:
>
> /mycorp/cool_de_DE.gif
> /mycorp/cool_en_US.gif
>
> -Matthias
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
--
Grant Smith
Re: JSF 2.0 - resource handling - localePrefix ?
Posted by Matthias Wessendorf <ma...@apache.org>.
Hi,
do you know if there is already a bug for that ? If not, let me create one.
-Matthias
On Wed, Oct 21, 2009 at 6:09 AM, Martin Marinschek
<mm...@apache.org> wrote:
> Actually, that is a question that I brought up to the EG months ago
> (it might even have been half a year), following a request of Bernd.
> But no discussion ever picked up on this.
>
> I was - like Bernd and you - also concerned about breaking the normal
> rule, plus creating scarce directory trees.
>
> regards,
>
> Martin
>
> On 10/20/09, Matthias Wessendorf <ma...@apache.org> wrote:
>> Hi,
>>
>> I am reading SPEC 2.6.1.3 and I am not sure on the localePrefix...
>>
>> Imagine I am using a "library" in the $WEB_ROOT/resources
>> so the USA, the resourceIdentifier would be like:
>> en_US/mycorp/cool.gif
>>
>> and for Germany, it would be:
>> de_DE/mycorp/cool.gif
>>
>> I wonder why it was done this way ?
>>
>> For the properties files, they syntax is following this schema:
>>
>> Messages_en_US.properties
>> Messages_de_DE.properties
>>
>> Perhaps I am not really understanding the benefit of the JSF 2.0
>> resource handling, but
>> why shouldn't a "library" contain multiple images (etc), like:
>>
>> /mycorp/cool_de_DE.gif
>> /mycorp/cool_en_US.gif
>>
>> -Matthias
>>
>> --
>> 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
Re: JSF 2.0 - resource handling - localePrefix ?
Posted by Martin Marinschek <mm...@apache.org>.
Actually, that is a question that I brought up to the EG months ago
(it might even have been half a year), following a request of Bernd.
But no discussion ever picked up on this.
I was - like Bernd and you - also concerned about breaking the normal
rule, plus creating scarce directory trees.
regards,
Martin
On 10/20/09, Matthias Wessendorf <ma...@apache.org> wrote:
> Hi,
>
> I am reading SPEC 2.6.1.3 and I am not sure on the localePrefix...
>
> Imagine I am using a "library" in the $WEB_ROOT/resources
> so the USA, the resourceIdentifier would be like:
> en_US/mycorp/cool.gif
>
> and for Germany, it would be:
> de_DE/mycorp/cool.gif
>
> I wonder why it was done this way ?
>
> For the properties files, they syntax is following this schema:
>
> Messages_en_US.properties
> Messages_de_DE.properties
>
> Perhaps I am not really understanding the benefit of the JSF 2.0
> resource handling, but
> why shouldn't a "library" contain multiple images (etc), like:
>
> /mycorp/cool_de_DE.gif
> /mycorp/cool_en_US.gif
>
> -Matthias
>
> --
> 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