You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/07/01 19:00:01 UTC
[jira] Commented: (TAPESTRY-362) Can't seem to have two application state objects, one with a session scope and one with an application scope. I can use one or the other but not both.
[ http://issues.apache.org/jira/browse/TAPESTRY-362?page=comments#action_12314901 ]
Howard M. Lewis Ship commented on TAPESTRY-362:
-----------------------------------------------
You realize that IPage and AbstractPage already define getVisit() and getGlobal() methods of type java.lang.Object.
I wonder if that is the underlying issue.
Could you change these to:
@InjectState("visit")
public abstract Visit getVisitObject();
@InjectState("global")
public abstract Global getGlobalObject();
And see what happens?
> Can't seem to have two application state objects, one with a session scope and one with an application scope. I can use one or the other but not both.
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-362
> URL: http://issues.apache.org/jira/browse/TAPESTRY-362
> Project: Tapestry
> Type: Bug
> Components: Annotations
> Versions: 4.0
> Reporter: Scott Walter
>
> Can't seem to have two application state objects, one with a session scope and one with an application scope. I can use one or the other but not both.
> When I use 2 application state objects, I get this error:
> 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)
> Here is my hivemodule.xml:
> <?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>
> Here is a snippet from my page
> @InjectState("visit")
> public abstract Visit getVisit();
> @InjectState("global")
> public abstract Global getGlobal();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org