Re: Tapestry integration

From: Eric Schneider (eri..entralparksoftware.com)
Date: Tue Oct 25 2005 - 09:32:06 EDT

  • Next message: Mike Kienenberger: "Re: Cayenne not run"

    Hi Robert,

    I probably haven't paid enough attention to the DataSqueezer posts on
    the Cayenne/Tapestry mailing lists. I was under the assumption you
    needed to implement a custom squeezer if you wanted bind a DataObject
    as a DirectLink parameter. Are there other instances where the
    standard Tapestry squeezing implementation with DataObjects jack me up?

    I just haven't come across a problem (with a handful of apps), but
    maybe I'm missing something?

    Thanks,
    Eric

    On Oct 25, 2005, at 10:59 AM, Robert Zeigler wrote:

    > Sorry, I must've missed your e-mail on the tapestry list.
    > Using the squeeze adapter is a matter of implementing the
    > two interfaces it requires. One is ObjectIdStorageProvider.
    > If you never use objects which are in state "NEW" in your pages,
    > then this interface is unimportant and you can have a "dummy"
    > implementation. Otherwise, what this interface is for is to
    > store (in memory) the (temporary) ObjectId object or a data object in
    > state NEW.
    >
    > The other interface is the "DataContextProvider" (single method:
    > getValidDataContext()).
    > The purpose is to provide the squeezer with a "valid" d.c. for the
    > current
    > thread.
    >
    > Once you've implemented the interfaces...
    >
    > If you're using tapestry 3.0.3, you'll have to subclass BaseEngine.
    > In your subclass, override createSqueezeAdapter with something like:
    >
    > ISqueezeAdaptor[] adapters = {
    > new DataObjectAdaptor(new DataContextProviderImp(),
    > new
    > ObjectIdStorageProviderImp())
    > };
    > return new DataSqueezer(getResourceResolver(), adapters);
    >
    >
    > If you're using tapestry 4.0.beta-xxx, then you can skip the
    > subclassing
    > and just define the adapter in your hivemind config file.
    > There are many examples of how to do this posted throughout
    > the userlist archives, and I believe on the tapestry wiki, as well.
    >
    > Robert
    >
    > jaka lustek wrote:
    >
    >
    >> Hi,
    >>
    >> I posted similar question on Tapestry list, but did not get the
    >> answer
    >> so far. Can someone explain the steps to use CayenneDataSqueezer with
    >> Tapestry. I downloaded the squeezer from Tassel. I don't want to go
    >> statefull, is it possible to achieve this with CayenneSqueezer? I
    >> hope I
    >> am not asking silly questions.
    >>
    >> I have a tiny web app, just two pages, the first is collecting
    >> answers
    >> with radio group buttons, and the second is collecting user data. The
    >> model will use some three tables and some relationships. Simple
    >> model,
    >> simple web app, but as I am new to Cayenne Tapestry world I need some
    >> hints. I intend to present this app in my company as a proof of
    >> concept
    >> when will be ready (and this shold happen very soon).
    >>
    >> Thanks,
    >> Borut
    >>
    >> ____________________
    >> http://www.email.si/
    >>
    >>
    >>
    >



    This archive was generated by hypermail 2.0.0 : Tue Oct 25 2005 - 09:32:15 EDT