Closed Bug 387738 Opened 13 years ago Closed 13 years ago

Using repeat index for 1.1 delete does not work

Categories

(Core Graveyard :: XForms, defect)

x86
Windows XP
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: msterlin, Assigned: msterlin)

Details

(Keywords: fixed1.8.1.5)

Attachments

(2 files, 1 obsolete file)

1.78 KB, application/xhtml+xml
Details
3.36 KB, patch
aaronr
: review+
doronr
: review+
Details | Diff | Splinter Review
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070507 Minefield/3.0a5pre

Repeat indexes are not updated and no node is deleted when the delete location is specified by an xpath expression like index('lineset') [where 'lineset' is the id of the repeat.


Reproducible: Always

Steps to Reproduce:
Run the attached testcase and add a line or two and then select a row and delete it.

Actual Results:  
Current index does not change and no node is deleted.

Expected Results:  
Selected line should be deleted and current index updated to reflect the current number of rows.
Assignee: nobody → msterlin
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file testcase
Status: NEW → ASSIGNED
Attached patch patch (obsolete) — Splinter Review
We were using the 'locationNode' to determine the instance data node for sending the insert/delete event. Because delete can now delete multiple nodes, the locationNode will get set to null when we reach the end of the set of nodes to delete and GetInstanceNodeForData will fail - we then exit without rebuild/recalculate/refresh and the display does not get updated.
Attachment #271915 - Flags: review?(aaronr)
Comment on attachment 271915 [details] [diff] [review]
patch

Actually, I think it'd be safer to perhaps get this earlier in the process since resNode has already been removed from the DOM in the case of 'delete'.
Attachment #271915 - Flags: review?(aaronr) → review-
Attached patch patch2Splinter Review
Getting the instance data node before performing the delete.
Attachment #271915 - Attachment is obsolete: true
Attachment #272034 - Flags: review?(aaronr)
Attachment #272034 - Flags: review?(aaronr) → review+
Attachment #272034 - Flags: review?(doronr)
Attachment #272034 - Flags: review?(doronr) → review+
Attachment #271913 - Attachment mime type: application/octet-stream → application/xhtml+xml
checked into trunk and 1.8 branch for msterlin
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: fixed1.8.1.5
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.