String url = "CategoryManagement!new.action";
if(getCategoryId() != null)
url += "?model/parentId=" + getCategoryId();
List buttons = new ArrayList();
buttons.add(new ImageButton(url, getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.newCategory"), "New Category"));
if(getCategoryId() != null)
buttons.add(new ImageButton(true, "javascript:openPopup('CategoryManagement!displayTreeForMove.action?categoryId=" + getCategoryId() + "', 'Category', 'width=400,height=600,resizable=no,status=yes');", getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.moveCategory"), "Move Category"));
buttons.add(new ImageButton(true, "javascript:submitListForm('category');", getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.deleteCategory"), "Delete Category"));
if(getCategoryId() != null)
{
String returnAddress = URLEncoder.encode(URLEncoder.encode("CategoryManagement!edit.action?categoryId=" + getCategoryId() + "&title=Category%20Details", "UTF-8"), "UTF-8");
buttons.add(getAccessRightsButton("Category", getCategoryId().toString(), returnAddress));