[ 
http://issues.apache.org/jira/browse/TAPESTRY-362?page=comments#action_12315077 
] 

Scott Walter commented on TAPESTRY-362:
---------------------------------------

Going forward with Tapestry 4, what is the recommended way of setting up a 
Visitor and Global object is it:

1.  Setting up properties in the .application file (Tapestry 3)

2.  Setting up Application State Objects

If its #2, then the issue I reported above may confuse alot of people, because 
they (like me) might try to create the methods as getVisit() and getGlobal() 
and get confused by the error message

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

Reply via email to