fix composite popupPanel and move addRootDirectory to popupPanel