parent.add(lc);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.

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?

By way of clarification, my intent is to draw something extra to the element, like help text, but in such a way as to not interfere with the normal drawing code. Were the render complete, I would be able to use getElement() to do exactly this - this gets me around an extra event attachment - in Javascript these aren't a big deal, but in Java these make for rather ugly beasts - the first two lines of my example code need to be wrapped in three or four lines of callback creation and attachment code.

Thanks,
Colin

sven

16 Jun 2009, 1:57 PM

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.

Colin Alworth

16 Jun 2009, 2:02 PM

Thanks for the quick reply - what is the purpose of the dummy element then?