Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#792 closed defect (fixed)

Bug while trying to load AccordionPane into ContentPane more than once

Reported by: saeven@… Owned by: anonymous
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

Whilst trying to dynamically load content from strings, which contains code for AccordionPanes?, into ContentPanes? (such that the js code for the AccordionPane? executes properly) - I'm running into a problem that has everything work as expected the first time around, yet the second loading of the dynamic content causes a fatal error.

"this.domNode has no properties" in dojo.js at line 142

If it helps, the Firefox JS console reports that line 142 starts here in dojo.js:

if(djConfig.baseScriptUri.length){ return djConfig.baseScriptUri; }

The code below can reproduce the issue:

<html>
<head>
<link href="includes/stylesheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">djConfig = { bindEncoding: "utf-8" };</script>
<script src="ext/dojo/dojo.js" type="text/javascript"></script>
<script type="text/javascript">
	dojo.require( "dojo.fx.*" );
	dojo.require( "dojo.widget.LayoutContainer" );
	dojo.require( "dojo.widget.AccordionContainer" );
	dojo.require( "dojo.widget.ContentPane" );		

	function setData(){
		alert( "Setting data" );

		dojo.widget.byId("suggestions").setContent(
	'<div dojoType="AccordionContainer" labelNodeClass="label" containerNodeClass="accBody" ' +
	' style="border: 1px solid #CCCCCC; float: left; margin-right: 30px;  width: 100%; height: 300px; overflow: hidden; margin-right:5px;">' +
	' <div dojoType="ContentPane" label="1">' +
	'   here is some accordion text ' +
	' </div> ' +
	'</div>'
);

		setTimeout( "setData()", 5000 );



	}
	dojo.addOnLoad( setData );

</script>
<style>
	.label {
		border: 1px solid black;
		background: #232323;
		color: #fff;
		font-weight: bold;
	}
	
	.label :hover {
		cursor: hand;
	}
	
	.accBody {
		background: #ededed;
		overflow: auto;
	}
</style>
</head>
<body>

<div dojoType="ContentPane" layoutAlign="client" id="suggestions" executeScripts="true">	
</div>

</body>
</html>

Change History (3)

comment:1 Changed 13 years ago by mumme@…

Resolution: fixed
Status: newclosed

Fixed as of 4174

/ Fredrik

comment:2 Changed 13 years ago by bill

Milestone: 0.3.1

comment:3 Changed 12 years ago by (none)

Milestone: 0.3.1

Milestone 0.3.1 deleted

Note: See TracTickets for help on using tickets.