:D reset worked very well. Thanks!!!!!!!! By the way reset method "Resets the state of the component and forces it to load a new TableModel from the tableModel binding the next time it renders". If the new record that just added is at second or 3rd page how to make the table navigate to the page where the new record is in.????
2006/10/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Try the .reset() method on the table. I've got a page with something like this (in the .java): @InjectComponent( "table" ) public abstract Table getTable( ); void resetFields( ) { ... setItemsPerPage( DEFAULT_PAGE_SIZE ); // Reset table, so that on next rendering it begins at page 1 // in this session getTable( ).reset( ); } Tom -----Original Message----- From: Huang Gehua [mailto:[EMAIL PROTECTED] Sent: Monday, October 16, 2006 2:48 PM To: users@tapestry.apache.org Subject: How to change table page index by a form submit event I made a T4 page with a Contrib:Table and a form in it. In the form there is a textbox and a submit button to add record to the table.If i was view the 3rd page of the table and then add a new record . After submitting the new record was added and i was still at the 3rd page of the table.But the newest record is in the first page as the records is order by added time desc. I want after adding a record take the user to the first page of the table.Howto do this???? Thanks a lot!!!!!! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]