Hello,
I have a problem when I want to delete portlets from a portalLayout to add new ones. First, here is how I delete the portlets (after a click on a button):
I think i am removing portlets well (I hope). Then I add my portlets with this function :
So when I run it, all the portlets are deleted but then none are added. And the most weird is that when I remove the piece of code to remove portlets, adding works well (but of course I keep the portlets already present).
So here I am a bit lost, my code to delete portlets is good or not? If someone has already encountered this problem I'm all ears.
Thank you very much.
I have a problem when I want to delete portlets from a portalLayout to add new ones. First, here is how I delete the portlets (after a click on a button):
Code:
for (Canvas c: getPortalLayout (). getChildren ()) ( getPortalLayout (). removeChild (c); c.destroy () )
Code:
getPortalLayout (). addPortlet (portlet);
So here I am a bit lost, my code to delete portlets is good or not? If someone has already encountered this problem I'm all ears.
Thank you very much.
Comment