assetsense / gwtwindowmanager

Automatically exported from code.google.com/p/gwtwindowmanager
0 stars 0 forks source link

Same as issue #8 #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a HTMLPanel with content
2. Create 2 GInternalFrames
3. Set the content of the 2 frames with the same HTMLPanel

What is the expected output? What do you see instead?
That the content on both panels should be the same, but only the second
frame contains or displays the content of the HTMLPanel.

This seems to happen with all widgets. If I use text it works correctly.

What version of the product are you using? On what operating system?
gwt-windows-1.2.22 and the gwm-release-01 on WindowsXP SP2.

Please provide any additional information below.

code sample :

HTMLPanel panel = new HTMLPanel("<h1>A piece of test HTML #1</h1>");
panel.setVisible(true);

FramesManager framesManager = new
FramesManagerFactory().createFramesManager(); 
GInternalFrame internalFrame1 = framesManager.newFrame();

internalFrame1.setMaximizable(true);
internalFrame1.setMaximumHeight(Window.getClientHeight());
internalFrame1.setMinimizable(true);
internalFrame1.setMaximumWidth(Window.getClientWidth());
internalFrame1.setHeight(0);
internalFrame1.setWidth(0);
internalFrame1.setResizable(true);
internalFrame1.setClosable(true);
internalFrame1.setDraggable(true);
internalFrame1.showCenter(false);
internalFrame1.setDestroyOnClose();
internalFrame1.setTitle(internalFrame1.getId());

internalFrame1.setContent(panel);

GInternalFrame internalFrame2 = framesManager.newFrame();

internalFrame2.setMaximizable(true);
internalFrame2.setMaximumHeight(Window.getClientHeight());
internalFrame2.setMinimizable(true);
internalFrame2.setMaximumWidth(Window.getClientWidth());
internalFrame2.setHeight(0);
internalFrame2.setWidth(0);
internalFrame2.setResizable(true);
internalFrame2.setClosable(true);
internalFrame2.setDraggable(true);
internalFrame2.showCenter(false);
internalFrame2.setDestroyOnClose();
internalFrame2.setTitle(internalFrame2.getId());

internalFrame2.setContent(panel);

Only the 2nd frame displays the html from the panel and the first frame
appears blank.

If I use the panel.toString() method or add plain text it displays
correctly in both frames, not sure if this a GWT issue or a GWM issue?

Original issue reported on code.google.com by jason%re...@gtempaccount.com on 19 Dec 2006 at 9:16

GoogleCodeExporter commented 8 years ago
Hi,

This the way widgets work in GWT framework.
It is the same you add a widget into 2 differents cells of a grid let say in 
0,0 and 1,1
the cell (1,1) is only filled.

In GWT if you want to widget into 2 differents places you need two instances of 
your
Widget. Because Widgets are not Views representing a common widget model. A 
widget
comes with his own event listener ans his own resources. 

Moreover a Widget can't have two parents widgets at the same time.

Original comment by luciano.broussal@gmail.com on 19 Dec 2006 at 4:54

GoogleCodeExporter commented 8 years ago

Original comment by luciano.broussal@gmail.com on 6 Feb 2007 at 6:19