Global object in Tapestry 4.1

It’s no longer necessary to configure the Global object in the app’s .application file. Instead, the Global object is now managed by Hivemind. So, insert the following to your hivemodule.xml:

<contribution configuration-id="tapestry.state.ApplicationObjects">
  <state-object name="globalObject" scope="application">
    <create-instance class="com.company.project.tapestry.MyGlobalObjectClass"/>
  </state-object>
</contribution>

And then this object can be injected into your page classes with the following:

@InjectState("globalObject")
public abstract MyGlobalObjectClass getGlobal();
comments powered by Disqus