RE: Note to Cayenne/Tapestry users ...

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Fri Jan 06 2006 - 10:39:18 EST

  • Next message: Bryan Lewis: "Re: Note to Cayenne/Tapestry users ..."

    Well, it was an iterated form element. Using 'volatile' made it work as
    it had been working and no PKs were harmed in the process. :-)

    Thanks!

    /dev/mrg

    -----Original Message-----
    From: Philip Miller [mailto:philip.mille..bc.co.uk]
    Sent: Friday, January 06, 2006 10:07 AM
    To: cayenne-use..bjectstyle.org
    Subject: RE: Note to Cayenne/Tapestry users ...

    The 'volatile' attribute only applies to iterated form elements, so the
    DataSqueezer implementation is essential for other uses of <For>.

    Unfortunately I can only find documentation for v3.0. If anyone has
    successfully implemented squeezers in Tapestry 4 and can explain to a
    newbie, I'd be delighted to hear.
     

    > -----Original Message-----
    > From: Robert Zeigler [mailto:robert..uregumption.com]
    > Sent: 04 January 2006 21:55
    > To: cayenne-use..bjectstyle.org
    > Subject: Re: Note to Cayenne/Tapestry users ...
    >
    > For, in fact, calls into the data squeezing mechanisms.
    > So, if you've got a data squeezer registerred which handles
    > cayenne data objects, then it'll be used to construct the
    > stored string as well as to "re-inflate" the objects when For rewinds.
    > So, in my CayenneDataObjectSqueezeAdapter implementation, I
    > "serialize"
    > to a pk (with some bits of necessary extra information), and
    > then when unsqueezing, use DataObjectUtils to refetch the object.
    >
    > Robert
    >
    > Gentry, Michael (Contractor) wrote:
    >
    > >I thought the data squeezer just put the object's PK in the
    > hidden area
    > >of the form?
    > >
    > >/dev/mrg
    > >
    > >
    > >-----Original Message-----
    > >From: Robert Zeigler [mailto:robert..uregumption.com]
    > >Sent: Wednesday, January 04, 2006 4:43 PM
    > >To: cayenne-use..bjectstyle.org
    > >Subject: Re: Note to Cayenne/Tapestry users ...
    > >
    > >
    > >That's where the data squeezer comes in handy; it will let
    > For work its
    > >magic (useful for avoiding stale link exceptions, etc.) and
    > still make
    > >sure you have objects which are nicely attached to the data
    > context. :)
    > >I've been using base:For (For, but for tapestry 3.03) for
    > some time now
    > >in conjunction with data squeezers and have no issues.
    > >
    > >Robert
    > >
    > >Michael Gentry (Yes, I'm a Contractor) wrote:
    > >
    > >
    > >
    > >>I've been converting an application which uses Tapestry
    > 3/Cayenne to
    > >>Tapestry 4 (and Cayenne, of course). In the process, I've
    > been trying
    > >>
    > >>
    > >to
    > >
    > >
    > >>get rid of all of the deprecated components (ActionLink,
    > Conditional,
    > >>Foreach, etc).
    > >>
    > >>I replaced one of the Foreach components with the new For component
    > >>and
    > >>
    > >>
    > >it
    > >
    > >
    > >>caused issues for me. I had a persistent List of Cayenne
    > objects and
    > >>Tapestry, with the new For component, would
    > serialize/deserialize them
    > >>(apparently in the HTML), which creates a HOLLOW Cayenne object
    > >>disassociated from it's DataContext. (It also produced some bizarre
    > >>
    > >>
    > >HTML in
    > >
    > >
    > >>the hidden INPUT section -- kept repeating a For_0
    > variable, but with
    > >>different values.) This, of course, caused the code to fail.
    > >>
    > >>After looking through the docs, we added the
    > volatile="true" attribute
    > >>
    > >>
    > >and
    > >
    > >
    > >>it made For work more like the old Foreach and everything was fine
    > >>
    > >>
    > >again.
    > >
    > >
    > >>Just thought I'd share in case other Cayenne/Tapestry users
    > are going
    > >>through a similar conversion.
    > >>
    > >>/dev/mrg
    > >>
    > >>
    > >>
    > >>
    > >
    > >
    > >
    > >
    >
    >
    >

    http://www.bbc.co.uk/

    This e-mail (and any attachments) is confidential and may contain
    personal views which are not the views of the BBC unless specifically
    stated.
    If you have received it in error, please delete it from your system.
    Do not use, copy or disclose the information in any way nor act in
    reliance on it and notify the sender immediately. Please note that the
    BBC monitors e-mails sent or received.
    Further communication will signify your consent to this.



    This archive was generated by hypermail 2.0.0 : Fri Jan 06 2006 - 10:39:21 EST