2.2M1 - Editable dataTable and incorrect values

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

04 Sep 2010, 12:24

Hi,

When editing data in the new 2.2M1 dataTable, the user may submit values that are not updated in the model for various reasons, such as validation errors or conversion errors.

Currently, clicking the check icon to save an edited row will result in the row switching from edit mode back to read mode, even if submitted values were not updated in the model due to errors. This means that the user will see the old valid values instead of the newly submitted invalid values.

Would it not be better to leave the row in edit mode in such cases, allowing the user to either enter valid values, or cancel the row edit by hitting the close icon?

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

04 Sep 2010, 18:19

What if we do a check like this; If validations on server side failed, we keep the edit mode open, if passed we toggle to read mode.

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

04 Sep 2010, 19:10

Yes, that would be a much better default behavior.


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

25 Oct 2010, 16:16

Thanks for fixing this.

One bit of feedback though: the style associated with a row which has failed validation is not always good. I'm using a test page with just a themeswitcher and a dataTable and trying to see which themes look decent when a validation failure occurs. It looks like the themes with background image / color changes look okay, but themes in which the border changes upon validation failure don't look good because the top border is not changed. I'm using a page with no custom CSS.

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

25 Oct 2010, 19:46

Here is an image to show the problem. I'm using the showcase code:

Image

The one on the left is without any changes. The one on the right is with the following CSS added to the page:

Code: Select all

.ui-state-error, .ui-widget-content .ui-state-error {
    border-width: 2px !important;
}
Last edited by bumble.bee on 10 Jan 2011, 21:11, edited 1 time in total.

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

29 Oct 2010, 20:49

It looks like database.js was cached in my browser because the latest changes from SVN actually have removed row highlighting on validation failure:

http://code.google.com/p/primefaces/sou ... tatable.js

The row highlighting was a good thought, so I am assuming it was removed only because of the style issue?

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

29 Oct 2010, 22:07

Yes removed that error highlighting, we first need to get things stable for 2.2, then keep extras like these as future ideas.

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

29 Oct 2010, 22:17

Oh by the way, this style problem also exists for highlighting the row too. I'm using a similar CSS style to correct it:

Code: Select all

.ui-state-highlight, .ui-widget-content .ui-state-highlight {
    border-width: 2px !important;
}
Is anyone else having this style issue?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests