Last Comment Bug 311475 - select/select1 not updated on inserts when using itemset
: select/select1 not updated on inserts when using itemset
Status: RESOLVED FIXED
: fixed1.8.0.2, fixed1.8.1, testcase
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug]
: Stephen Pride
:
Mentors:
http://www.mozilla.org/projects/xforms/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-07 02:25 PDT by Allan Beaufour
Modified: 2016-07-15 14:46 PDT (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Testcase (2.01 KB, application/xhtml+xml)
2005-10-07 02:26 PDT, Allan Beaufour
no flags Details
For select1 (894 bytes, patch)
2005-10-19 12:57 PDT, Olli Pettay [:smaug]
doronr: review+
aaronr: review+
Details | Diff | Splinter Review
select patch (1.85 KB, patch)
2005-10-19 14:29 PDT, Doron Rosenberg (IBM)
bugs: review+
aaronr: review-
Details | Diff | Splinter Review
patch (3.97 KB, patch)
2005-10-28 11:13 PDT, Olli Pettay [:smaug]
no flags Details | Diff | Splinter Review

Description Allan Beaufour 2005-10-07 02:25:10 PDT
It seems like select and select1 does not update their contents when new items
are inserted into their itemsets.
Comment 1 Allan Beaufour 2005-10-07 02:26:10 PDT
Created attachment 198785 [details]
Testcase
Comment 2 Olli Pettay [:smaug] 2005-10-07 02:57:09 PDT
I thought I fixed this in Bug 303312, but apparently not :(
Comment 3 alexander :surkov 2005-10-07 23:04:15 PDT
DOMInspector shows that itemset binding doesn't update its content.
Comment 4 Olli Pettay [:smaug] 2005-10-19 12:57:11 PDT
Created attachment 200127 [details] [diff] [review]
For select1

This helps with <select1> but <select> doesn't show anything.
Comment 5 Olli Pettay [:smaug] 2005-10-19 12:57:57 PDT
(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.

Comment 6 Doron Rosenberg (IBM) 2005-10-19 14:29:38 PDT
Created attachment 200142 [details] [diff] [review]
select patch

Make select work without a bound node.
Comment 7 Olli Pettay [:smaug] 2005-10-20 09:10:00 PDT
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.)
Comment 8 Olli Pettay [:smaug] 2005-10-20 09:24:09 PDT
(In reply to comment #7)
> I think if (this.hasBoundNode) would be better.

And I meant ofc this.delegate.hasBoundNode ;)

Comment 9 aaronr 2005-10-20 15:20:29 PDT
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.
Comment 10 aaronr 2005-10-20 15:22:58 PDT
(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.
Comment 11 Olli Pettay [:smaug] 2005-10-28 11:13:02 PDT
Created attachment 201156 [details] [diff] [review]
patch

I'll check in this patch. Contains patches for select1 and select.
Comment 12 Olli Pettay [:smaug] 2005-10-28 11:18:36 PDT
Checked in
Comment 13 aaronr 2006-02-02 17:15:50 PST
checked into MOZILLA_1_8_BRANCH via bug 323691.  Leaving open for now until it gets into 1.8.0
Comment 14 aaronr 2006-07-07 11:56:19 PDT
verified fixed in MOZILLA_1_8_BRANCH

Note You need to log in before you can comment on or make changes to this bug.