You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by lello <rb...@gmail.com> on 2010/12/09 12:21:44 UTC

tabelDataChanged

Hi All,

gain on the list for a problem. I have a tableView with a tableDataChanged()
listener.
I thought that the listener should be called after editing a row, but this
doesn't happen.
I guess there is somethign wrong probaby in my code...which is as simple as:

		tableView.getTableViewListeners().add(new TableViewListener.Adapter() {
				@Override
				public void tableDataChanged(TableView tv, List<?> previousData) {
					System.out.println("data changed");
				}
			});
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/tabelDataChanged-tp2056728p2056728.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: tabelDataChanged

Posted by lello <rb...@gmail.com>.
I just realized that the behaviour I need is obtained with rowUpdated().
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/tabelDataChanged-tp2056728p2057454.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: tabelDataChanged

Posted by Chris Bartlett <cb...@gmail.com>.
The TableViewListener#tableDataChanged(TableView, List<?>) method relates to
the TableView#setTableData(List<?>) so is only called when a new model is
set against the TableView.

Perhaps you want org.apache.pivot.wtk.TableViewRowListener or even
org.apache.pivot.collections.ListListener?

TableView tableView = ...;

TableViewRowListener myTableViewRowListener = ...;
tableView.getTableViewRowListeners().add(myTableViewRowListener);

ListListener myListListener = ...;
tableView.getTableData().getListListeners().add(myListListener);


Chris

On 9 December 2010 18:21, lello <rb...@gmail.com> wrote:

>
> Hi All,
>
> gain on the list for a problem. I have a tableView with a
> tableDataChanged()
> listener.
> I thought that the listener should be called after editing a row, but this
> doesn't happen.
> I guess there is somethign wrong probaby in my code...which is as simple
> as:
>
>                tableView.getTableViewListeners().add(new
> TableViewListener.Adapter() {
>                                @Override
>                                public void tableDataChanged(TableView tv,
> List<?> previousData) {
>                                        System.out.println("data changed");
>                                }
>                        });
> --
> View this message in context:
> http://apache-pivot-users.399431.n3.nabble.com/tabelDataChanged-tp2056728p2056728.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>