jQWidgets Forums
Forum Replies Created
-
Author
-
Cheers, that should do the trick.
April 22, 2016 at 2:54 pm in reply to: modifying jqxdockinglayout content modifying jqxdockinglayout content #83816Yep that’s done it. Thanks very much.
April 21, 2016 at 1:34 pm in reply to: modifying jqxdockinglayout content modifying jqxdockinglayout content #83764Thanks, I’ll give it a try.
April 21, 2016 at 11:44 am in reply to: modifying jqxdockinglayout content modifying jqxdockinglayout content #83755Hi, I think you misunderstand. I am not looking to save the state of any content contained within the layout.
I’m looking for a way to preserve the layout of the dockinglayout widget so that I can then restore the layout of the dockingwidget (after a page refresh for example). I need to know then how to put the content back into the restored layout. For example – there is a layout with a tree in a panel, I save the layout (as a stringified JSON), the page is refreshed, the layout is reloaded, I then re-insert the tree into the panel..
Thanks, Brian
April 15, 2016 at 9:59 am in reply to: modifying jqxdockinglayout content modifying jqxdockinglayout content #83529By initiating a fresh layout all the previous layout settings wold be lost? So there is no practical way to preserve layout state across postbacks? This is important to us as we are trialling the component at the moment and the dockinglayout control is not much use otherwise.
Thanks, Brian
April 14, 2016 at 1:57 pm in reply to: modifying jqxdockinglayout content modifying jqxdockinglayout content #83486Yes it’s local storage. The function ‘censor()’ removes each element that prevents the saved layout becoming stringified. I assume the problem is there. Is there an alternative way to storing layout across page refreshes?
var savedLayout = $(‘#jqxLayout’).jqxDockingLayout(‘saveLayout’);
var savedLayoutStringified = JSON.stringify(savedLayout, censor);
localStorage.setItem(“StoredLayout”, $(‘#jqxLayout’).jqxDockingLayout(‘saveLayout’));function censor(key, value) {
if (key == “parent” | key == “current” | key == “host” | key == “element” | key == “elements” | key == “prevItem” | key == “treeInstance” | key == “owner” | key == “contentContainer”) {
return undefined;
}
return value;
}April 14, 2016 at 1:07 pm in reply to: modifying jqxdockinglayout content modifying jqxdockinglayout content #83481Hi Dimitar, my situation is similar the demo provided in that I have a jqxtree inside one of the panels. My problem is when handling a page refresh. I save the layout but when I try to load the saved layout after the refresh the jqxtree does not appear. In other words the layout retains all the information relating to panels (width, position, etc) but does not recreate the content.
I was hoping to work around this by inserting the jqxtree back into the panel once the layout had finished loading.
Thanks, Brian
-
AuthorPosts