IDEMPIERE-4396 Allow idempiere forms sort by header (#205)

sync model after sort
This commit is contained in:
hengsin 2020-08-05 16:10:51 +08:00 committed by GitHub
parent fc0c7ed81c
commit a3e25375fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1127,6 +1127,9 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
&& (event.getFirstRow() == WTableModelEvent.ALL_ROWS)) && (event.getFirstRow() == WTableModelEvent.ALL_ROWS))
{ {
this.repaint(); this.repaint();
//sync model with listbox
ListModelTable model = this.getModel();
model.updateComponent(0, model.getSize()-1);
} }
else if ((event.getType() == WTableModelEvent.CONTENTS_CHANGED) else if ((event.getType() == WTableModelEvent.CONTENTS_CHANGED)
&& event.getFirstRow() != WTableModelEvent.ALL_ROWS && event.getFirstRow() != WTableModelEvent.ALL_ROWS