PDA

View Full Version : RowEditing validations bug?



lisper
5 Sep 2011, 3:02 PM
The docs for Ext.grid.plugin.RowEditing says that if the errorSummary property is true (which is the default) then a tooltip should appear if any of the edited data does not pass a validation. But empirically this does not seem to be the case. If I have invalid data in a cell then a little red triangle appears in the cell, but no tooltip appears. Is this a known bug? Or might I be doing something wrong?

This behavior can be seen in Sencha's own rest proxy example. Go to:

http://docs.sencha.com/ext-js/4-0/extjs/examples/restful/restful.html

edit one of the rows and delete the email address. When you click 'update' there should be a tooltip that pops up and tells you that the email address is invalid, but this doesn't happen.

skirtle
6 Sep 2011, 2:48 AM
Just tried it with 4.0.6 too and I would agree that something isn't working in that example. Looks like validation is being totally ignored. I'm reluctant to point fingers at RowEditing though, see the screenshot on this (unrelated) bug report which shows the validation and tooltips working:

http://www.sencha.com/forum/showthread.php?145775

shmeltex
20 Nov 2011, 12:09 AM
I guess the key is the last part of the statement: errorSummary ... to show a tooltip (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tip.ToolTip) that summarizes all validation errors present in the row editor. The errors in this case are the ones rased by editor and not validators. To see the errorSummary in action set editor for column and edit blank row:
editor: {allowBlank: false}

Keep in mind that versions prior 4.1 have a bug with errorSummary, see http://www.sencha.com/forum/showthread.php?132214-4.0.0-RowEditor-ignores-errorSummary&highlight=errorSummary for details.