We have some tags under tagging console and when we change any tags the changed tags are not reflected automatically in the component unless if we open component and click on ok.
Is this the AEM behaviour or we need to add any functionality to the component as of now we have already listeners in place if edit the component then save then component will get refresh to see the changes.
Is there any way if we need the functionality whenever tags are changed the the changed tags should reflect in the component without editing the component.
Whenever the component is dragged and dropped (or added to the page), the values you author are saved in the node (generally with the component name on the page). Unless the component is opened again and edited, the authored value remains the same.
When it comes to tags, the values are stored in, /etc/tags and fetched into the component via the data-source. You can do two things here.
1. Manual Method:
Create some email notifications (using workflows or listeners) to content-authors on a particular tag path. If the tag is edited, re-edit the component to pick up the latest changes.
Pros: We can carefully do the changes wherever needed.
Cons: Time consuming if the changes are to be done in lots of places. More manual effort is needed
2. Automatic method:
Here we do the first step same. Create some listeners on a particular tag path and get the info. Once a tag is changed, the second step is to search the authored changes in a particular content path (as we will be aware where the authoring will be done), update them and save them programmatically.
Pros: Less time-consuming, minimal / no manual effort needed.
Cons: This method automatically updates the node as per the query. If there are some places where the changes are not supposed to be changed, this might create a problem (unless you are writing a greater SQL or XPATH query). Also if the changes are huge (say in 1000's) it might impact the system performance.