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?
2.2M1 - Editable dataTable and incorrect values
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
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.
Created issue: http://code.google.com/p/primefaces/iss ... il?id=1281
- bumble.bee
- Posts: 723
- Joined: 29 Sep 2010, 21:39
- Location: United States
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.
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.
- bumble.bee
- Posts: 723
- Joined: 29 Sep 2010, 21:39
- Location: United States
Here is an image to show the problem. I'm using the showcase code:
The one on the left is without any changes. The one on the right is with the following CSS added to the page:
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.
- bumble.bee
- Posts: 723
- Joined: 29 Sep 2010, 21:39
- Location: United States
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?
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?
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Yes removed that error highlighting, we first need to get things stable for 2.2, then keep extras like these as future ideas.
- bumble.bee
- Posts: 723
- Joined: 29 Sep 2010, 21:39
- Location: United States
Oh by the way, this style problem also exists for highlighting the row too. I'm using a similar CSS style to correct it:
Is anyone else having this style issue?
Code: Select all
.ui-state-highlight, .ui-widget-content .ui-state-highlight {
border-width: 2px !important;
}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests