Re: [Dev] Dynamically redraw grid-stack content through UUFClient
Hi, I once had a offline discussion with SajithAR regarding zoneMaps not initializing. He said zone maps are initialized once because its a heavy operation. He asked me to use renderFragment method without passing the defzone attribute. I am not sure whether this will be a valid for your use case. Thanks ! Rajith On Mon, Apr 24, 2017 at 11:45 AM, Udara Rathnayakewrote: > I tried populateZonesMap(); before calling renderFragmentImpl() inside > UUFClient.renderFragment function. This works. > > Can we make this a configuration property if there is no other way? > > > > > On Mon, Apr 24, 2017 at 10:56 AM, Udara Rathnayake > wrote: > >> Assume we have following grid-stack div rendered through the UUFClient. >> >> >> >> >> Now I want to re-render the same with a different content (Eg:- Change >> the dashboard layout ) >> There is a grid-stack function to destroy the existing content[1]. >> >> $('.grid-stack').data('gridstack').destroy(true); >>> >> >> So this will basically remove following also, used by the UUF to append >> the content. >> >> >>> >>> >> >> Tried manually adding above before calling the UUFClient.renderFragment() >> but it seems not working. zonesMap which is there in the UUFClient still >> contains the gridContent zone. >> >> Any idea? >> >> [1] https://github.com/troolee/gridstack.js/tree/develop/doc#des >> troydetachgrid >> >> > > > -- > Regards, > UdaraR > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Rajith Roshan Software Engineer, WSO2 Inc. Mobile: +94-72-642-8350 <%2B94-71-554-8430> ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Dynamically redraw grid-stack content through UUFClient
Solution is to get the response (HTML) within the callback and do append part within our logic. Following is my onSuccess function, onSuccess: function (data) { > $('.grid-stack').append(data); > } > } > On Mon, Apr 24, 2017 at 5:21 PM, Rajith Roshanwrote: > Hi, > > I once had a offline discussion with SajithAR regarding zoneMaps not > initializing. He said zone maps are initialized once because its a heavy > operation. He asked me to use renderFragment method without passing the > defzone attribute. I am not sure whether this will be a valid for your use > case. > > Thanks ! > Rajith > > On Mon, Apr 24, 2017 at 11:45 AM, Udara Rathnayake > wrote: > >> I tried populateZonesMap(); before calling renderFragmentImpl() inside >> UUFClient.renderFragment function. This works. >> >> Can we make this a configuration property if there is no other way? >> >> >> >> >> On Mon, Apr 24, 2017 at 10:56 AM, Udara Rathnayake >> wrote: >> >>> Assume we have following grid-stack div rendered through the UUFClient. >>> >>> >>> >>> >>> Now I want to re-render the same with a different content (Eg:- Change >>> the dashboard layout ) >>> There is a grid-stack function to destroy the existing content[1]. >>> >>> $('.grid-stack').data('gridstack').destroy(true); >>> >>> So this will basically remove following also, used by the UUF to append >>> the content. >>> >>> >>> >>> Tried manually adding above before calling the >>> UUFClient.renderFragment() but it seems not working. zonesMap which is >>> there in the UUFClient still contains the gridContent zone. >>> >>> Any idea? >>> >>> [1] https://github.com/troolee/gridstack.js/tree/develop/doc#des >>> troydetachgrid >>> >>> >> >> >> -- >> Regards, >> UdaraR >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Rajith Roshan > Software Engineer, WSO2 Inc. > Mobile: +94-72-642-8350 <%2B94-71-554-8430> > -- Regards, UdaraR ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Dynamically redraw grid-stack content through UUFClient
I tried populateZonesMap(); before calling renderFragmentImpl() inside UUFClient.renderFragment function. This works. Can we make this a configuration property if there is no other way? On Mon, Apr 24, 2017 at 10:56 AM, Udara Rathnayakewrote: > Assume we have following grid-stack div rendered through the UUFClient. > > > > > Now I want to re-render the same with a different content (Eg:- Change > the dashboard layout ) > There is a grid-stack function to destroy the existing content[1]. > > $('.grid-stack').data('gridstack').destroy(true); >> > > So this will basically remove following also, used by the UUF to append > the content. > > >> >> > > Tried manually adding above before calling the UUFClient.renderFragment() > but it seems not working. zonesMap which is there in the UUFClient still > contains the gridContent zone. > > Any idea? > > [1] https://github.com/troolee/gridstack.js/tree/develop/doc# > destroydetachgrid > > -- Regards, UdaraR ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Dynamically redraw grid-stack content through UUFClient
Assume we have following grid-stack div rendered through the UUFClient. Now I want to re-render the same with a different content (Eg:- Change the dashboard layout ) There is a grid-stack function to destroy the existing content[1]. $('.grid-stack').data('gridstack').destroy(true); > So this will basically remove following also, used by the UUF to append the content. > > Tried manually adding above before calling the UUFClient.renderFragment() but it seems not working. zonesMap which is there in the UUFClient still contains the gridContent zone. Any idea? [1] https://github.com/troolee/gridstack.js/tree/develop/doc#destroydetachgrid ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev