You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andy Huhn <am...@insightbb.com> on 2007/10/21 06:43:54 UTC

T5: Grid component with SQL-based paging/sorting

Hello,

I'm a newbie, trying to learn T5.

I have a grid component, but I don't want Tapestry to do the work of
sorting/paging data in the grid component; I'd like to push that off to
the database.  (The source of the data is a database accessed via
Hibernate).  How can I do this?  I know that in T4, I could write a DAO
class that implemented IBasicTableModel, and in that DAO class, I could
put the logic to include the order by/paging in the query.  But I can't
find anything similar to that in T5.  Please help?

Thanks,
Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Grid component with SQL-based paging/sorting

Posted by Andy Huhn <am...@insightbb.com>.
Thank you Howard, that's exactly what I needed!

Andy

On Sat, 2007-10-20 at 23:26 -0700, Howard Lewis Ship wrote:
> It's interface GridDataSource.
> 
> What you may be missing is that Tapestry convieniently coerces
> java.util.List to GridDataSource for you.  However if you connect the source
> parameter of the Grid component to an actual GridDataSource, you can have
> fine control over sorting and otherwise efficiently providing data to the
> Grid.
> 
> On 10/20/07, Andy Huhn <am...@insightbb.com> wrote:
> >
> > Hello,
> >
> > I'm a newbie, trying to learn T5.
> >
> > I have a grid component, but I don't want Tapestry to do the work of
> > sorting/paging data in the grid component; I'd like to push that off to
> > the database.  (The source of the data is a database accessed via
> > Hibernate).  How can I do this?  I know that in T4, I could write a DAO
> > class that implemented IBasicTableModel, and in that DAO class, I could
> > put the logic to include the order by/paging in the query.  But I can't
> > find anything similar to that in T5.  Please help?
> >
> > Thanks,
> > Andy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Grid component with SQL-based paging/sorting

Posted by Howard Lewis Ship <hl...@gmail.com>.
It's interface GridDataSource.

What you may be missing is that Tapestry convieniently coerces
java.util.List to GridDataSource for you.  However if you connect the source
parameter of the Grid component to an actual GridDataSource, you can have
fine control over sorting and otherwise efficiently providing data to the
Grid.

On 10/20/07, Andy Huhn <am...@insightbb.com> wrote:
>
> Hello,
>
> I'm a newbie, trying to learn T5.
>
> I have a grid component, but I don't want Tapestry to do the work of
> sorting/paging data in the grid component; I'd like to push that off to
> the database.  (The source of the data is a database accessed via
> Hibernate).  How can I do this?  I know that in T4, I could write a DAO
> class that implemented IBasicTableModel, and in that DAO class, I could
> put the logic to include the order by/paging in the query.  But I can't
> find anything similar to that in T5.  Please help?
>
> Thanks,
> Andy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind