You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by tsvetelin <ts...@rushmore-digital.com> on 2003/08/26 17:24:09 UTC

RE: ITableModel refresh in the Page

Hi Mindaugas,

There are a few ways to reset the table's model.

1. The first one is to invoke the table's method "reset()" before redirect
to the page where is inserted the table. In this case you should obtain your
page and invoke the method "reset" that will redirect the invocation to the
corresponded table component. In this case the table model will be reset
only when  apropriate events occur - like edit/delete/modify data entry and
the table model will be the same when the user walks into table pages.
Here is the reset method from Table component.
      /**
       * Resets the state of the component and forces it to load a new
       * TableModel from the tableModel binding the next time it renders.
      */
      public void reset()
      {
            getTableView().reset();
      }
2. Second way is to use or implement (I don't know are there any
implementation) a implementation of ITableSessionStoreManager (which
determine which data from ITableModel should be stored in session) that
store only the data for table paging(see ITablePagingState) and will skip
the table data. In this case the data objects will be loaded on every
request for page that contains the table.



Tsvetelin.

-----Original Message-----
From: Mindaugas Genutis [mailto:mindaugas@elinara.ktu.lt]
Sent: Tuesday, August 26, 2003 7:03 PM
To: Tapestry users
Subject: ITableModel refresh in the Page



Hello,

I have a Table in the page with data from SQL query. When a new record is
added in another page and the Table page is requested again, it doesn't
display the added record. It seems that the getTableModel() is called only
once and is cached for further requests. Is there a way to tell the page
to request table data each time the page is rendered?

Thanks,

--
Kaunas Regional Distance Education Center
Programmer
Phone: +370 674 05232
WWW: http://distance.ktu.lt


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