Hi,
Could you please let me know where it would be appropriate (page lifecycle
method) to call reset() on the Tablemodel ?
Thanks,
Arun
|---------+---------------------------->
| | Mind Bridge |
| | <[EMAIL PROTECTED]|
| | hoo.com> |
| | |
| | 04/13/2005 04:06 |
| | AM |
| | Please respond to|
| | "Tapestry users" |
| | |
| | |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------------|
|
|
| To: Tapestry users <[email protected]>
|
| cc:
|
| Subject: Re: contrib:Table and ITableModel reload problem
|
|
|
>--------------------------------------------------------------------------------------------------------------------------|
Hi,
> How to reset the data again in the model as getTableModel() is not invoked and
> picked from the session.
Please call the reset() method of the Table component -- it will clean
up everything.
One more thing: the 'source' and 'columns' parameters allow you to use
Table much more easily, although in some cases the TableModel approach
gives you more flexibility.
[EMAIL PROTECTED] wrote:
>Hi,
>
>I use table component and ITableModel from contrib library to display the
values
>fetched from DB.
>
>.page
><component id="mytable" type="contrib:table">
> <binding name="tablemodel" value="tableModel"/>
></component>
>
>List.java
>tableModel not declared as an instance variable.
>
>public ITableModel getTableModel(){
> data = Get values from DB...
> columns = Tablecolumn[]
> ITableModel model = new ITableModel(data, columns);
> return model;
>}
>
>On accessing the page for the first time by a PageLink , getTableModel() is
>invoked and the values are displayed.Performing a search updates the
>tableModel.Again on clicking the pagelink the last searched value appears and
is
>not reset to listing all the values.
>How to reset the data again in the model as getTableModel() is not invoked and
>picked from the session.
>Tried the NullSessionStateManager but had trouble in maintaining the page
state.
>
>Can anyone suggest how to solve the problem with the ITableModel as the data
>source with some examples.
>
> Thanks,
>Arun
>
>---------------------------------------------------------------------
>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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]