You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Adam Zimowski <zi...@gmail.com> on 2008/05/20 17:19:38 UTC

T5: change default location of application wide message catalog

Is there a way to change where Tapestry looks for app.properties ? By
default it looks for it in WEB-INF, but I need it to be at the root of
my package hierarchy. I was looking for some sort of contribution, but
can't find out exact values.

-adam

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


Re: T5: change default location of application wide message catalog

Posted by Christian Gorbach <go...@gmx.at>.
same needs here. there should be a module level message catalog, too.
my webapps are almost empty and only used to bootstrap  multiple t5 
modules..
c)hristian

> Is there a way to change where Tapestry looks for app.properties ? By
> default it looks for it in WEB-INF, but I need it to be at the root of
> my package hierarchy. I was looking for some sort of contribution, but
> can't find out exact values.
>
> -adam
>
> ---------------------------------------------------------------------
> 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: change default location of application wide message catalog

Posted by Adam Zimowski <zi...@gmail.com>.
Thank you Christophe. I added your code exactly as is to my AppModule
and it sure works. I'm very impressed. That's some beautiful code, and
I feel like I'm learning more about how powerful Tapestry is !!

-adam

On Tue, May 20, 2008 at 10:51 AM, Cordenier Christophe
<Ch...@atosorigin.com> wrote:
> Can you try with something like this, Override and alias :
>
>    public static ComponentMessagesSource buildCustomMessagesSource(UpdateListenerHub updateListenerHub,
>
>    @ClasspathProvider
>    AssetFactory contextAssetFactory,
>
>    @Inject
>    @Value("${tapestry.app-name}.properties")
>    String appCatalog) {
>        ComponentMessagesSourceImpl service = new ComponentMessagesSourceImpl(contextAssetFactory.getRootResource(), appCatalog);
>
>        updateListenerHub.addUpdateListener(service);
>
>        return service;
>    }
>
>    public static void contributeAliasOverrides(Configuration<AliasContribution> configuration, @InjectService("CustomMessagesSource")
>    ComponentMessagesSource messagesSource) {
>
>        AliasContribution pfmContribution = AliasContribution.create(ComponentMessagesSource.class, messagesSource);
>
>        configuration.add(pfmContribution);
>
>    }
>
>
>
> -----Message d'origine-----
> De : Adam Zimowski [mailto:zimowski74@gmail.com]
> Envoyé : mardi 20 mai 2008 17:20
> À : Tapestry users
> Objet : T5: change default location of application wide message catalog
>
> Is there a way to change where Tapestry looks for app.properties ? By
> default it looks for it in WEB-INF, but I need it to be at the root of
> my package hierarchy. I was looking for some sort of contribution, but
> can't find out exact values.
>
> -adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
>
>
> ---------------------------------------------------------------------
> 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: change default location of application wide message catalog

Posted by Cordenier Christophe <Ch...@atosorigin.com>.
Can you try with something like this, Override and alias :

    public static ComponentMessagesSource buildCustomMessagesSource(UpdateListenerHub updateListenerHub,

    @ClasspathProvider
    AssetFactory contextAssetFactory,

    @Inject
    @Value("${tapestry.app-name}.properties")
    String appCatalog) {
        ComponentMessagesSourceImpl service = new ComponentMessagesSourceImpl(contextAssetFactory.getRootResource(), appCatalog);

        updateListenerHub.addUpdateListener(service);

        return service;
    }

    public static void contributeAliasOverrides(Configuration<AliasContribution> configuration, @InjectService("CustomMessagesSource")
    ComponentMessagesSource messagesSource) {

        AliasContribution pfmContribution = AliasContribution.create(ComponentMessagesSource.class, messagesSource);

        configuration.add(pfmContribution);

    }



-----Message d'origine-----
De : Adam Zimowski [mailto:zimowski74@gmail.com]
Envoyé : mardi 20 mai 2008 17:20
À : Tapestry users
Objet : T5: change default location of application wide message catalog

Is there a way to change where Tapestry looks for app.properties ? By
default it looks for it in WEB-INF, but I need it to be at the root of
my package hierarchy. I was looking for some sort of contribution, but
can't find out exact values.

-adam

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




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.


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