2
votes

I created custom javascript root node (storeService) in repository and want to access it from share?

The line I haved added in share java script controller

model.storeName = storeService.getStoreInfo(storeName);

but throws referential error storeService.

1
How did you create it? Can you find it using the NodeBrowser? - Gagravarr

1 Answers

2
votes

You cannot create a custom root-scoped JavaScript object in the repository tier (the Alfresco WAR) and then access it from the Share tier (the Share WAR). Those are two completely different contexts.

One way to work around this would be to write a web script on the repository tier that leverages your custom root-scoped object. You can then invoke that web script from the share tier.