hello all,
am implementing the context hub in our aem sites.
i have been checking the following condition:
ContextHub.eventing.on(ContextHub.Constants.EVENT_INITIALIZED + ":STORENAME", function(event, data) {
this condition is never true.
May i know what is wrong here.
Views
Replies
Total Likes
Can you please post your full code example - including the full Java file. The issue may be it's in an OSGi method that is never fired.
Views
Replies
Total Likes
Also - we are releasing an AEM API article on this subject in the next week or so.
Views
Replies
Total Likes
thank you for the quick reply.
Am using the following check, after store is created and configured.:
if (window.ContextHub) {
ContextHub.eventing.on("data" + ":store",function(event,data) {
setHeader.call(this);
});
ContextHub.eventing.on(ContextHub.Constants.EVENT_DATA_UPDATE + ":profile", function(event, data) {
setHeader.call(this);
});
setHeader.call(this);
}
the both two conditions never work.
If you see the setHeader.call without any check it works fine
AM using the context hub values and setting them in the setheader.call method.
When i do the following on the browser console
ContextHub.getStore('Storename').getTree():
i see data.
i don't know whats wrong the above checks:(
this check is used in the js files of my code.
Views
Replies
Total Likes
Did you set a break point in the browser and step through the code. THat may help you debug the issue.
Views
Replies
Total Likes
yes i did:(
DO i have to enable any configurations in OSGI to make this work?
Views
Replies
Total Likes
Views
Likes
Replies