I think there is a problem of concept here , you can inject as many
global object as you want, there is no such thing as a global object.
for example:
> <contribution configuration-id="tapestry.state.ApplicationObjects">
> <state-object name="globalObject" scope="application">
> <create-instance class="my.package.User"/>
> </state-object>
> </contribution>
but you still have to define your own User class
public class User {
....
}
> <contribution configuration-id="tapestry.state.ApplicationObjects">
> <state-object name="globalObject" scope="application">
> <create-instance class="my.package.User"/>
> </state-object>
> <state-object name="mySessionDomethingElse" scope="session">
> <create-instance class="my.package.SomethingElse"/>
> </state-object>
> </contribution>
public class SomethingElse {
....
}
Notice how I keep adding objects as I need them, and I can change their
scope to be application (global) or session (httpSession)
I hope this helps, I'm not quite sure if you're confused on how to use
the configuration point tapestry.state.ApplicationObjects or you have
some other problem injecting state objects.
best regards.
Raul Raja.
Rudolf Baloun wrote:
Hi,
i try to inject the Global object into my Page, but my injected Object
is null.
I added this in my hivemodule.xml:
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="globalObject" scope="application">
<create-instance class="my.package.Global"/>
</state-object>
</contribution>
and this in my Page:
@InjectState("globalObject")
public abstract Global getGlobalObject();
I guess, this should work. When i use "getGlobalObject()" in my Page,
the Object is null.
Whats wrong?!
(I use Tapestry 4.0 final. With the method "getGlobal()" from the Page
it works, but the method is deprecated, so i want to
inject the Global object)
Best regards
Rudolf B.
---------------------------------------------------------------------
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]