Announcement Announcement Module
Collapse
No announcement yet.
baseTableModel.refresh() Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • baseTableModel.refresh()

    I have table which shows values from a list of beans. In my case I am replacing a bean in my List of beans. I need to refresh the table to display replaced record, would you consider to add "refresh" method to the BaseTableModel?

    The method would be ...

    public void refresh() {
    fireTableDataChanged();
    }

    Or may be I am wrong, may be there are other methods? Please let me know.
    Thank you.

  • #2
    I use setRows

    regards

    Comment


    • #3
      Yes, but in my case I need to

      setRows(null)

      and

      setRows(rows)

      because just applyint setRows(rows) does not understand the change because list object stays the same.

      Comment


      • #4
        I change BaseTableModel#setRows like this :
        public void setRows(List rows) {
        /*if (this.rows == rows) {
        return;
        }
        if (rows == null) {
        this.rows = new ArrayList();
        } */
        this.rows = rows;
        fireTableDataChanged();
        }

        this is probably for performance, but it isn't good for me

        regards

        Comment

        Working...
        X