qooxdoo / qooxdoo

qooxdoo - Universal JavaScript Framework
http://qooxdoo.org
Other
766 stars 261 forks source link

Filtered table model incompatibility (BZ#790) #994

Closed qx-bug-importer closed 8 years ago

qx-bug-importer commented 16 years ago

Jan Babiak (jan) wrote:

... when you apply filter current datas of model (this._rowArr - row data array) is copied into this._fullArr on line 306 (this._fullArr = this._rowArr.slice();)

... as Filtered table model is extend of Simple, you can still add rows, edit values ... and this is problem, all changes after filter is applied are lost when you reset filters (resetHiddenRows) -> this._fullArr is copied back to this._rowArr ... all changes are lost

possible solutions:

assigned to Dan Hummon (hummon+qooxdoo)

qx-bug-importer commented 16 years ago

Sebastian Werner (@swernerx) wrote:

Fabian, can you have a look at this?

qx-bug-importer commented 16 years ago

Sebastian Werner (@swernerx) wrote:

Check this for 0.8

qx-bug-importer commented 15 years ago

Fabian Jakobs (@fjakobs) wrote:

move open table bugs to 0.8.2

qx-bug-importer commented 15 years ago

Dave Baggett (@ecker) wrote:

This could be addressed by replacing the Filtered model with the Smart model, which offers a superset of the capabilities of Filtered, but without this bug. (See BZ#2474.)

qx-bug-importer commented 14 years ago

Andreas Ecker (@ecker) wrote:

Hi Dan, any chance to look at this (you're the original author of the Filtered model)? Jan, would you be able to provide a patch for the solution you suggested? Also now that Dave has contributed an extended filtered model (the smart table model), we'd need your help, otherwise we doubt we'll be able to fix this issue.

qx-bug-importer commented 14 years ago

Dan Hummon (hummon+qooxdoo) wrote:

I think the problem with trying to get edits from this._rowArr to this._fullArr is that the array rows and columns aren't easily matched up after any records are filtered. As such, finding the data in _fullArr to modify would be difficult in an overridden getter or setter. I think what might work would be a parallel one dimensional array of "original row values" that could map _rowArr row values to _fullArr row values so when edits occur, they happen on both data sets. It would just be a matter of getting the filtered columns to match up properly. I'll have to take a look. If this solution works, it wouldn't be too difficult to implement.

-Dan

qx-bug-importer commented 14 years ago

Dave Baggett (@ecker) wrote:

That's basically what the Smart model does -- it maintains a parallel index for each filtered view that maps from row ID to row position. The trick is to store a unique value for each row that's added to the table, so you can keep the rows straight. Fortunately, you can add arbitrary new properties to JavaScript arrays, so this magic ID can just ride along with the row data.

qx-bug-importer commented 14 years ago

Andreas Ecker (@ecker) wrote:

mass renaming of 0.9 target to 1.0 (for issues with status "NEW")

qx-bug-importer commented 14 years ago

Andreas Ecker (@ecker) wrote:

I'm pushing this to 1.1. As a workaround (or as alternative to the built-in filtered table model) one could use the SmartTableModel of qooxdoo-contrib.

Dan, do you think you'll be able to address this issue any time soon, or do you have any suggestions on handling this one?

qx-bug-importer commented 14 years ago

Martin Wittemann (@wittemann) wrote:

This seems to be 0.7 only --> wontfix

qx-bug-importer commented 10 years ago

Martin Wittemann (@wittemann) wrote:

Closed all bugs already shipped with a release.