On 6/1/06, Andreas Bulling <[EMAIL PROTECTED]> wrote:
On 01. Jun 2006 - 17:56:58, Mário Lopes wrote:
| Hi.
|
| I've been following Tapestry in Action to implement a Visit session
| object but I was unable to make it work. Declaring a getVisit(); as
| abstract and then calling it through Visit visit = (Visit) getVisit();
| seems to be deprecated.

Instead of using the deprecated Visit object as described in TiA
you should use an Application State Object (ASO) with "session" scope.
You should find examples in the list archives.

Following your advice, I've created my own class, called Visit
(original isn't it? :-) and added this to hivemind.xml

 <contribution configuration-id="tapestry.state.ApplicationObjects">
   <state-object name="user-visit" scope="session">
     <create-instance class="com.icom.crm_feup.Visit"/>
   </state-object>
 </contribution>

This is the code I've used to try accessing the Visit object:

@InjectState("user-visit")
public abstract Visit getVisit();

But it isn't work. It complains, on runtime, about the annotation
being done before.

Any ideas?

-- Mário


Hope this helps,
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to