On 1/19/06, Rudolf Baloun <[EMAIL PROTECTED]> 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();
>
>

This should work!  Are other annotations working?  It's possible you
don't have the annotations JAR on the runtime classpath.

I use this all the time, but not with the application scope.  There
may be a bug there, though it's not too likely.

Please check your logs for any runtime warnings.

The next step is to start enabling some debugging output.

> 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]
>
>


--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to