Alfresco Javascript Api SetPermission如何创建URL?

时间:2015-01-13 15:21:04

标签: javascript api url alfresco

我想使用Alfresco Javascript API添加权限,我喜欢here

知道我想改变这样的网址:

<url>/set/folder/permission/?folderName={folderName}&permi;={permi?}&username;={username?}</url>

但我有一个错误:

00130088 Failed to parse web script description document org/alfresco/sample/setPermission.get.desc.xml ; Error on line 4 of document : The entity "permi" was referenced, but not declared. Nested exception: The entity "permi" was referenced, but not declared. (workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts/org/alfresco/sample/setPermission.get.desc.xml)

1 个答案:

答案 0 :(得分:0)

你的XML错了。假设您需要带有可选参数的URL:

  • FOLDERNAME
  • permi
  • 用户名

然后你的url应该是这样的:

<url>/set/folder/permission/?folderName={folderName}&amp;permi={permi?}&amp;username={username?}</url>

&amp;是网址中&的XML转义形式,而不是一些神奇的Alfresco!