Thank you for reporting this bug. We will make it our priority to review this report.
[CLOSED] Possible getElement bug
It is entirely possible that I am using this wrong, but I have two usecases where this issue occurs...
Before an object is rendered, I need to add an additional DOM element to it. For various reasons, it makes more sense to do this manually than to extend the object and add to the onRender call.
As lc.getElement() is called before it is rendered, the Component.dummy object is created, and returned. However, as far as I can tell, any content that I apply to that dummy never gets draw to the page.
LayoutContainer lc = new LayoutContainer();//Also tested with Field<?>
From my quick reading of Component.onAttach(), it appears that the dummy is removed from its location, and the Component is drawn in its place. However, as far as I can tell, the contents of dummy are never attached in any way. Is this an invalid use of the prerender getElement() call? And if so, what is a valid use of getElement() before the element is rendered?
You need to extend LayoutContainer and override the onRender method. You could also listen to the render event and add your addtional content in that event. There is no other way with the componenetmodel of GXT, as it uses lazy rendering.
I am closing this issue.
Thanks for the quick reply - what is the purpose of the dummy element then?
It is needed so that GXT components work with GWT widgets.