Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#4038 closed defect (fixed)

FilteringSelect: Re-creating doesn't work

Reported by: guest Owned by: haysmark
Priority: high Milestone: 1.0
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

Problem: a FilteringSelect? inside a ContentPane? is not reloaded.

Browser: FireFox? 2.0.0.6, IE 7

Dojo version: 0.9 (nightly build 7 august 2007)

Description:

The first time the ContentPane? is loaded with setHref() the FilteringSelect? shows correctly all its options. When the ContentPane? is reloaded the FilteringSelect? has no options, and when trying to typing inside the text box the following message is displayed:

<< this.domNode has no properties dojo.js (line 547) >>


Here is the sample code that reproduces the problem:

<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01EN"

"http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>

<script type="text/javascript" src="../../js/dojotoolkit/dojo/dojo.js"

djConfig="isDebug: true, parseOnLoad: true"></script>

<script type="text/javascript"> dojo.require("dojox.layout.ContentPane?"); dojo.require("dijit.form.FilteringSelect?"); dojo.require("dojo.parser"); scan page for widgets and instantiate them

function loadSelect() {

dijit.byId('mainPane').setHref('filteringSelect.html');

} </script>

<style> @import "../../js/dojotoolkit/dojo/resources/dojo.css"; @import "../../js/dojotoolkit/dijit/themes/tundra/tundra.css"; @import "../../js/dojotoolkit/dijit/tests/css/dijitTests.css";

</style>

</head> <body class="tundra">

<h2>Reloading FilteringSelect? does not work ?</h2> <div id="mainPane" dojoType="dojox.layout.ContentPane?" class="box">

content pane

</div> <input type="button" value="load select" onClick='loadSelect();'>

</body>

</html>


file filteringSelect.html:

<script type="text/javascript"> dojo.require("dijit.form.FilteringSelect?"); dojo.require("dojo.parser"); scan page for widgets and instantiate them </script>

<style> @import "../../js/dojotoolkit/dojo/resources/dojo.css"; @import "../../js/dojotoolkit/dijit/themes/tundra/tundra.css"; @import "../../js/dojotoolkit/dijit/tests/css/dijitTests.css"; </style>

<form action="#" method="GET">

<p>FilteringSelect? #1: inlined data, autocomplete=false:</p> <select dojoType="dijit.form.FilteringSelect?"

id="setvaluetest2" name="state1" autocomplete="false" invalidMessage="Invalid state name"

<option value="blank"></option> <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AS">American Samoa</option> <option value="AZ">Arizona</option> <option value="AR">Arkansas</option> <option value="AE">Armed Forces Europe</option> <option value="AP">Armed Forces Pacific</option> <option value="AA">Armed Forces the Americas</option> <option value="CA" selected>California</option> <option value="CO">Colorado</option> <option value="CT">Connecticut</option>

</select>

</form>

Attachments (4)

main2.html (2.0 KB) - added by mumme 12 years ago.
4038.patch (397 bytes) - added by haysmark 12 years ago.
Fix for 1.0 trunk
contentpane.html (1003 bytes) - added by haysmark 12 years ago.
Test case
filteringselect.html (1.1 KB) - added by haysmark 12 years ago.
Test case

Download all attachments as: .zip

Change History (11)

comment:1 Changed 12 years ago by bill

Component: GeneralDijit
Milestone: 1.0
Owner: changed from anonymous to mumme
Priority: highnormal

Hmm, I'm not sure if this bug should go to Fredrik or Mark.

comment:2 Changed 12 years ago by mumme

Owner: changed from mumme to bill
Summary: FilteringSelect is not reloaded inside a ContentPaneRe-creating a FilteringSelect doesn't work

Hum, well it seems to be something in FilteringSelect? that doesn't clean up properly when destroyed. I'm probably not the one that should go and poke around in FilteringSelect? code.

I can reproduce it by creating, destroying and then create it again from code, so ContentPane? isn't involved.

Attaching testcase.

Changed 12 years ago by mumme

Attachment: main2.html added

comment:3 Changed 12 years ago by bill

Owner: changed from bill to haysmark
severity: majornormal

comment:4 Changed 12 years ago by bill

Summary: Re-creating a FilteringSelect doesn't workFilteringSelect: Re-creating doesn't work

Changed 12 years ago by haysmark

Attachment: 4038.patch added

Fix for 1.0 trunk

comment:5 Changed 12 years ago by haysmark

Status: newassigned

Changed 12 years ago by haysmark

Attachment: contentpane.html added

Test case

Changed 12 years ago by haysmark

Attachment: filteringselect.html added

Test case

comment:6 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [10332]) Fixes #4038. Proxy commit for haysmark. Check for popup created before calling destroy in uninitialize.

comment:7 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.