1

I'm creating a website that has a 'main page' on which I put a slideshow of images. I draw the images on a canvas object which I then add to a Panel, which gets added to the RootPanel (after clearing it).

The first load of the "main page" works fine: 1) clear rootpanel 2) create new panels / canvas 3) load image, on load, draw on canvas 4) i can manipulate the DOM element of the canvas just fine (opacity etc)

When I click on "main page" again it triggers the same method call: it clears the rootpanel, creates new objects (although I have the impression the Java object of the Canvas remains the same? (it has the same id)). The images never show up, because the Canvas object appears to be 'detached' from the DOM.

When inspecting the page the canvas object appears to be there, although it's missing the manipulations I try to do to it through java (which would be obvious, because of its detached state). Any idea why the object would be detached, when basically calling the same method twice?

4

0 回答 0