jQWidgets Forums

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: DocumentGroup tabbing DocumentGroup tabbing #85470

    flynnbe
    Participant

    Cheers, that should do the trick.


    flynnbe
    Participant

    Yep that’s done it. Thanks very much.


    flynnbe
    Participant

    Thanks, I’ll give it a try.


    flynnbe
    Participant

    Hi, 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


    flynnbe
    Participant

    By 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


    flynnbe
    Participant

    Yes 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;
    }


    flynnbe
    Participant

    Hi 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

Viewing 7 posts - 1 through 7 (of 7 total)