FollowUp: the paging issue was being caused by my formSubmit containing code to search the database - the pager tag causes a form submit. I didn't realize this...
-John On 3/26/06, John Menke <[EMAIL PROTECTED]> wrote: > > Thanks Leonardo i will try to bind my submit to the button click only. > > How do you use the IBasicTableModel? > > -jm > > > On 3/25/06, Leonardo Quijano Vincenzi <[EMAIL PROTECTED]> wrote: > > > > FormSubmit and table source are 2 different things. Form Submit is > > necessary when you click the paging links, to save data on the web > > session while the page is refreshed. If you don't want Tapestry to hit > > your database on a page link click, you should actually move the DB hit > > *out* of the form submit. > > > > Consider using IBasicTableModel to fetch the data from the page, instead > > > > of a session-scoped list. Loading a 5000+ rows table in memory is slow > > *and* a memory hog. And it doesn't scale at all. > > > > But in any case, you should move the DB fetch out of the formSubmit. You > > could use the actual @Submit component "action" parameter to bind the DB > > > > check to the button click only, and not on any form submission. > > > > -- > > Ing. Leonardo Quijano Vincenzi > > DTQ Software > > > > > > John Menke wrote: > > > I recently posted another question but i fear that i was not specific > > > enough. Forgive the apparent repost. > > > > > > I am using Tapestry 4 with the TableView component to implement paging > > in my > > > application > > > > > > I have it configured like this: > > > > > > <component id="table" type="Contrib:TableView"> > > > <binding name="source" value="entries"/> > > > <binding name="pageSize" value="10"/> > > > <binding name="columns" > > > value="literal: primaryTeamName, subTeamName, > > > primaryTeamEventLocation, primaryTeamCaptainName, !join"/> > > > </component> > > > <component id="tableColumns" type="Contrib:TableColumns"/> > > > <component id="tableRows" type="Contrib:TableRows"/> > > > <component id="tableValues" type="Contrib:TableValues"/> > > > <component id="tablePages" type="Contrib:TablePages"/> > > > > > > <property name="entries" persist="session"/> > > > > > > I was expecting the paging to be done through the session but this is > > not > > > working. It goes back to the database every time. > > > > > > I have found some posts describing a TableModel but even when i add > > the > > > binding below to my TableView configuration i cannot get client side > > > caching working. When i hit the pager i see > > > the database being hit in my code > > > > > > <binding name="tableSessionStateManager" > > > value="new > > > > > org.apache.tapestry.contrib.table.model.common.FullTableSessionStateManager > > > ()"/> > > > > > > pseudo code for my page is something like this > > > > > > formSubmit( > > > > > > request data from DB > > > set entries variable with data returned > > > > > > ) > > > > > > i was hoping that the hitting the paging controls in the TableView > > component > > > would not execute the formSubmit in my page. Is this my problem? > > > > > > -jm > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
