Please provide code to attach a dhtmlxVault to dhtmlxWindow

Support,

Please provide code to attach a dhtmlxVault to dhtmlxWindow.
The following code appears to work initially, but does not render
when I restart the window. I am not sure if this is the best approach…

JAVASCRIPT CODE:

dhxWins = new dhtmlXWindows();
dhxWins.enableAutoViewport(false);
dhxWins.attachViewportTo("parentId");
dhxWins.setImagePath("dhtmlx/dhtmlxWindows/codebase/imgs/dhxwins_dhx_black");
var w1 = dhxWins.createWindow("w1", 20, 30, 320, 240);
w1.setText("Create a New Project");
w1.attachObject("vault1");
w1.setModal(true);

//Vault
vault = new dhtmlXVaultObject();
vault.setImagePath("dhtmlx/codebase/imgs/");
vault.setServerHandlers("UploadHandler.jsp", "GetInfoHandler.jsp", "GetIdHandler.jsp");
vault.create("vault1")

Thanx.

The following code appears to work initially, but does not render when I restart the window.

" restart the window" - what did you mean ?

To elaborate, After I close the dhtmlxWindow, and open window once again, the vault object does not display within the dhtmlxWindow.

Best.

When the window is closed, window and its content is removed. So, vault1 container doesn’t exist after closing.

You can try to use onClose event to detach vault container before closing:

w1.attachEvent(“onClose”,function(){
w1.detachObject();
})