RE: Hollow State in Tapestry app

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Tue Dec 14 2004 - 10:12:18 EST

  • Next message: Cris Daniluk: "Accessing last commit status"

    Todd, are you using a DataContext stored in your Visit object? I can
    definitely see problems if it is a new DataContext and you pass the
    serialized DataObject into the application, since DO has a reference to
    it's DC.

    /dev/mrg

    -----Original Message-----
    From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Sent: Monday, December 13, 2004 7:41 PM
    To: cayenne-use..bjectstyle.org
    Subject: Re: Hollow State in Tapestry app

    Todd,

    Lately I've only been an occasional user of Tapestry, but my simple
    Blog example works pretty well
    (http://objectstyle.org/cayenne/examples/index.html - note that this is
    a separate example, not the Artist/Painting one). Look at
    Home.activateExternalPage() method - it is called when an ExternalLink
    is clicked. It is using DataObjectUtils to get the object for ID, but
    the object itself is not refetched. It is in the DataContext and is
    simply retrieved from there. I set a breakpoint to verify that in
    debugger, and sure enough cached Blog object is COMMITTED.

    Not sure how DirectLink parameter (de)serialization works, but using
    ObjectId rather than DataObject as a URL parameter intuitively seems
    cleaner.

    Andrus

    On Dec 12, 2004, at 9:21 AM, Todd O'Bryan wrote:

    > In fact, using the ObjectId as the parameter, rather than the
    > DataObject itself and refetching it manually in the listener method
    > *does* work.
    >
    > I don't know why it doesn't work to store the Object, but this is a
    > very easy workaround if there's no good explanation.
    >
    > Todd
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Dec 14 2004 - 10:12:24 EST