You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by mnguyen21 <mi...@wolterskluwer.com> on 2007/10/05 23:41:44 UTC

T5: how to use message catalogs for individual page

Hello,
  I'm trying to follow the form tutorial and am having some trouble with the
message catalog.  The tutorial states to put the CreateAddress.properties
file under
src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties

I have done that and nothing I've entered gets picked up by tapestry.  I've
restarted Jetty numerous times with no success.  I've also tried moving
everything from org into WEB-INF with no success.

Can somebody tell what I am doing wrong?

I'm using 5.0.6-SNAPSHOT and Jetty 5.1.


Thanks,

Michael
-- 
View this message in context: http://www.nabble.com/T5%3A-how-to-use-message-catalogs-for-individual-page-tf4577747.html#a13067861
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: T5: how to use message catalogs for individual page

Posted by jblier <ja...@airwidesolutions.com>.
Finally! RESOLVED!

My solution is:

\myapp\src\main\java\org\example\myapp\pages\Test.java
\myapp\src\main\resources\org\example\myapp\pages\Test.properties
\myapp\src\main\webapp\WEB-INF\Test.html

${message:propertyName} now work for any .properties files.

- Jacques


jblier wrote:
> 
> I need help in order to load specific properties.
> 
> With the couple Text.tml and Test.properties, how do you call the display
> of the proper property in the template file?
> 
> Right now, I'm able to load only the properties stored in app.properties
> using ${message:propertyName}.
> 
> I'm back to 5.0.5, (too many things were not working in 5.0.6-SNAPSHOT).
> 
> So I have:
> 
> \myapp\src\main\java\org\example\myapp\pages\Test.java
> \myapp\src\main\resources\org\example\myapp\pages\Test.html
> \myapp\src\main\resources\org\example\myapp\pages\Test.properties
> 
> and ${message:propertyName} does not work for any Test.properties
> properties.
> 
> I've also tried:
> \myapp\src\main\java\org\example\myapp\pages\Test.java
> \myapp\src\main\webapp\WEB-INF\Test.html
> \myapp\src\main\webapp\WEB-INF\Test.properties
> 
> to no avail.
> 
> and:
> \myapp\src\main\java\org\example\myapp\pages\Test.java
> \myapp\src\main\webapp\WEB-INF\Test.html
> \myapp\src\main\webapp\Test.properties
> 
> to no avail.
> 
> So, for Test.properties, do I use ${message:propertyName}? It looks like
> this is working only with app.properties properties.
> 
> T5 is really giving me headaches.
> 
> Thanks!
> 
> - Jacques
> 
> 
> 
> Nick Westgate wrote:
>> 
>> I should clarify that things are working for me in these folders:
>> \myapp\src\main\java\org\example\myapp\pages\sub\Test.java
>> \myapp\src\main\resources\org\example\myapp\pages\sub\Test.tml
>> \myapp\src\main\resources\org\example\myapp\pages\sub\Test.properties
>> 
>> Global properties should go in:
>> \myapp\src\main\webapp\WEB-INF\app.properties
>> 
>> Note that moving *.tml files to WEB-INF won't work.
>> T5.0.6 expects templates to be as above or in:
>> \myapp\src\main\webapp
>> 
>> Even in that case your properties files should be in:
>> \myapp\src\main\resources\org\example\myapp\pages\...
>> 
>> Cheers,
>> Nick.
>> 
>> 
>> Chris Lewis wrote:
>>> Template file names must be named *.tml, and NOT *.html, as of 
>>> 5.0.6-SNAPSHOT.
>>> 
>>> mnguyen21 wrote:
>>>> 1 ) I want to change the labels of the fields of the form.
>>>> 2) I am using Eclipse and launching using the Jetty Launcher
>>>> 3) no exceptions or errors
>>>>
>>>> -- btw, I can't seem to do a project checkout using the commands in the
>>>> tutorial for 5.0.6-SNAPSHOT.  It complains about missing Start.html.  I
>>>> noticed that a bug fix for this was checked into SVN.  Will this be 
>>>> added to
>>>> the snapshot?
>>>>
>>>> Thanks,
>>>> Michael
>>>>
>>>>
>>>> Nick Westgate wrote:
>>>>  
>>>>> I verified today that this works.
>>>>>
>>>>> How are you using the properties?
>>>>> Are you launching from Eclipse or maven?
>>>>> Do you get any console errors or exceptions?
>>>>>
>>>>> Cheers,
>>>>> Nick.
>>>>>
>>>>>
>>>>> mnguyen21 wrote:
>>>>>    
>>>>>> Hello,
>>>>>>   I'm trying to follow the form tutorial and am having some trouble 
>>>>>> with
>>>>>> the
>>>>>> message catalog.  The tutorial states to put the 
>>>>>> CreateAddress.properties
>>>>>> file under
>>>>>> src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties 
>>>>>>
>>>>>>
>>>>>> I have done that and nothing I've entered gets picked up by 
>>>>>> tapestry. I've
>>>>>> restarted Jetty numerous times with no success.  I've also tried
>>>>>> moving
>>>>>> everything from org into WEB-INF with no success.
>>>>>>
>>>>>> Can somebody tell what I am doing wrong?
>>>>>>
>>>>>> I'm using 5.0.6-SNAPSHOT and Jetty 5.1.
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Michael
>>>>>>       
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>>     
>>>>
>>>>   
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-how-to-use-message-catalogs-for-individual-page-tf4577747.html#a13121835
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: how to use message catalogs for individual page

Posted by jblier <ja...@airwidesolutions.com>.
I need help in order to load specific properties.

With the couple Text.tml and Test.properties, how do you call the display of
the proper property in the template file?

Right now, I'm able to load only the properties stored in app.properties
using ${message:propertyName}.

I'm back to 5.0.5, (too many things were not working in 5.0.6-SNAPSHOT).

So I have:

\myapp\src\main\java\org\example\myapp\pages\Test.java
\myapp\src\main\resources\org\example\myapp\pages\Test.html
\myapp\src\main\resources\org\example\myapp\pages\Test.properties

and ${message:propertyName} does not work for any Test.properties
properties.

I've also tried:
\myapp\src\main\java\org\example\myapp\pages\Test.java
\myapp\src\main\webapp\WEB-INF\Test.html
\myapp\src\main\webapp\WEB-INF\Test.properties

to no avail.

and:
\myapp\src\main\java\org\example\myapp\pages\Test.java
\myapp\src\main\webapp\WEB-INF\Test.html
\myapp\src\main\webapp\Test.properties

to no avail.

So, for Test.properties, do I use ${message:propertyName}? It looks like
this is working only with app.properties properties.

T5 is really giving me headaches.

Thanks!

- Jacques



Nick Westgate wrote:
> 
> I should clarify that things are working for me in these folders:
> \myapp\src\main\java\org\example\myapp\pages\sub\Test.java
> \myapp\src\main\resources\org\example\myapp\pages\sub\Test.tml
> \myapp\src\main\resources\org\example\myapp\pages\sub\Test.properties
> 
> Global properties should go in:
> \myapp\src\main\webapp\WEB-INF\app.properties
> 
> Note that moving *.tml files to WEB-INF won't work.
> T5.0.6 expects templates to be as above or in:
> \myapp\src\main\webapp
> 
> Even in that case your properties files should be in:
> \myapp\src\main\resources\org\example\myapp\pages\...
> 
> Cheers,
> Nick.
> 
> 
> Chris Lewis wrote:
>> Template file names must be named *.tml, and NOT *.html, as of 
>> 5.0.6-SNAPSHOT.
>> 
>> mnguyen21 wrote:
>>> 1 ) I want to change the labels of the fields of the form.
>>> 2) I am using Eclipse and launching using the Jetty Launcher
>>> 3) no exceptions or errors
>>>
>>> -- btw, I can't seem to do a project checkout using the commands in the
>>> tutorial for 5.0.6-SNAPSHOT.  It complains about missing Start.html.  I
>>> noticed that a bug fix for this was checked into SVN.  Will this be 
>>> added to
>>> the snapshot?
>>>
>>> Thanks,
>>> Michael
>>>
>>>
>>> Nick Westgate wrote:
>>>  
>>>> I verified today that this works.
>>>>
>>>> How are you using the properties?
>>>> Are you launching from Eclipse or maven?
>>>> Do you get any console errors or exceptions?
>>>>
>>>> Cheers,
>>>> Nick.
>>>>
>>>>
>>>> mnguyen21 wrote:
>>>>    
>>>>> Hello,
>>>>>   I'm trying to follow the form tutorial and am having some trouble 
>>>>> with
>>>>> the
>>>>> message catalog.  The tutorial states to put the 
>>>>> CreateAddress.properties
>>>>> file under
>>>>> src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties 
>>>>>
>>>>>
>>>>> I have done that and nothing I've entered gets picked up by 
>>>>> tapestry. I've
>>>>> restarted Jetty numerous times with no success.  I've also tried
>>>>> moving
>>>>> everything from org into WEB-INF with no success.
>>>>>
>>>>> Can somebody tell what I am doing wrong?
>>>>>
>>>>> I'm using 5.0.6-SNAPSHOT and Jetty 5.1.
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Michael
>>>>>       
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>
>>>   
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-how-to-use-message-catalogs-for-individual-page-tf4577747.html#a13121168
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: how to use message catalogs for individual page

Posted by Nick Westgate <ni...@key-planning.co.jp>.
I should clarify that things are working for me in these folders:
\myapp\src\main\java\org\example\myapp\pages\sub\Test.java
\myapp\src\main\resources\org\example\myapp\pages\sub\Test.tml
\myapp\src\main\resources\org\example\myapp\pages\sub\Test.properties

Global properties should go in:
\myapp\src\main\webapp\WEB-INF\app.properties

Note that moving *.tml files to WEB-INF won't work.
T5.0.6 expects templates to be as above or in:
\myapp\src\main\webapp

Even in that case your properties files should be in:
\myapp\src\main\resources\org\example\myapp\pages\...

Cheers,
Nick.


Chris Lewis wrote:
> Template file names must be named *.tml, and NOT *.html, as of 
> 5.0.6-SNAPSHOT.
> 
> mnguyen21 wrote:
>> 1 ) I want to change the labels of the fields of the form.
>> 2) I am using Eclipse and launching using the Jetty Launcher
>> 3) no exceptions or errors
>>
>> -- btw, I can't seem to do a project checkout using the commands in the
>> tutorial for 5.0.6-SNAPSHOT.  It complains about missing Start.html.  I
>> noticed that a bug fix for this was checked into SVN.  Will this be 
>> added to
>> the snapshot?
>>
>> Thanks,
>> Michael
>>
>>
>> Nick Westgate wrote:
>>  
>>> I verified today that this works.
>>>
>>> How are you using the properties?
>>> Are you launching from Eclipse or maven?
>>> Do you get any console errors or exceptions?
>>>
>>> Cheers,
>>> Nick.
>>>
>>>
>>> mnguyen21 wrote:
>>>    
>>>> Hello,
>>>>   I'm trying to follow the form tutorial and am having some trouble 
>>>> with
>>>> the
>>>> message catalog.  The tutorial states to put the 
>>>> CreateAddress.properties
>>>> file under
>>>> src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties 
>>>>
>>>>
>>>> I have done that and nothing I've entered gets picked up by 
>>>> tapestry. I've
>>>> restarted Jetty numerous times with no success.  I've also tried moving
>>>> everything from org into WEB-INF with no success.
>>>>
>>>> Can somebody tell what I am doing wrong?
>>>>
>>>> I'm using 5.0.6-SNAPSHOT and Jetty 5.1.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Michael
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: how to use message catalogs for individual page

Posted by mnguyen21 <mi...@wolterskluwer.com>.
That's not my problem.
When I do a checkout
'mvn archetype:create .....'

the process fails and complains about not being able to find Start.html.  I
haven't started writing any code at that point.  Here's the command I use:

mvn archetype:create \
    -DarchetypeGroupId=org.apache.tapestry \
    -DarchetypeArtifactId=quickstart \
    -DarchetypeVersion=5.0.6-SNAPSHOT \
    -DgroupId=org.apache.tapestry \
    -DartifactId=tutorial1 \
   
-DremoteRepositories=http://tapestry.formos.com/maven-snapshot-repository \
    -DpackageName=org.apache.tapestry.tutorial



I've attached a copy of the log file I created of the output of this
command.




What I've done in the meantime is
1) check out 5.0.5
2) modify the pom.xml to reflect that I want to use the 5.0.6 
--> modified the release from 5.0.5 to 5.0.6-SNAPSHOT
---> modified log4j version from 1.2.9 to 1.2.14
3) run mvn clean install

This seems to have put me on 5.0.6 as it picks up tml files.  And the
properties files seem to work with the exception that enum labels don't seem
to be working as described in the tutorial.  I have the following lines that
do not get picked up by the application
MR=MR.
MRS=Mrs.
MS=Ms.
MISS=Miss

Other message labels are picked up, just not the Honorific enum values.


Thanks for any help you can provide.
--Michael



Chris Lewis-5 wrote:
> 
> Template file names must be named *.tml, and NOT *.html, as of 
> 5.0.6-SNAPSHOT.
> 
> mnguyen21 wrote:
>> 1 ) I want to change the labels of the fields of the form.
>> 2) I am using Eclipse and launching using the Jetty Launcher
>> 3) no exceptions or errors
>>
>> -- btw, I can't seem to do a project checkout using the commands in the
>> tutorial for 5.0.6-SNAPSHOT.  It complains about missing Start.html.  I
>> noticed that a bug fix for this was checked into SVN.  Will this be added
>> to
>> the snapshot?
>>
>> Thanks,
>> Michael
>>
>>
>> Nick Westgate wrote:
>>   
>>> I verified today that this works.
>>>
>>> How are you using the properties?
>>> Are you launching from Eclipse or maven?
>>> Do you get any console errors or exceptions?
>>>
>>> Cheers,
>>> Nick.
>>>
>>>
>>> mnguyen21 wrote:
>>>     
>>>> Hello,
>>>>   I'm trying to follow the form tutorial and am having some trouble
>>>> with
>>>> the
>>>> message catalog.  The tutorial states to put the
>>>> CreateAddress.properties
>>>> file under
>>>> src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties
>>>>
>>>> I have done that and nothing I've entered gets picked up by tapestry. 
>>>> I've
>>>> restarted Jetty numerous times with no success.  I've also tried moving
>>>> everything from org into WEB-INF with no success.
>>>>
>>>> Can somebody tell what I am doing wrong?
>>>>
>>>> I'm using 5.0.6-SNAPSHOT and Jetty 5.1.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Michael
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> 
http://www.nabble.com/file/p13075575/mvn-20071006.log mvn-20071006.log 
-- 
View this message in context: http://www.nabble.com/T5%3A-how-to-use-message-catalogs-for-individual-page-tf4577747.html#a13075575
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: how to use message catalogs for individual page

Posted by Chris Lewis <ch...@bellsouth.net>.
Template file names must be named *.tml, and NOT *.html, as of 
5.0.6-SNAPSHOT.

mnguyen21 wrote:
> 1 ) I want to change the labels of the fields of the form.
> 2) I am using Eclipse and launching using the Jetty Launcher
> 3) no exceptions or errors
>
> -- btw, I can't seem to do a project checkout using the commands in the
> tutorial for 5.0.6-SNAPSHOT.  It complains about missing Start.html.  I
> noticed that a bug fix for this was checked into SVN.  Will this be added to
> the snapshot?
>
> Thanks,
> Michael
>
>
> Nick Westgate wrote:
>   
>> I verified today that this works.
>>
>> How are you using the properties?
>> Are you launching from Eclipse or maven?
>> Do you get any console errors or exceptions?
>>
>> Cheers,
>> Nick.
>>
>>
>> mnguyen21 wrote:
>>     
>>> Hello,
>>>   I'm trying to follow the form tutorial and am having some trouble with
>>> the
>>> message catalog.  The tutorial states to put the CreateAddress.properties
>>> file under
>>> src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties
>>>
>>> I have done that and nothing I've entered gets picked up by tapestry. 
>>> I've
>>> restarted Jetty numerous times with no success.  I've also tried moving
>>> everything from org into WEB-INF with no success.
>>>
>>> Can somebody tell what I am doing wrong?
>>>
>>> I'm using 5.0.6-SNAPSHOT and Jetty 5.1.
>>>
>>>
>>> Thanks,
>>>
>>> Michael
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>     
>
>   


Re: T5: how to use message catalogs for individual page

Posted by mnguyen21 <mi...@wolterskluwer.com>.
1 ) I want to change the labels of the fields of the form.
2) I am using Eclipse and launching using the Jetty Launcher
3) no exceptions or errors

-- btw, I can't seem to do a project checkout using the commands in the
tutorial for 5.0.6-SNAPSHOT.  It complains about missing Start.html.  I
noticed that a bug fix for this was checked into SVN.  Will this be added to
the snapshot?

Thanks,
Michael


Nick Westgate wrote:
> 
> I verified today that this works.
> 
> How are you using the properties?
> Are you launching from Eclipse or maven?
> Do you get any console errors or exceptions?
> 
> Cheers,
> Nick.
> 
> 
> mnguyen21 wrote:
>> Hello,
>>   I'm trying to follow the form tutorial and am having some trouble with
>> the
>> message catalog.  The tutorial states to put the CreateAddress.properties
>> file under
>> src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties
>> 
>> I have done that and nothing I've entered gets picked up by tapestry. 
>> I've
>> restarted Jetty numerous times with no success.  I've also tried moving
>> everything from org into WEB-INF with no success.
>> 
>> Can somebody tell what I am doing wrong?
>> 
>> I'm using 5.0.6-SNAPSHOT and Jetty 5.1.
>> 
>> 
>> Thanks,
>> 
>> Michael
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-how-to-use-message-catalogs-for-individual-page-tf4577747.html#a13072091
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: how to use message catalogs for individual page

Posted by Nick Westgate <ni...@key-planning.co.jp>.
I verified today that this works.

How are you using the properties?
Are you launching from Eclipse or maven?
Do you get any console errors or exceptions?

Cheers,
Nick.


mnguyen21 wrote:
> Hello,
>   I'm trying to follow the form tutorial and am having some trouble with the
> message catalog.  The tutorial states to put the CreateAddress.properties
> file under
> src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties
> 
> I have done that and nothing I've entered gets picked up by tapestry.  I've
> restarted Jetty numerous times with no success.  I've also tried moving
> everything from org into WEB-INF with no success.
> 
> Can somebody tell what I am doing wrong?
> 
> I'm using 5.0.6-SNAPSHOT and Jetty 5.1.
> 
> 
> Thanks,
> 
> Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org