You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nathan Kopp <na...@kopp.com> on 2005/05/30 21:06:24 UTC

contrib:Table questions

Specifically, I'm looking for information about how to use contrib:Table in
a STATELESS way.

1) I used the "*" prefix in my "columns" setting so that the table would
submit the containing form (including a hidden form field), allowing my page
to reload the table's underlying data.  HOWEVER, the links for next and
previous pages are still DirectLink components instead of LinkSubmit
components, so they don't work.  How do I fix this?

I also think that eventually I'll have to use my own tableModel instead of
source/columns (so that I can use better-performing paging and sorting with
the underlying Hibernate query).  How would I do the equivalent of the "*"
prefix when using tableModel?

2) The table still seems to be stateful.... are there any tutorials about
how to use contrib:Table in a stateless way?

Thanks!

-Nathan


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


Re: contrib:Table questions

Posted by Mind Bridge <mi...@yahoo.com>.
Hi Nathan,

On can override the tableSessionStoreManager parameter of Table in order 
to specify where to store the table session (i.e. the selected page and 
current sorting).

The problem is that in Tapestry 3 it is not easy to store that 
information in the URL. Something could be hacked, but I would not 
recommend it.

In Tapestry 4 it is now possible for properties to be persisted in the 
generated URLs, which would keep your application stateless. The Table 
component will also be updated shortly to support that behaviour by 
default without the need to use the tableSessionStoreManager property.


Nathan Kopp wrote:

>Well... I found answers to most of my questions... but I still have one (see
>below).
>
>Nathan Kopp <nk...@mailshell.com> wrote..
>  
>
>>Specifically, I'm looking for information about how to use contrib:Table
>>    
>>
>in
>  
>
>>a STATELESS way.
>>
>>1) I used the "*" prefix in my "columns" setting so that the table would
>>submit the containing form (including a hidden form field), allowing my
>>    
>>
>page
>  
>
>>to reload the table's underlying data.  HOWEVER, the links for next and
>>previous pages are still DirectLink components instead of LinkSubmit
>>components, so they don't work.  How do I fix this?
>>    
>>
>
>I got this to work simply by using "contrib:FormTable" instead of
>"contrib:Table".
>
>  
>
>>I also think that eventually I'll have to use my own tableModel instead of
>>source/columns (so that I can use better-performing paging and sorting
>>    
>>
>with
>  
>
>>the underlying Hibernate query).  How would I do the equivalent of the "*"
>>prefix when using tableModel?
>>    
>>
>
>I was able to continue using source/columns by creating IBasicTableModel and
>using that as my source.  This means that I don't have to create a full
>ITableModel... I only need to implement the two methods of IBasicTableModel,
>which is plenty good enough for paginating a Hibernate query.  Great job,
>MindBridge, on creating an easy-to-use system.
>
>  
>
>>2) The table still seems to be stateful.... are there any tutorials about
>>how to use contrib:Table in a stateless way?
>>    
>>
>
>Ok... now I have all sorts of hidden fields (I guess I'll eventually create
>a PrimaryKeyConverter to reduce the size of these), but the FormTable
>component STILL seems to put information (like current page) into the
>session.  What am I missing and how do I tell it to stop using the session?
>
>-Nathan
>
>
>---------------------------------------------------------------------
>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


Re: contrib:Table questions

Posted by Nathan Kopp <nk...@mailshell.com>.
Well... I found answers to most of my questions... but I still have one (see
below).

Nathan Kopp <nk...@mailshell.com> wrote..
> Specifically, I'm looking for information about how to use contrib:Table
in
> a STATELESS way.
>
> 1) I used the "*" prefix in my "columns" setting so that the table would
> submit the containing form (including a hidden form field), allowing my
page
> to reload the table's underlying data.  HOWEVER, the links for next and
> previous pages are still DirectLink components instead of LinkSubmit
> components, so they don't work.  How do I fix this?

I got this to work simply by using "contrib:FormTable" instead of
"contrib:Table".

> I also think that eventually I'll have to use my own tableModel instead of
> source/columns (so that I can use better-performing paging and sorting
with
> the underlying Hibernate query).  How would I do the equivalent of the "*"
> prefix when using tableModel?

I was able to continue using source/columns by creating IBasicTableModel and
using that as my source.  This means that I don't have to create a full
ITableModel... I only need to implement the two methods of IBasicTableModel,
which is plenty good enough for paginating a Hibernate query.  Great job,
MindBridge, on creating an easy-to-use system.

> 2) The table still seems to be stateful.... are there any tutorials about
> how to use contrib:Table in a stateless way?

Ok... now I have all sorts of hidden fields (I guess I'll eventually create
a PrimaryKeyConverter to reduce the size of these), but the FormTable
component STILL seems to put information (like current page) into the
session.  What am I missing and how do I tell it to stop using the session?

-Nathan


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