On Tue, Jul 13, 2010 at 7:49 PM, Bob Schellink <[email protected]> wrote:
> On 14/07/2010 06:32, Beto wrote:
>> I'm following the user guide - 3.4.1. Message Resolution.
>> Putting the HomePage's properties file I receive that exception:
>> [QUOTE]
>> java.util.MissingResourceException: Message "title" not found in
>> bundle "park.web.page.HomePage" for locale "pt_BR"
>
>> HomePage:
>> public HomePage() {
>> getModel().put("title", getMessage("title"));
>> getModel().put("heading", getMessage("heading"));
>>
>> }
>>
>> HomePage.properties:
>
>
> To confirm, is your properties and classes under the same package?
>
> park.web.page.HomePage
> park.web.page.HomePage.properties
>
Yes, they are.[1]
> Make sure the park.web.page.HomePage.properties file is available in your WAR
> as well.
That was the problem, it wasn't!
But I just found the solution. I don't know how it works with ANT but
in MAVEN it just copy resources found in src/main/resources
directory[2]. Files other than *.java aren't copy when they are inline
with their java source file.
Solution:
[QUOTE]
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
[/QUOTE]
After fixing that, I'm getting another exception(the same one) because
I'm mixing local and global [3] properties file in border-template.htm
file. Click is trying to find a global key in the local properties
file:
[QUOTE]
java.util.MissingResourceException: Message "webapp.name" not found in
bundle "park.web.page.HomePage" for locale "pt_BR"
at org.apache.click.util.MessagesMap.get(MessagesMap.java:176)
[/QUOTE]
Any advice here?
Thanks,
Gilberto
[1]
http://code.google.com/p/construtor/source/browse/#svn/trunk/park-jpa/web/src/main/java/park/web/page
[2]
http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html
[3]
http://code.google.com/p/construtor/source/browse/#svn/trunk/park-jpa/web/src/main/resources