DataTable - Cancel edit doesn't always work

UI Components for JSF
callahan
Posts: 768
Joined: 27 May 2010, 22:52

08 Sep 2010, 09:07

In the 2.2.M1 DataTable, cancel edit doesn't always work.

To reproduce:

- Go here: http://www.primefaces.org/showcase/ui/d ... diting.jsf.
- Put any two rows in edit mode.
- Change the manufacturer in both of these rows to a new value.
- Save one of the rows.
- Cancel the edit to the other row. This doesn't work. The new value for the manufacturer is displayed, not the old value.

When a single row is saved, the data from all rows is posted back to the server and updated in the model. Only the data from the row that is being saved should be updated in the model.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

08 Sep 2010, 14:04

Yes, I'm aware of this issue, data is processed as a whole not row based, something to improve in 2.2.RC1.


cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Sep 2010, 22:40

Cool Harry, thx!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Oct 2010, 12:08

Should be fixed now.

callahan
Posts: 768
Joined: 27 May 2010, 22:52

23 Oct 2010, 12:44

çok güzel (http://translate.google.de/#tr|en|%C3%A7ok%20g%C3%BCzel)

Wow, the modification required to fix this was amazingly tiny! Here is is in all its glory http://code.google.com/p/primefaces/sou ... ail?r=3570

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Oct 2010, 15:21

Yes, thanks to JSF 2, things are much easier to create.

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

25 Oct 2010, 16:22

Thanks for fixing this.

I actually started to like the idea of an edit-all (with save-all / cancel-all). The controls could perhaps be located in the column header or footer as an optional edit-all facet? Maybe a future enhancement?

callahan
Posts: 768
Joined: 27 May 2010, 22:52

26 Oct 2010, 01:06

Hey bumble.bee, you didn't sound too happy about this feature a week or two ago. In actual fact, you were using terrible words to describe it :lol:.

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

26 Oct 2010, 14:18

I showed the customer a preview last week and they said "hey, I like being able to save all rows at once." I said, "yeah, that's a feature that is totally there on purpose"!

Obviously it wasn't fully implemented though because it didn't close all rows open for editing when you saved and you had to click each row indivdually to open it for editing, etc.

Oh well...

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests