You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Mazhar, Osman (Home Office)" <ma...@lls.org> on 2006/01/12 18:08:15 UTC

injecting state object in custom engine service

I am trying to inject/set a state object, defined in the same xml file, into
a custom engine service as follows:

 

<set-object property="myObject" value="state-object:myObject"/>

 

And I get the following error:

 

No object provider exists for prefix 'state-object'

 

I have already tried using prefix 'state' and that doesn't work either.

 

Any ideas what prefix to user here?

 

Osman Mazhar

Sr Technical Architect

The Leukemia & Lymphoma Society

1311 Mamaroneck Avenue

White Plains, NY 10605

914-821-8210

 

 

NOTICE: This message, including all attachments transmitted with it, is for
the use of the addressee only. It may contain proprietary, confidential
and/or legally privileged information. No confidentiality or privilege is
waived or lost by any mistransmission. If you are not the intended
recipient, you must not, directly or indirectly, use, disclose, distribute,
print or copy any part of this message. If you believe you have received
this message in error, please delete it and all copies of it from your
system and notify the sender immediately by reply e-mail. Thank you.
REF#38293.51942 


______________________________________________________________________
This e-mail has been scanned by The Leukemia & Lymphoma Society Managed Email Content Service, provided by MCI and Message Labs.

Re: injecting state object in custom engine service

Posted by Kent Tong <ke...@cpttm.org.mo>.
Mazhar, Osman (Home Office <mazharo <at> lls.org> writes:

> 
> I am trying to inject/set a state object, defined in the same xml file, into
> a custom engine service as follows:
> 
> <set-object property="myObject" value="state-object:myObject"/>

Try:

<set-object
  property="appStateMgr"
  value="service:tapestry.state.ApplicationStateManager"/>

Then:

class YourCustomEngine ... {
  Object getMyObject() {
    return getAppStateMgr().get("myObject");
  }
}

However, by default it's quite difficult to use a hivemind service
as the engine because there is general no particular reason to do 
that.

--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


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