You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Krutyakov Roman <ma...@rs.com.ua> on 2005/03/09 15:44:06 UTC

Tapestry 3.1 custom message source

Is it possible to create custom processor for "message" prefix in
tapestry 3.1?

-- 
Roman Krutyakov


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


RE: Tapestry 3.1 custom message source

Posted by Nanda Firdausi <en...@spymac.com>.
You can override the service with you own implementation, see this:
http://jakarta.apache.org/hivemind/current/override.html

For componentMessagesSource it will be:
<implementation service-id="ComponentMessagesSource">
   <invoke-factory service-id="hivemind.BuilderFactory" model="singleton" >

      <construct class="yourClass" >
              ........
      </construct>

   </invoke-factory>
</implementation>

Btw, I've updated my tutorial about Tapestry31+Spring with this kind of
overriding... Maybe you interested to check it as an example.

--
Nanda Firdausi

> -----Original Message-----
> From: Krutyakov Roman [mailto:mark@rs.com.ua] 
> Sent: 11 Maret 2005 12:02
> To: tapestry-user@jakarta.apache.org
> Subject: Re: Tapestry 3.1 custom message source
> 
> Is it possible to replace "infrastructure:componentMessagesSource"
> service with my custom implementation of 
> ComponentMessageSource interface without any changes in 
> framework sources?
> I want to inject my message loader for getMessages() method
> 
> В Чтв, 10/03/2005 в 15:17 +0200, Krutyakov Roman пишет:
> > I need to provide localization for all my pages and 
> components and i 
> > need to store localization data in separate folders for 
> each language.
> > So i want to create custom loader for texts and access them as 
> > standart tapestry "message" binding.
> > In tapestry 3.0 i did implement such loader (by overriding 
> > getMessages() method), but cant understand how to do this for 3.1
> > 
> > 
> > В Срд, 09/03/2005 в 10:16 -0500, Howard Lewis Ship пишет:
> > > Not sure what you mean; you can replace the message: prefix's 
> > > binding factory, but perhaps you'd be better off creating 
> your own 
> > > prefix and binding factory.
> > > 
> > > > Is it possible to create custom processor for "message" 
> prefix in 
> > > > tapestry 3.1?
> > 
> 
> --
> Roman Krutyakov
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 



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


Re: Tapestry 3.1 custom message source

Posted by Krutyakov Roman <ma...@rs.com.ua>.
Is it possible to replace "infrastructure:componentMessagesSource"
service with my custom implementation of ComponentMessageSource
interface without any changes in framework sources?
I want to inject my message loader for getMessages() method

В Чтв, 10/03/2005 в 15:17 +0200, Krutyakov Roman пишет:
> I need to provide localization for all my pages and components and i
> need to store localization data in separate folders for each language.
> So i want to create custom loader for texts and access them as standart
> tapestry "message" binding.
> In tapestry 3.0 i did implement such loader (by overriding getMessages()
> method), but cant understand how to do this for 3.1
> 
> 
> В Срд, 09/03/2005 в 10:16 -0500, Howard Lewis Ship пишет:
> > Not sure what you mean; you can replace the message: prefix's binding
> > factory, but perhaps you'd be better off creating your own prefix and
> > binding factory.
> > 
> > > Is it possible to create custom processor for "message" prefix in
> > > tapestry 3.1?
> 

-- 
Roman Krutyakov


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


Re: Tapestry 3.1 custom message source

Posted by Krutyakov Roman <ma...@rs.com.ua>.
I need to provide localization for all my pages and components and i
need to store localization data in separate folders for each language.
So i want to create custom loader for texts and access them as standart
tapestry "message" binding.
In tapestry 3.0 i did implement such loader (by overriding getMessages()
method), but cant understand how to do this for 3.1


В Срд, 09/03/2005 в 10:16 -0500, Howard Lewis Ship пишет:
> Not sure what you mean; you can replace the message: prefix's binding
> factory, but perhaps you'd be better off creating your own prefix and
> binding factory.
> 
> > Is it possible to create custom processor for "message" prefix in
> > tapestry 3.1?

-- 
Roman Krutyakov


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


Re: Tapestry 3.1 custom message source

Posted by Howard Lewis Ship <hl...@gmail.com>.
Not sure what you mean; you can replace the message: prefix's binding
factory, but perhaps you'd be better off creating your own prefix and
binding factory.


On Wed, 09 Mar 2005 16:44:06 +0200, Krutyakov Roman <ma...@rs.com.ua> wrote:
> Is it possible to create custom processor for "message" prefix in
> tapestry 3.1?
> 
> --
> Roman Krutyakov
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

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

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