I am embedding a vaadin application inside of another application. I am running this application in ie 7 and vaadin 6.2.2. I am inserting the vaadin div inside of another div. When the page is loaded the div that is the parent of the vaadin div is visible. When the user click on a button in the vaadin app it calls a javascript function that sets the display style to none for the div that is the parent of the vaadin div. Later when the div that is the parent of the vaadin div is made visible again, all that is visible of the vaadin app is just the background when there should be a textbox and a few buttons. I have noticed that I resize the browser window everything in the vaadin application appears.
I am thinking that one possible fix for this issue would be to run the javascript functions that are called when the browser window is resized (this might not be the best solution) but I have not been able to find them. Does any one know what they are? Also when resizing when in debug mode this is printed out: “Running layout functions due window resize”.
If the javascript solution will not work or if there is a better solution to this issue(without making the whole application a vaadin app) could you let know?
I think you’re spot on with the possible solution, and fortunately, these JavaScript solutions are there for you.
You can use the following to force the Vaadin app to recalculate all the layouts:
vaadin.forceLayout()
That’s exactly what you get when you press the “Force layout” button in the Vaadin debug window.
Note, though, that this operation might be expensive, depending on the complexity of you application, since it recalculates all layout and component dimensions from top to bottom.