select/select1 not updated on inserts when using itemset

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
12 years ago
a year ago

People

(Reporter: Allan Beaufour, Assigned: smaug)

Tracking

({fixed1.8.0.2, fixed1.8.1, testcase})

Trunk
fixed1.8.0.2, fixed1.8.1, testcase

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

12 years ago
It seems like select and select1 does not update their contents when new items
are inserted into their itemsets.
(Reporter)

Comment 1

12 years ago
Created attachment 198785 [details]
Testcase
(Reporter)

Updated

12 years ago
Keywords: testcase
(Assignee)

Comment 2

12 years ago
I thought I fixed this in Bug 303312, but apparently not :(

Comment 3

12 years ago
DOMInspector shows that itemset binding doesn't update its content.
(Assignee)

Updated

12 years ago
Assignee: aaronr → smaug
(Assignee)

Comment 4

12 years ago
Created attachment 200127 [details] [diff] [review]
For select1

This helps with <select1> but <select> doesn't show anything.
(Assignee)

Updated

12 years ago
Attachment #200127 - Flags: review?(doronr)
(Assignee)

Comment 5

12 years ago
(In reply to comment #4)
> Created an attachment (id=200127) [edit]
> For select1
> 
> This helps with <select1> but <select> doesn't show anything.
....with or without this patch.

Status: NEW → ASSIGNED

Updated

12 years ago
Attachment #200127 - Flags: review?(doronr) → review+

Comment 6

12 years ago
Created attachment 200142 [details] [diff] [review]
select patch

Make select work without a bound node.
Attachment #200142 - Flags: review?(smaug)
(Assignee)

Comment 7

12 years ago
Comment on attachment 200142 [details] [diff] [review]
select patch

>       <method name="_setBoundValue">
>         <body>
>         <![CDATA[
>-          this.delegate.value = this._getSelectedValues();
>+          if (this.delegate.value)
>+            this.delegate.value = this._getSelectedValues();

I think if (this.hasBoundNode) would be better.
With that r=me

(this patch needs the first one too.)
Attachment #200142 - Flags: review?(smaug)
Attachment #200142 - Flags: review?(aaronr)
Attachment #200142 - Flags: review+
(Assignee)

Updated

12 years ago
Attachment #200127 - Flags: review?(aaronr)
(Assignee)

Comment 8

12 years ago
(In reply to comment #7)
> I think if (this.hasBoundNode) would be better.

And I meant ofc this.delegate.hasBoundNode ;)

Comment 9

12 years ago
Comment on attachment 200142 [details] [diff] [review]
select patch

>Index: extensions/xforms/resources/content/select.xml
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/xforms/resources/content/select.xml,v
>retrieving revision 1.3
>diff -u -r1.3 select.xml
>--- extensions/xforms/resources/content/select.xml	5 Oct 2005 16:17:48 -0000	1.3
>+++ extensions/xforms/resources/content/select.xml	19 Oct 2005 21:28:44 -0000

>@@ -395,7 +395,8 @@
>       <method name="_setBoundValue">
>         <body>
>         <![CDATA[
>-          this.delegate.value = this._getSelectedValues();
>+          if (this.delegate.value)
>+            this.delegate.value = this._getSelectedValues();
>         ]]>
>         </body>
>       </method>

I don't get this one.  Why can I only set the delegate.value if it only
previously had a delegate.value?

rest of this patch looks ok.
Attachment #200142 - Flags: review?(aaronr) → review-

Comment 10

12 years ago
(In reply to comment #9)
> (From update of attachment 200142 [details] [diff] [review] [edit])
> >Index: extensions/xforms/resources/content/select.xml
> >===================================================================
> >RCS file: /cvsroot/mozilla/extensions/xforms/resources/content/select.xml,v
> >retrieving revision 1.3
> >diff -u -r1.3 select.xml
> >--- extensions/xforms/resources/content/select.xml	5 Oct 2005 16:17:48 -0000	1.3
> >+++ extensions/xforms/resources/content/select.xml	19 Oct 2005 21:28:44 -0000
> 
> >@@ -395,7 +395,8 @@
> >       <method name="_setBoundValue">
> >         <body>
> >         <![CDATA[
> >-          this.delegate.value = this._getSelectedValues();
> >+          if (this.delegate.value)
> >+            this.delegate.value = this._getSelectedValues();
> >         ]]>
> >         </body>
> >       </method>
> 
> I don't get this one.  Why can I only set the delegate.value if it only
> previously had a delegate.value?
> 
> rest of this patch looks ok.
> 

Oops, sorry, I didn't see smaug's comment about the same line.  With that fixed,
r=me, too.

Updated

12 years ago
Attachment #200127 - Flags: review?(aaronr) → review+
(Assignee)

Comment 11

12 years ago
Created attachment 201156 [details] [diff] [review]
patch

I'll check in this patch. Contains patches for select1 and select.
Attachment #200127 - Attachment is obsolete: true
Attachment #200142 - Attachment is obsolete: true
(Assignee)

Comment 12

12 years ago
Checked in
Whiteboard: xf-to-branch

Comment 13

12 years ago
checked into MOZILLA_1_8_BRANCH via bug 323691.  Leaving open for now until it gets into 1.8.0
(Reporter)

Updated

12 years ago
Whiteboard: xf-to-branch
(Reporter)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Keywords: fixed1.8.0.2
Resolution: --- → FIXED

Comment 14

11 years ago
verified fixed in MOZILLA_1_8_BRANCH
Keywords: fixed1.8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.