After calling a function from rich:commandbutton, I clear the "Desktop" component tree and add some new components within this function programmically. It works fine, BUT the dnd:panel defined in the jsp still stays. I really don't understand why this happens when the component tree is cleared firstly. Funny thing is only rich components stay. If I use jsf standart component it will be properly removed after clearing the "Desktop".children.
Thank you for any help in advance!
PS. <dnd:panel> is a <rich:panel>, I use dnd because there was a conflict when specifying the new namespace
a small progress here, I managed to redraw the panel correctly, now only the existing children in the component tree show.
<a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender" /> is my solution, ,that has its limitations too. If anyone could explain why this is happening, please do.