You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by jason lea <ja...@kumachan.net.nz> on 2007/05/23 03:01:56 UTC

T5 application wide message catalog

I'm using Tapestry 5.0.4 and have some localized fields getting messages
from message catalog for the page working correctly, but I cannot get an
application wide message catalog to work

In the page Target.html:
          <input type="submit" t:type="Any" value="message:button.next"/>

(have also tried <input type="submit" t:type="Any" value="message:
button.next"/> )

In web.xml:
          <filter>
              <filter-name>app</filter-name>
              <filter-class>org.apache.tapestry.TapestryFilter
</filter-class>
          </filter>

So from what I have read about the global message catalog coming from the
name of the filter, I should put a file here
WEB-INF/app.properties:
          button.next=Next

But this gives me the message on my button:  [[missing key: button.next]]
I have put button.next into Target.properties and it found it.
Target.properties was sitting in the same folder as Target.java.

So have I called it the wrong name or put it in the wrong place?

Thanks for any help,

-- 
Jason Lea

Re: T5 application wide message catalog

Posted by petros <pe...@cypoz.com>.
The application wide catalog works fine now. I was putting the app.properties
file under WEB-INF/classes instead of just WEB-INF.


petros wrote:
> 
> I tried both app.properties and App.properties and it still doesn't work
> for me. I guess I just have to wait for the final T5.0.5 review release :)
> Thanks for the reply
> Petros
> 
> 
> Howard Lewis Ship wrote:
>> 
>> The name exactly matches the filter name ... thus "app.properties" not "
>> App.properties".
>> 
>> On 5/27/07, petros <pe...@cypoz.com> wrote:
>>>
>>>
>>> Do you know if it works for this snapshot
>>> tapestry-core-5.0.5-20070522.184451-1.jar
>>>
>>> It doesn't work for me. The properties in
>>> com/glintech/jumpstart/tapestry/App.properties
>>> are not visible by my tapestry html pages.
>>>
>>> I have the following in my web.xml
>>>     <context-param>
>>>         <param-name>tapestry.app-package</param-name>
>>>         <param-value>com.glintech.jumpstart.tapestry</param-value>
>>>     </context-param>
>>>
>>>     <filter>
>>>         <filter-name>app</filter-name>
>>>         <filter-class>org.apache.tapestry.spring.TapestrySpringFilter
>>> </filter-class>
>>>     </filter>
>>>
>>>     <filter-mapping>
>>>        <filter-name>app</filter-name>
>>>        <url-pattern>/*</url-pattern>
>>>      </filter-mapping>
>>>
>>> Petros
>>>
>>>
>>> SergeEby wrote:
>>> >
>>> > Hi,
>>> >
>>> > I believe this is now available in 5.0.5-SNAPSHOT.
>>> >
>>> > /Serge
>>> >
>>> >
>>> > Jason Lea wrote:
>>> >>
>>> >> I'm using Tapestry 5.0.4 and have some localized fields getting
>>> messages
>>> >> from message catalog for the page working correctly, but I cannot get
>>> an
>>> >> application wide message catalog to work
>>> >>
>>> >> In the page Target.html:
>>> >>           <input type="submit" t:type="Any"
>>> value="message:button.next
>>> "/>
>>> >>
>>> >> (have also tried <input type="submit" t:type="Any" value="message:
>>> >> button.next"/> )
>>> >>
>>> >> In web.xml:
>>> >>           <filter>
>>> >>               <filter-name>app</filter-name>
>>> >>               <filter-class>org.apache.tapestry.TapestryFilter
>>> >> </filter-class>
>>> >>           </filter>
>>> >>
>>> >> So from what I have read about the global message catalog coming from
>>> the
>>> >> name of the filter, I should put a file here
>>> >> WEB-INF/app.properties:
>>> >>           button.next=Next
>>> >>
>>> >> But this gives me the message on my button:  [[missing key:
>>> button.next
>>> ]]
>>> >> I have put button.next into Target.properties and it found it.
>>> >> Target.properties was sitting in the same folder as Target.java.
>>> >>
>>> >> So have I called it the wrong name or put it in the wrong place?
>>> >>
>>> >> Thanks for any help,
>>> >>
>>> >> --
>>> >> Jason Lea
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a10831504
>>> 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
>>>
>>>
>> 
>> 
>> -- 
>> Howard M. Lewis Ship
>> TWD Consulting, Inc.
>> Independent J2EE / Open-Source Java Consultant
>> Creator and PMC Chair, Apache Tapestry
>> Creator, Apache HiveMind
>> 
>> Professional Tapestry training, mentoring, support
>> and project work.  http://howardlewisship.com
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a11205042
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 application wide message catalog

Posted by petros <pe...@cypoz.com>.
I tried both app.properties and App.properties and it still doesn't work for
me. I guess I just have to wait for the final T5.0.5 review release :)
Thanks for the reply
Petros


Howard Lewis Ship wrote:
> 
> The name exactly matches the filter name ... thus "app.properties" not "
> App.properties".
> 
> On 5/27/07, petros <pe...@cypoz.com> wrote:
>>
>>
>> Do you know if it works for this snapshot
>> tapestry-core-5.0.5-20070522.184451-1.jar
>>
>> It doesn't work for me. The properties in
>> com/glintech/jumpstart/tapestry/App.properties
>> are not visible by my tapestry html pages.
>>
>> I have the following in my web.xml
>>     <context-param>
>>         <param-name>tapestry.app-package</param-name>
>>         <param-value>com.glintech.jumpstart.tapestry</param-value>
>>     </context-param>
>>
>>     <filter>
>>         <filter-name>app</filter-name>
>>         <filter-class>org.apache.tapestry.spring.TapestrySpringFilter
>> </filter-class>
>>     </filter>
>>
>>     <filter-mapping>
>>        <filter-name>app</filter-name>
>>        <url-pattern>/*</url-pattern>
>>      </filter-mapping>
>>
>> Petros
>>
>>
>> SergeEby wrote:
>> >
>> > Hi,
>> >
>> > I believe this is now available in 5.0.5-SNAPSHOT.
>> >
>> > /Serge
>> >
>> >
>> > Jason Lea wrote:
>> >>
>> >> I'm using Tapestry 5.0.4 and have some localized fields getting
>> messages
>> >> from message catalog for the page working correctly, but I cannot get
>> an
>> >> application wide message catalog to work
>> >>
>> >> In the page Target.html:
>> >>           <input type="submit" t:type="Any" value="message:button.next
>> "/>
>> >>
>> >> (have also tried <input type="submit" t:type="Any" value="message:
>> >> button.next"/> )
>> >>
>> >> In web.xml:
>> >>           <filter>
>> >>               <filter-name>app</filter-name>
>> >>               <filter-class>org.apache.tapestry.TapestryFilter
>> >> </filter-class>
>> >>           </filter>
>> >>
>> >> So from what I have read about the global message catalog coming from
>> the
>> >> name of the filter, I should put a file here
>> >> WEB-INF/app.properties:
>> >>           button.next=Next
>> >>
>> >> But this gives me the message on my button:  [[missing key:
>> button.next
>> ]]
>> >> I have put button.next into Target.properties and it found it.
>> >> Target.properties was sitting in the same folder as Target.java.
>> >>
>> >> So have I called it the wrong name or put it in the wrong place?
>> >>
>> >> Thanks for any help,
>> >>
>> >> --
>> >> Jason Lea
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a10831504
>> 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
>>
>>
> 
> 
> -- 
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> 

-- 
View this message in context: http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a10886740
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 application wide message catalog

Posted by Howard Lewis Ship <hl...@gmail.com>.
The name exactly matches the filter name ... thus "app.properties" not "
App.properties".

On 5/27/07, petros <pe...@cypoz.com> wrote:
>
>
> Do you know if it works for this snapshot
> tapestry-core-5.0.5-20070522.184451-1.jar
>
> It doesn't work for me. The properties in
> com/glintech/jumpstart/tapestry/App.properties
> are not visible by my tapestry html pages.
>
> I have the following in my web.xml
>     <context-param>
>         <param-name>tapestry.app-package</param-name>
>         <param-value>com.glintech.jumpstart.tapestry</param-value>
>     </context-param>
>
>     <filter>
>         <filter-name>app</filter-name>
>         <filter-class>org.apache.tapestry.spring.TapestrySpringFilter
> </filter-class>
>     </filter>
>
>     <filter-mapping>
>        <filter-name>app</filter-name>
>        <url-pattern>/*</url-pattern>
>      </filter-mapping>
>
> Petros
>
>
> SergeEby wrote:
> >
> > Hi,
> >
> > I believe this is now available in 5.0.5-SNAPSHOT.
> >
> > /Serge
> >
> >
> > Jason Lea wrote:
> >>
> >> I'm using Tapestry 5.0.4 and have some localized fields getting
> messages
> >> from message catalog for the page working correctly, but I cannot get
> an
> >> application wide message catalog to work
> >>
> >> In the page Target.html:
> >>           <input type="submit" t:type="Any" value="message:button.next
> "/>
> >>
> >> (have also tried <input type="submit" t:type="Any" value="message:
> >> button.next"/> )
> >>
> >> In web.xml:
> >>           <filter>
> >>               <filter-name>app</filter-name>
> >>               <filter-class>org.apache.tapestry.TapestryFilter
> >> </filter-class>
> >>           </filter>
> >>
> >> So from what I have read about the global message catalog coming from
> the
> >> name of the filter, I should put a file here
> >> WEB-INF/app.properties:
> >>           button.next=Next
> >>
> >> But this gives me the message on my button:  [[missing key: button.next
> ]]
> >> I have put button.next into Target.properties and it found it.
> >> Target.properties was sitting in the same folder as Target.java.
> >>
> >> So have I called it the wrong name or put it in the wrong place?
> >>
> >> Thanks for any help,
> >>
> >> --
> >> Jason Lea
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a10831504
> 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
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Re: T5 application wide message catalog

Posted by petros <pe...@cypoz.com>.
Do you know if it works for this snapshot
tapestry-core-5.0.5-20070522.184451-1.jar

It doesn't work for me. The properties in
com/glintech/jumpstart/tapestry/App.properties
are not visible by my tapestry html pages. 

I have the following in my web.xml
    <context-param>        
        <param-name>tapestry.app-package</param-name>
        <param-value>com.glintech.jumpstart.tapestry</param-value>
    </context-param>

    <filter>
    	<filter-name>app</filter-name>
        <filter-class>org.apache.tapestry.spring.TapestrySpringFilter
</filter-class>
    </filter>

    <filter-mapping>
       <filter-name>app</filter-name>
       <url-pattern>/*</url-pattern>
     </filter-mapping>

Petros


SergeEby wrote:
> 
> Hi, 
> 
> I believe this is now available in 5.0.5-SNAPSHOT.
> 
> /Serge
> 
> 
> Jason Lea wrote:
>> 
>> I'm using Tapestry 5.0.4 and have some localized fields getting messages
>> from message catalog for the page working correctly, but I cannot get an
>> application wide message catalog to work
>> 
>> In the page Target.html:
>>           <input type="submit" t:type="Any" value="message:button.next"/>
>> 
>> (have also tried <input type="submit" t:type="Any" value="message:
>> button.next"/> )
>> 
>> In web.xml:
>>           <filter>
>>               <filter-name>app</filter-name>
>>               <filter-class>org.apache.tapestry.TapestryFilter
>> </filter-class>
>>           </filter>
>> 
>> So from what I have read about the global message catalog coming from the
>> name of the filter, I should put a file here
>> WEB-INF/app.properties:
>>           button.next=Next
>> 
>> But this gives me the message on my button:  [[missing key: button.next]]
>> I have put button.next into Target.properties and it found it.
>> Target.properties was sitting in the same folder as Target.java.
>> 
>> So have I called it the wrong name or put it in the wrong place?
>> 
>> Thanks for any help,
>> 
>> -- 
>> Jason Lea
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a10831504
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 application wide message catalog

Posted by jason lea <ja...@kumachan.net.nz>.
Oh cool.

In the meantime I have just created a GenericPage.java that my other pages
will extend and put all my global messages into GenericPage.properties as
the message catalog inheritance seems to be working.

On 5/23/07, SergeEby <sd...@hotmail.com> wrote:
>
>
> Hi,
>
> I believe this is now available in 5.0.5-SNAPSHOT.
>
> /Serge
>
>
> Jason Lea wrote:
> >
> > I'm using Tapestry 5.0.4 and have some localized fields getting messages
> > from message catalog for the page working correctly, but I cannot get an
> > application wide message catalog to work
> >
> > In the page Target.html:
> >           <input type="submit" t:type="Any" value="message:button.next
> "/>
> >
> > (have also tried <input type="submit" t:type="Any" value="message:
> > button.next"/> )
> >
> > In web.xml:
> >           <filter>
> >               <filter-name>app</filter-name>
> >               <filter-class>org.apache.tapestry.TapestryFilter
> > </filter-class>
> >           </filter>
> >
> > So from what I have read about the global message catalog coming from
> the
> > name of the filter, I should put a file here
> > WEB-INF/app.properties:
> >           button.next=Next
> >
> > But this gives me the message on my button:  [[missing key: button.next
> ]]
> > I have put button.next into Target.properties and it found it.
> > Target.properties was sitting in the same folder as Target.java.
> >
> > So have I called it the wrong name or put it in the wrong place?
> >
> > Thanks for any help,
> >
> > --
> > Jason Lea
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a10756715
> 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
>
>


-- 
Jason Lea

Re: T5 application wide message catalog

Posted by SergeEby <sd...@hotmail.com>.
Hi, 

I believe this is now available in 5.0.5-SNAPSHOT.

/Serge


Jason Lea wrote:
> 
> I'm using Tapestry 5.0.4 and have some localized fields getting messages
> from message catalog for the page working correctly, but I cannot get an
> application wide message catalog to work
> 
> In the page Target.html:
>           <input type="submit" t:type="Any" value="message:button.next"/>
> 
> (have also tried <input type="submit" t:type="Any" value="message:
> button.next"/> )
> 
> In web.xml:
>           <filter>
>               <filter-name>app</filter-name>
>               <filter-class>org.apache.tapestry.TapestryFilter
> </filter-class>
>           </filter>
> 
> So from what I have read about the global message catalog coming from the
> name of the filter, I should put a file here
> WEB-INF/app.properties:
>           button.next=Next
> 
> But this gives me the message on my button:  [[missing key: button.next]]
> I have put button.next into Target.properties and it found it.
> Target.properties was sitting in the same folder as Target.java.
> 
> So have I called it the wrong name or put it in the wrong place?
> 
> Thanks for any help,
> 
> -- 
> Jason Lea
> 
> 

-- 
View this message in context: http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a10756715
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