You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Beat Hoermann <ho...@freesurf.ch> on 2006/08/31 12:13:25 UTC

Jared Tapestry i18n component not contained in a library - possible?

Sometimes I would like to pack a Tapestry component into a single jar-file 
without being forced to include it into a library. All my components are i18n 
capable, hence, they have a non-empty component message catalog. Strange 
enough, Tapestry cannot find the message keys as soon as the component is 
outside the library.

Details:

Assume a jwc-component C and pages Pi (i = 1, ..., n). Pack the associated 
files (C.jwc, C.html, C.class, C.properties, Pi.page, Pi.html, Pi.class, 
Pi.properties) into a jar-file. Assume that all these files are contained in 
the "org.orgname.tapestry" directory. Note the *.properties files - they 
contain the localized messages. After this, put the jar-file into the WEB-
INF/lib folder.

Extend the application specification ("app.application") as follows:

<application>
   ...
   <component-type type="C" specification-path="/org/orgname/tapestry/C.jwc" />
   <page name="Pi" specification-path="/org/orgname/tapestry/Pi.jwc" />
</application>

With this configuration Tapestry sees the component and the pages but *not* 
the localized messages (neither the messages contained in the C.properties 
file nor the component messages in the Pi.properties files).

As soon as the component is contained in a library, Tapestry finds the 
messages. 


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