In lot of applications we need multi-level category management. In this example I have created an interface to manage multi-level categories. In this interface you can manage, up to which level you would allow an user to add sub-categories. You have to supply the “maxLevel” in the getCategory() function. If you don’t supply this value then it will go up to 10th level.