Closed glassfishrobot closed 17 years ago
@glassfishrobot Commented Reported by @edburns
@glassfishrobot Commented @edburns said:
On Tue, 17 Apr 2007 18:41:34 -0700, Gregory Murray Gregory.Murray@Sun.COM said:
GM> Hi Ed, GM> We have an API just for this kind of thing:
GM> See the jMaki clear widgets?
GM> jmaki.clearWidgets(DOM_NODE);
GM> jMaki will find all jMaki created widgets under the DOM node:
GM> 1. jMaki will call the destroy function on the widget. A destroy GM> function is not required but if present will remove any listeners and GM> make sure data is synced up. GM> 2. The widget will be div will be removed from the document. GM> 3. The widget will be removed from the jmaki.attributes map.
GM> If you can call this before re-injecting new widgets your problem GM> should go away. I think this is the best approach because it give the GM> widgets the opportunity to de-register events as well. This API has GM> been around for a few releases and is what the injector uses.
GM> Let me know if this will work, otherwise we will figure out another GM> solution.
GM> -Greg
@glassfishrobot Commented @edburns said: Mark as invalid because clearWidgets() was being called.
@glassfishrobot Commented This issue was imported from java.net JIRA JSF_EXTENSIONS-71
@glassfishrobot Commented Marked as incomplete on Wednesday, April 18th 2007, 1:10:15 am
Here's the problem.
Greg, now in jmaki.js you have:
/**
@param widget Object representing widget to load */ this.loadWidget = function(_jmw) { // see if the widget has been defined. if (_jmaki.attributes.get(_jmw.uuid) != null) { return; }
var targetName ="jmaki.widgets." + _jmw.name + ".Widget"; var con = this.findObject(targetName); if (typeof con != "function")
{ logError("Could not find widget constructor for: " + targetName + ". Please make sure the widget constructor is properly defined.", document.getElementById(_jmw.uuid)); }
var wimpl;
When I do DOM replacement of the table in which the scriptaculous inplace editor widget instances reside, I'm ok as long as the _jmw.uuid hasn't been encountered before. The moment I try to load one that has already been encountered, problems result.
This is new jMaki behavior. This is not a problem on the DynaFaces side.
Ed
Environment
Operating System: All Platform: Sun
Affected Versions
[current]