public void setModelValue(Object obj) {
       
            if (autoInsertCancel) {
                this.autoInsertCancel = false;
            }
            // closing the editor if for some reason it is still active:
            if (this.getCellEditor() != null) {
                this.getCellEditor().stopCellEditing();
            }
            if (obj == null) {
                data = EMPTY_MODEL;
            } else {
                if (!(obj instanceof Collection)) {
                    throw new YException(
                            "Table model must be instance of Collection.");
                } else {
                    this.modelCollection = (Collection) obj;
                    // creating the real table model...
                    this.data = new ArrayList(modelCollection.size());
                    Iterator it = modelCollection.iterator();
                    while (it.hasNext()) {
                        Object rowObj = it.next();
                        if (isRendered(rowObj)) {
                            data.add(rowObj);
                        }
                    }
                }
            }
            tableModel.fireTableDataChanged();
       
    }