You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Cherry Development <av...@cherrydev.com> on 2005/08/23 20:44:35 UTC
Injecting a state object into another service?
I'm having trouble figuring out how to get hivemind to jump through the
hoops that I need for this:
I have a service object that I'm creating in Spring, that I need to
inject with a hivemind state object before returning it to tapestry.
So, here are the parts that I can get to work:
1) I can create the state object and contribute it to
tapestry.state.ApplicationObjects
2) I can pull the spring service out of spring with <invoke-factory
service-id="hivemind.lib.SpringLookupFactory">
But how do I set the state object into a property of the spring service?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Injecting a state object into another service?
Posted by Massimo Lusetti <ml...@gmail.com>.
On 8/23/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> The best you could do would be to inject the ApplicationStateManager
> and obtain the state objects from it, as needed.
That's what i've done on a test environment, works well even if it
needs more code.
Ciao
--
Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Injecting a state object into another service?
Posted by Howard Lewis Ship <hl...@gmail.com>.
The injection Tapsestry performs on components is based on bytecode;
what's actually injected is the ApplicationStateManager service, and
Java code is created to access the state object on demand.
HiveMind and Spring don't, to my knowledge, have a comparable idea.
The best you could do would be to inject the ApplicationStateManager
and obtain the state objects from it, as needed.
On 8/23/05, Cherry Development <av...@cherrydev.com> wrote:
> I'm having trouble figuring out how to get hivemind to jump through the
> hoops that I need for this:
>
> I have a service object that I'm creating in Spring, that I need to
> inject with a hivemind state object before returning it to tapestry.
>
> So, here are the parts that I can get to work:
> 1) I can create the state object and contribute it to
> tapestry.state.ApplicationObjects
> 2) I can pull the spring service out of spring with <invoke-factory
> service-id="hivemind.lib.SpringLookupFactory">
>
> But how do I set the state object into a property of the spring service?
>
>
> ---------------------------------------------------------------------
> 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