You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Scott F. Walter" <sc...@scottwalter.com> on 2005/06/29 22:01:12 UTC
Tapestry 4: Application State Objects
I am trying to setup a Visit and Global object the new Tapestry 4 way
with Application Stae Objects. I can get one or the other to work but
not both together. If I attempt to use 2 Application State Objects I
get the following exception:
Error: Method 'public abstract com.scottwalter.sandbox.tapestry4.Global
com.scottwalter.sandbox.tapestry4.pages.Home.getGlobal()' (declared in
class com.scottwalter.sandbox.tapestry4.pages.Home) has no
implementation in class com.scottwalter.sandbox.tapestry4.pages.Home (or
enhanced subclass $Home_0).
Below are 2 different ways I tried to setup my hivemodule.xml file with
both getting the same error:
1.
<?xml version="1.0"?>
<module id="tapestry4sandbox" version="1.0.0"
package="com.scottwalter.sandbox.tapestry4">
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="visit" scope="session">
<create-instance class="com.scottwalter.sandbox.tapestry4.Visit"/>
</state-object>
</contribution>
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="global" scope="application">
<create-instance class="com.scottwalter.sandbox.tapestry4.Global"/>
</state-object>
</contribution>
</module>
2.
<?xml version="1.0"?>
<module id="tapestry4sandbox" version="1.0.0"
package="com.scottwalter.sandbox.tapestry4">
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="global" scope="application">
<create-instance class="com.scottwalter.sandbox.tapestry4.Global"/>
</state-object>
<state-object name="visit" scope="session">
<create-instance class="com.scottwalter.sandbox.tapestry4.Visit"/>
</state-object>
</contribution>
</module>
Here is a snuppet from my page that I am trying to inject state into:
@InjectState("visit")
public abstract Visit getVisit();
@InjectState("global")
public abstract Global getGlobal();
Do I just have something in my hivemodule.xml file wrong? Like I said
above, I can get one or the other to work but no both
thanks, scott.
--
Scott F. Walter Scott F. Walter
Principal Consultant
Vivare, Inc.
E: scott.walter@vivare.com
E: scott@scottwalter.com
Visit scottwalter.com <http://scottwalter.com> --Point. Click. Explore!
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org