Correct - Something similiar to this -- Scott's Digital Community: Creating a Custom Watched Folder Service for Adobe Experience Manager 6.3 AEM after all is a Java platform and you can build a Java solution.
Look at the Article that Ratna pointed you too. You can populate a Select Drop down via the WCMUsePojo class. This works! Manipulating the DOM via JS you showed is not best practice.
AEM does not have a tool for every use case. However - using the AEM APIs, you can build custom functionality to address use cases, like this one - as Arun correctly states.
Try rebuilding your bundle using Maven 13 Archetype.Creating an Adobe Experience Manager 6.4 Project using Adobe Maven Archetype 13The benefit of this is it builds new POMs and new project. I have not seen these reported errors that you are referring to when a new Maven 13 project is built. Trying t...