I am wondering why dhtmlxLayout destroys a
is called to replace the present one.
Exa: I have 2
s and call
Then I replace the Layout Window with
Now I try to recall “divObject01” again using
which draws an error saying that “divObject01” is either null or not an object. I.E., completely destroyed.
If I use these in other dhtmlx components the
survives intact - even with any on-the-fly changes to the
. But dhtmlxLayout does not follow this same behavior.
I note too that dhxLayout.cells(“c”).attachURL("…/Folder/File.html"); works repeatedly with no problems as it is built/attached from an outside source.
I request that you not destroy the replaced Object using attachObject() in dhtmlxLayout so that I can use and reuse the same
over and over.
attachObject method replaces an object from some position into layout cell. When you call this method again, the new object replaces the previous one.
You can use another approach to change cell content dynamically.
For example, attachObject can be called only once for some object, and then content will be attached to this object dynamically (using any known approach).
You can also try to use the following approach
For example there are two objects:
Before attaching “m2” you can move the object “m1” to the body:
Works even better than expected!