#8374 closed defect (fixed)
exception thrown when entering invalid value in an editable cell of a DataGrid
Reported by: | goriol | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | DojoX Grid | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Context: A DataGrid? is created with one of its cells marked as editable. As that cell should only contain integers, the grid structure defines the field this way:
... { field: qty editable: true, type: dojox.grid.cells._Widget, widgetClass: dijit.form.NumberTextBox, constraint: { places: 0 } }, ...
Scenario:
- I double-click on the editable cell to change its value
- I type an invalid value (for example "1.5", as I set up "places: 0" as a constraint)
- I get a tooltip saying the value is not valid (this is the expected behavior).
- I discard the message and press Enter to submit the value
- An exception is thrown:
[Exception... "'Error: assertion failed in ItemFileWriteStore' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "" data: no]
I was able to trace back this error up to ItemFileWriteStore._setValueOrValues()
(which is called by the setValue() function).
The exception is thrown at this line:
this._assert(typeof newValueOrValues !== "undefined");
I don't understand why this function is executed. As the value is invalid, the setValue() function should never be called, right?
Attachments (1)
Change History (10)
Changed 12 years ago by
Attachment: | essai.html added |
---|
comment:1 Changed 12 years ago by
Milestone: | tbd → 1.3 |
---|
comment:2 Changed 12 years ago by
Milestone: | 1.3 → 1.4 |
---|
The change for this will be very invasive because it will require figuring out a way to have validating widgets cancel an apply. Moving to 1.4.
comment:4 Changed 11 years ago by
Milestone: | 1.5 → 1.6 |
---|
1.5 is released, moving remaining tickets to 1.6
comment:5 Changed 10 years ago by
Milestone: | 1.6 → future |
---|
(sadly) punting seemingly abandoned ticket and meta tickets to future
comment:6 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 Changed 10 years ago by
Milestone: | future → 1.7 |
---|
test page