You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Erik Hatcher <er...@ehatchersolutions.com> on 2003/11/04 23:08:12 UTC

table component state persistence

I'm doing something similar to the LocaleList in the Workbench, where I 
have a wrapper component around a table component.

The difference is that in LocaleList, the data is known at finishLoad() 
time, whereas in my component the data is dynamic from a .page binding.

My table model extends from SimpleTableModel.  Using all the default 
stuff from that, it displays the table quite nicely the first time.  
But if I submit the form which changes the data, the getTableModel 
method of my component is never called and the 
FullTableSessionStateManager must be taking over and keeping things 
around.

I've tried various incantations of using NullTableSessionStateManager 
and the SimpleTableSessionStateManager with no luck.  Using the Null 
one allows the table to be updated fine, yes.  But sorting, of course, 
does not work (gives an NPE in SimpleTableColumnComponent).  I've tried 
writing my own ITableSessionStateManager implementation but still not 
having any luck.

My next step is to gut how I'm extending SimpleTableModel and do all 
custom ITable* implementations of what I need.

Anyone have any advice on how to make this dynamic thing work properly? 
  It seems simple enough.... a .page has an Object[] bound to 
MyTableWrapper component and has a getTableModel on it, which then 
nests a contrib:Table and binds to the tableModel property.

Help!!!!

Thanks,
	Erik


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


Re: table component state persistence

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Tuesday, November 4, 2003, at 05:37  PM, Mindbridge wrote:
> Hi Erik,
>
> Is this message helpful in any way at all:
>
> http://article.gmane.org/gmane.comp.java.tapestry.user/1658
>
> All you will need to do is implement a data model to load the data when
> requested...

Yes, that is helpful.  I was on my way towards doing my own 
implementations as extending from the SimpleTable* stuff was good to 
see it work but not good enough for our purposes, and I knew it was 
getting in the way.  This message clarified things.  I'll be giving it 
a shot soon and will report back if I have any hurdles.

	Erik


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


Re: table component state persistence

Posted by Mindbridge <mi...@yahoo.com>.
Hi Erik,

Is this message helpful in any way at all:

http://article.gmane.org/gmane.comp.java.tapestry.user/1658

All you will need to do is implement a data model to load the data when
requested...


----- Original Message ----- 
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, November 05, 2003 12:08 AM
Subject: table component state persistence


> I'm doing something similar to the LocaleList in the Workbench, where I
> have a wrapper component around a table component.
>
> The difference is that in LocaleList, the data is known at finishLoad()
> time, whereas in my component the data is dynamic from a .page binding.
>
> My table model extends from SimpleTableModel.  Using all the default
> stuff from that, it displays the table quite nicely the first time.
> But if I submit the form which changes the data, the getTableModel
> method of my component is never called and the
> FullTableSessionStateManager must be taking over and keeping things
> around.
>
> I've tried various incantations of using NullTableSessionStateManager
> and the SimpleTableSessionStateManager with no luck.  Using the Null
> one allows the table to be updated fine, yes.  But sorting, of course,
> does not work (gives an NPE in SimpleTableColumnComponent).  I've tried
> writing my own ITableSessionStateManager implementation but still not
> having any luck.
>
> My next step is to gut how I'm extending SimpleTableModel and do all
> custom ITable* implementations of what I need.
>
> Anyone have any advice on how to make this dynamic thing work properly?
>   It seems simple enough.... a .page has an Object[] bound to
> MyTableWrapper component and has a getTableModel on it, which then
> nests a contrib:Table and binds to the tableModel property.
>
> Help!!!!
>
> Thanks,
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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