rem: var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if( !checkboxNode ) continue; 
add: if (checkboxNode.checked) localStore.Assert(categorySRC, checkedProperty, engineSRC, true); else localStore.Unassert(categorySRC, checkedProperty, engineSRC, true); } } 
context: function saveEngines(){	var categoryList = document.getElementById("categoryList");	var category = categoryList.selectedItem.getAttribute("id");	if( category )	{		category = "NC:SearchCategory?category=" + category;	}	else	{		category = "NC:SearchEngineRoot";	}    debug("Category: " + category + "\n");    var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService);	if (rdf)	{		var localStore = rdf.GetDataSource("rdf:local-store");		if( !localStore )	return(false);   	var engineBox = document.getElementById("engineKids");    if( !engineBox )      return false;    var checkedProperty = rdf.GetResource( "http://home.netscape.com/NC-rdf#checked", true );    var categorySRC = rdf.GetResource( category, true );    debug("# of engines: " + engineBox.childNodes.length + "\n");    for (var x = 0; x < engineBox.childNodes.length; x++)    {      var treeitemNode = engineBox.childNodes[x];      var engineURI = treeitemNode.getAttribute("id");      var engineSRC = rdf.GetResource(engineURI, true);      var checkboxNode = treeitemNode.firstChild.firstChild.firstChild;      if( !checkboxNode )      	continue;      if( checkboxNode.checked == true || checkboxNode.checked == "true")      {        debug("  Check engine #" + x + "    " + engineURI + "\n");        localStore.Assert( categorySRC, checkedProperty, engineSRC, true );      }      else      {        debug("UnCheck engine #" + x + "    " + engineURI + "\n");        localStore.Unassert( categorySRC, checkedProperty, engineSRC, true );      }    }	// save changes; flush out the localstore	try	{        var flushableStore = localStore.QueryInterface(nsIRDFRemoteDataSource);		if (flushableStore)	flushableStore.Flush();        debug("Flushed changes\n\n");	}	catch(ex)	{	}  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/92255768432d56941bc6db8dcc4e84be97378a11/search-panel.js/buggy/suite/common/search/search-panel.js