When you delete the row, you would also update the dataTable's backing
list.   It won't matter what the scope of the list is.

On 4/20/07, Ritchie Francis <[EMAIL PROTECTED]> wrote:
What scope is the bean that populates the table?
If the bean is session or application scoped then once you've populated
the table that's it until a new session is created or you stop/start the
server.

In this instance I've declared mytable as request scoped, so when the
page is re-drawn the values method which goes to the database is called
as the bean is loaded.

This obviously results in more db traffic but at least the start of the
table is consistent with the underlying database.

Here may be other solutions but this works for me.

  <tr:table    emptyText="#{bundle['mytable_empty.message']}"

                                     value="#{mytable.values}" var="row"
                                     rows="#{mytable.totalRows}"
                                     binding="#{mytable.table1}"




                        >

-----Original Message-----
From: Edmond B. Mulemangabo [mailto:[EMAIL PROTECTED]
Sent: 20 April 2007 15:21
To: [email protected]
Subject: how do I refresh a table component after selecting and deleting
one or more rows ?

I'm using trinidad-1.1.6-SNAPSHOT. I've got a table component (eg
"<tr:table>"). As I select and delete one or more rows, looking at my
database, the delete operation is actually carried out successfully but
the page isn't being refreshed accordingly: the deleted rows remain
displayed.
Is there a way to delete rows, keep displaying the same page but just
refresh it, removing any deleted rows ?

Thanks.

--
Edmond/

Reply via email to