//Delete the old categories
InodeFactory.deleteChildrenOfClass(userProxy,Category.class);
//Save the new categories
MyAccountForm form = (MyAccountForm) lf;
String[] categories = form.getCategory();
if (UtilMethods.isSet(categories)) {
for(int i = 0;i < categories.length;i++) {
Category category = categoryAPI.find(categories[i], user, true);
if(InodeUtils.isSet(category.getInode())) {
categoryAPI.addChild(userProxy, category, user, true);