Alfresco Java script API Reference error 'document' is not found

无人久伴 提交于 2019-12-12 03:46:29

问题


My apologies for being a newbie. I have configured javascript api amps and I can access java script console via admin tools. My challenge is that for 'document', 'search', logger and 'companyhome' I am an receiving reference error e.g reference error 'document' is not defined. I have been reading alfresco documentation and they show that you have to access it using javascript server side. how can i do that in alfresco or how can overcome these errors


回答1:


If you are using javascript console. There will be action available on each of the documents "open in javascript console" If you click on that it will open up javascript console for you with context set with selected document.

Now "document" object points to current document on which you have clicked that action. You should also be able to see all API's associated with it by just adding dot after document.

Point is those root objects like "companyhome","document" etc.. are available on server side javascript.

You can find server side javascript two places.

  1. Under company home>Data dictionary> Script (From here you can associate them with rule) .
  2. Controller of any javascript based webscript.


来源:https://stackoverflow.com/questions/37582453/alfresco-java-script-api-reference-error-document-is-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!