Yes, Grid does need some TLC, but I think there is a bigger issues with
Tapestry & Ajax in general, as Ajax still feels like redheaded stepchild in 
Tapestry.
In the very least, I think graceful degradation should work out-of-the-box,
as well as redirects to the same page (for example) when there is no valid 
session.

I wrote my @XHR annotation (named it @AJAX, cause nobody understands what @XHR 
means)
and added requireSession argument, if that's true (the default), the event 
method won't even get called
if there is no valid session, and the page gets redirected to self.

As far as the Grid itself, the reason I as well as other people use it 
directly, is because
its hard to replicate its functionality using its member components, and it's 
not documented how to use it.
GridPager has no graceful degradation (perhaps its impossible?) and its very 
hard to catch
all the pager clicks so in case of a null session it gets redirected to a login 
(same page) for me.
I think that should work out of the box at the very leas as well.

Thank for listening to my rambles :)

On Sep 20, 2011, at 10:22 AM, Howard Lewis Ship wrote:

> Valid concerns I think ... Grid needs some TLC and maybe a rethink as
> to how to make it work best in Ajax. It may even be necessary to
> freeze Grid and create a Grid2.
> 
> Unlike BeanEditForm, people don't recognize Grid as scaffolding,
> everyone treats it as infrastructure, so it's time to move it in that
> direction.
> 
> On Tue, Sep 20, 2011 at 12:54 AM, Lenny Primak <[email protected]> wrote:
>> Hi guys,
>> 
>> I just want to share my thoughts with you regarding my experience building 
>> pretty simple infrastructure.
>> Don't get me wrong, I love tapestry but I think there's definitely room for 
>> improvement here.
>> 
>> My goal was simple:  Develop a page that has an Ajax Grid that is backed by 
>> a database table.
>> 
>> To get this into somewhat decent shape it took about one man-month, which I 
>> think could be improved.
>> After a minor hiccup with JPA and problems with multiple database support, I 
>> got the basic page up and
>> running rather quickly. (kudos)
>> Afterwards, I started noticing minor issues that took major time to fix.
>> What I wound up with is a hodgepodge of hacks/workarounds to get everything 
>> just right.
>> Lots of JavaScript and event handling code.
>> I believe that this stuff should work out of the box.
>> 
>> It all boiled down to one major issue:
>> Tapestry does not know how to deal with Ajax and expiring sessions.
>> I would either get an error dialog, an exception, NULL data, or all of the 
>> above when:
>> - clicking on the Grid pager
>> - clicking on a button that would update the grid (Ajax)
>> 
>> Basically there are about 10 corner cases that deal with expired sessions 
>> that
>> were very hard to track down.
>> 
>> All my hacks/workarounds do one thing:  When Ajax call is made,
>> and the session is invalid (or new w/o SetupRender being called)
>> I redirect to the same page, causing a reload or relogin if security 
>> credentials also expired.
>> 
>> I will try to post as much of this as I can as soon as I can on the wiki or 
>> github or both,
>> but I think this functionality should work out-of-the box.
>> 
>> Thanks for the great product, and will be going into production soon.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> 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