Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[nebula-dev][compositeTable] refresh single row

Hi Dave

I suppose you're right in the middle of your client change and when I see
the weather reports on north america, I guess you have plenty of thing to
do / snow to shovel :-(

I am building a cell-editor 'framework' and I have the need to refresh a
single row (the currently edited one). My need is due to sort of
autocomplete-functionality (ex. you fill in the committers age and the
(model-) 'autocompleter component' fills in the age automatically. In my
usecase the age is  still a suggestion and must still be editable by the
user (which is of course not for my simple example :-)
I implemented all my stuff in a custom EditableRow that triggers a
ICellModifyEvent. The user programmer (that completely handles all model
changes) may then insert the age-value in the model and request the table
to refresh the row that currently shows the model-entry.
For that aim I need a method where the user-programmer may request the
table to refresh a single row. Do you agree with my idea/handling of this
functionality? I you do so I'll - as usual :-) - submit the stuff to
bugzilla.

CompositeTable:
  public void refreshRow(int row) {
    if (contentPane != null) {
      contentPane.refreshRow(row);
    }
  }

InternalCompositeTable:
  public void refreshRow(int row) {
    if (!isRowVisible(row)) {
      return;
    }
    fireRefreshEvent(topRow + currentRow,
getRowByNumber(row).getRowControl());
	}


I may commit-back the whole cellEditor stuff when it's ready, if you think
it would be of any use for the table users.

Regards
André
-- 
André Dietisheim
Stv-Bereichsleiter Products

Puzzle ITC GmbH
Eigerplatz 4
CH-3007 Bern
Telefon +41 31 370 22 00
Mobile  +41 76 423 03 02
Fax     +41 31 370 22 01

Puzzle ist Mitglied der ODF Alliance:
<http://www.puzzle.ch/odfalliance/>




Back to the top