I derived my code from the examples found here:

http://weblogs.java.net/blog/johnreynolds/archive/2004/10/learn_by_teachi_1.html

I didn't do the model initialization the same way he did, but it should give you a good idea on how to use a custom ITableColumnModel and IBasicTableModel.


----- Original Message ----- From: "Andreas Bulling" <[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Friday, March 03, 2006 3:48 AM
Subject: Re: contrib:Table : advices requested


Hi Daniel,

would you mind to provide some example code for your ITableColumnModel/
IBasicTableModel? Thanks a lot if this is possible!

Sincerly,
 Andreas


On 02. Feb 2006 - 10:59:16, Daniel Lydiard wrote:
| They way I got mine to work (I think my thread was the one you were
| referring too) was initialize the table in pageAttached() and used @Persist
| for the source/column getters.
|
| So something like:
| @Persist
| public abstract ITableColumnModel getColumns()
| public abstract void setColumns(ITableColumnModel foo)
|
| @Persist
| public abstract IBasicTableModel getTableModel()
| public abstract void setTableModel(IBasicTableModel bar)
|
| Then in pageAttached (that's what I did) {
|  setColumns(new Foo());
|  setTableModel(new Bar());
| }
|
| You could also initialize in some method like "activatePage" or whatever
| and have a Link listener called the method to initialize the data.
|
| I dunno if this is the proper way of doing things (I fairly new to
| Tapestry), but it works for me with caching/no-caching modes.

---------------------------------------------------------------------
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]

Reply via email to