Hi Kris,

thx a lot!

   Tina

Kristian Marinkovic wrote:
hi tina,
in your Module Class (AppModule, or WebappnameModule) you can contribute
your own BindingFactory with following method:
public static void contributeBindingSource(
            MappedConfiguration<String, BindingFactory> configuration,
)
    {
        configuration.add("messagedb", new MessagedbBindingFactory(db));
}
When tapestry recognizes your prefix it calls your factory to obtain
a Binding instance. Before you return the binding instance you of have
to lookup the message key in your database. please take a look at the
MessageBindingFactory class... this class does exactly what you need...
except that you have to inject your db source :)
g,
kris
-----Tina Umlandt <[EMAIL PROTECTED]> schrieb: -----

    An: [email protected]
    Von: Tina Umlandt <[EMAIL PROTECTED]>
    Datum: 20.06.2007 04:51PM
    Thema: RE: RE: t5: i18 messages without different locale files

    Hi,

    :-D ... thats what I want to do ..
    But can you tell me how I could do this? Where do I register a new
    BindingFactory for a new keyword?

    Thx,
        Tina



    you could contribute an own BindingFactory for "messagedb:"...

    g
    kris




    Tina Umlandt <[EMAIL PROTECTED]>
    20.06.2007 15:27
    Bitte antworten an
    "Tapestry users" <[email protected]>


    An
    [email protected]
    Kopie

    Thema
    t5: i18 messages without different locale files






    Hi,

    I have the following issue.
    I want to internationalize my application without using the
    localed files.
    The administrator of my application should be
    able to write or change the texts for the template by himself.
    These texts
    are stored in a postgres db.
    Therefore i.e. I want to override the binding mechanism for
    "message" so
    that it uses instead of the default messages my
    own DBMessagesImpl.

    In the tapestry source code I found the line where the "message" is
    connected with the MessageBindingFactory but I see
    no way to interfere this mechanism and change it so that "message" is
    connected with another BindingFactory.

    Have you any suggestions? And thx for your help.

    Regards,
                     Tina

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to