06-07-2018 06:15 AM
Hi,
I have a tree of elements. When creating or deleting items, the tree is updated as it should, but when I change the name of the element, I want the element to be displayed with a new name in the tree. I tried to publish a topic similar to the case with the addition of a new element or the deletion of this one. When I edit name I see that the parent element of the tree collapses and unfolds, but the name doesn't change.
For example, I have such tree (using my custom ChildRequestPublishTopic). After changing the name of the element (for example named "sub222"), I want to reload its parent element and show the new name of the element.
For rendering the tree I use my custom widget that clones an "alfresco/navigation/PathTree" widget and subscribe to onCreate and onDelete:
this.alfSubscribe("MY_ITEM_CREATED", lang.hitch(this, this.onContentCreated));
this.alfSubscribe("MY_ITEM_DELETED", lang.hitch(this, this.onContentDeleted));
It works fine when I create a new tree item or delete one, but when I change the name of an item I try to publish "MY_ITEM_CREATED" or "MY_ITEM_DELETED" with payload, but it doesn't help. I can see that parent item (for example-"22") tries to refresh (collapses and expands), but the name doesn't change. In the log I can see that it has requested child items and got a correct new name of the item.
07-27-2018 08:57 AM
I have to modify function
refreshTreeNode: function alfresco_navigation_PathTree__refreshTreeNode
and after collapse tree I add
delete this.tree._itemNodesMap[treeNode.getIdentity()];
to delete its saved values.
06-12-2018 11:42 PM
Screenshots and sample code might make it easier for others to provide assistance with this.
06-13-2018 11:16 AM
done
07-27-2018 08:57 AM
I have to modify function
refreshTreeNode: function alfresco_navigation_PathTree__refreshTreeNode
and after collapse tree I add
delete this.tree._itemNodesMap[treeNode.getIdentity()];
to delete its saved values.
04-09-2020 07:09 PM
How did you do to customize the icons?
Explore our Alfresco products with the links below. Use labels to filter content by product module.