Closed Bug 311475 Opened 19 years ago Closed 19 years ago

select/select1 not updated on inserts when using itemset

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allan, Assigned: smaug)

References

()

Details

(Keywords: fixed1.8.0.2, fixed1.8.1, testcase)

Attachments

(2 files, 2 obsolete files)

It seems like select and select1 does not update their contents when new items
are inserted into their itemsets.
Attached file Testcase
Keywords: testcase
I thought I fixed this in Bug 303312, but apparently not :(
DOMInspector shows that itemset binding doesn't update its content.
Assignee: aaronr → smaug
Attached patch For select1 (obsolete) — Splinter Review
This helps with <select1> but <select> doesn't show anything.
Attachment #200127 - Flags: review?(doronr)
(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
Attachment #200127 - Flags: review?(doronr) → review+
Attached patch select patch (obsolete) — Splinter Review
Make select work without a bound node.
Attachment #200142 - Flags: review?(smaug)
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+
Attachment #200127 - Flags: review?(aaronr)
(In reply to comment #7)
> I think if (this.hasBoundNode) would be better.

And I meant ofc this.delegate.hasBoundNode ;)

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-
(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.
Attachment #200127 - Flags: review?(aaronr) → review+
Attached patch patchSplinter Review
I'll check in this patch. Contains patches for select1 and select.
Attachment #200127 - Attachment is obsolete: true
Attachment #200142 - Attachment is obsolete: true
Checked in
Whiteboard: xf-to-branch
checked into MOZILLA_1_8_BRANCH via bug 323691.  Leaving open for now until it gets into 1.8.0
Whiteboard: xf-to-branch
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.0.2
Resolution: --- → FIXED
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.

Attachment

General

Creator:
Created:
Updated:
Size: