I got a chance to look in to this a little more. Thiago, from your email,
it sounded like you were saying that there was an automatic hierarchical
reading of properties, but testing indicates that reading the message
catalog within a component only gives access to the component level
properties.

I.e., the following code within a component will only "see" the component
properties:

@Inject
private Messages messages;
...
messages.get(someKey);


I looked in the code for the BeanEditForm, and it's doing this, which makes
perfect sense and works fine:

@Inject

private ComponentResources resources;
...
resources.getContainerMessages().get(someKey);

Just posting this in case someone else comes looking for a solution.



On Fri, Apr 5, 2013 at 1:08 PM, George Ludwig <georgelud...@gmail.com>wrote:

> Thanks!
>
>
> On Fri, Apr 5, 2013 at 12:52 PM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>> On Fri, 05 Apr 2013 16:16:58 -0300, George Ludwig <georgelud...@gmail.com>
>> wrote:
>>
>>  I'm building a custom component, and want to render field labels similar
>>> to how the Tapestry components do, by reading a <fieldname>.<label>
>>> parameter from the page's .properties file.
>>>
>>
>> When in a component, messages will be read from the component .properties
>> file first (if it exists), then the page one, then the global one (usually
>> app.properties).
>>
>>
>>  Is there an easy way to read the properties file from within a component?
>>>
>>
>> @Inject
>> private Messages messages;
>>
>>
>>  I can get ComponentResources, and that will get me the MessageCatalogue,
>>> but that's not the same thing, is it?
>>>
>>
>> It is (at least when the message you're using isn't defined in the
>> component's property file).
>>
>> --
>> Thiago H. de Paula Figueiredo
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: 
>> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

Reply via email to