You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "B.S.Navin" <bs...@effigent.net> on 2006/10/31 07:49:47 UTC

Getting a reference to Hivemind registry

Hi,

I am adding a custom enhancement worker to my application, which  
enhances the PropertySelection to intialize a default model.

As part of this, I needed to get a reference to the  
OGNLBindingFactory service (from HiveMind), so that I can create an  
OGNL binding. The normal approach to this is to use the @Inject  
annotation.

But this code to get the factory and use it, is part of the generated  
code. So, I suppose annotations would not work there.

Hence I was looking at a way to get a reference to the HiveMind  
registry (so that I could programmatically get a reference to the  
factory). Any help guys?

- Navin

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


Re: Getting a reference to Hivemind registry

Posted by Shing Hing Man <ma...@yahoo.com>.
The Hivemind registry is stored in the servlet
context.
(Please see the source code of  init method in
org.apache.tapestry.ApplicationServlet.)

If you need to reference the HiveMind registry outside

a web page, you might need to create your own
'singleton' 
of HiveMind registry.

Shing



--- "B.S.Navin" <bs...@effigent.net> wrote:

> Hi,
> 
> I am adding a custom enhancement worker to my
> application, which  
> enhances the PropertySelection to intialize a
> default model.
> 
> As part of this, I needed to get a reference to the 
> 
> OGNLBindingFactory service (from HiveMind), so that
> I can create an  
> OGNL binding. The normal approach to this is to use
> the @Inject  
> annotation.
> 
> But this code to get the factory and use it, is part
> of the generated  
> code. So, I suppose annotations would not work
> there.
> 
> Hence I was looking at a way to get a reference to
> the HiveMind  
> registry (so that I could programmatically get a
> reference to the  
> factory). Any help guys?
> 
> - Navin
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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