Re: DataObject becomes hollow when passed through a tapestry DirectLink

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Mar 30 2005 - 09:20:02 EST

  • Next message: Craig Turner: "Re: DataObject becomes hollow when passed through a tapestry DirectLink"

    Craig,

    Objects likely become HOLLOW due to serialization/deserialization cycle
    between requests. But is this really a problem? I mean when you call a
    getter on such HOLLOW object, no query should be executed, as object
    snapshot is taken from the cache. And definitely you shouldn't have to
    manually refetch it..

    Are you seeing different behavior?

    Andrus

    > I've run into a strange situation today with the application I'm working
    > on. We're using tapestry 3.0.2 and cayenne-1.1. The problem is that a
    > data object becomes hollow while I'm passing it around, and the
    > workaround I'm having to use to refetch it is very ugly for our system.
    >
    > Here's what happens:
    > 1) The tapestry engine renders a page that displays a series of direct
    > links in a contrib.table (this is a bit like a WOTable but heavier). 2)
    > During the render of that table, I put a DirectLink into each row. Each
    > directlink has a parameter array associated with it, and that parameter
    > array contains an entity.
    > 3) When the user clicks on the link, tapestry calls a method that tries
    > to extract the parameter. The DataObject has become hollow.
    >
    > Strangely, this system worked as I'd expected earlier today. The hollow
    > obstacle came up as I worked on the page. I'm not sure what I changed in
    > the meantime..
    >
    > What are the rules about how dataobjects become hollow, and is there a
    > way of me preventing it from happening?
    >
    > - C



    This archive was generated by hypermail 2.0.0 : Wed Mar 30 2005 - 09:20:04 EST