English 中文(简体)
Alfresco 网络文稿: 未使用模式脚本
原标题:Alfresco webscript: model script not used
  • 时间:2012-05-25 09:31:44
  •  标签:
  • alfresco

所以我有一张有以下文件的网页:

  • xyz.post.desc.xml
  • xyz.post.json.ftl
  • xyz.post.json.js

众议员说:

<webscript>
  <shortname>xxx</shortname>
  <description>xxx</description>
  <url>/my/url/xyz?uri={id}</url>
  <format default="json">argument</format>
  <lifecycle>draft_public_api</lifecycle>
  <authentication>user</authentication>
  <transaction>none</transaction>
  <family>my/family</family>
</webscript>

在我的js,我这样做:

model.foo = "bar"

然后在我的FTL里

${foo}

我有一个FTL例外 说FOO是未定义的 我现在很确定 我不执行 JS 文件本身。

为何在评价模板之前没有运行模型?

注释: 从url/alfresco/ service/ webscript 列表中, 如果我去查看 xyz 的细节。 posI 可以看到相关的. js 内容 。

最佳回答

对于记录来说,它只是我忘了通过:Ajax POPST方法的 referenceContentType: Alfresco. util.Ajax.Json

问题回答

json.js不是你的模型, 您的模型应该是xyz. post.js

所以没有定义富豪是无法忘怀的。

请查看"http://wiki.alfresco.com/wiki/Web_Scripts# how_Do_I_Create_a_Web_Script.3F" rel=“nofollow”>Wiki 以了解更多信息





相关问题
Help to choose Alfresco or Nuxeo for DMS

I have requirement to develop DMS(Document Managemen System) with some initial requirements: If possible DMS should be open source Initially DMS should support up to 500 users System should be ...

Integrating Alfresco Flexspaces with JBOSS portal

We re working on a development of a JBoss portal. As part of the functionality, we need to integrate it with Alfresco, using a portlet. Both (portal and Alfresco) will connect to the same LDAP ...

How to get Group node in Alfresco 3.1 s Java-Backed Webscript

With Javascript Webscript, I can get a group node with the following code: var group = People.getGroup(groupname); What would be the Java-backed equivalent of this code? So far I can only get a set ...

Which is easier to extend, Alfresco or Nuxeo? [closed]

I am considering doing a rewrite of an open source project from LAMP to J2EE and integrating it with an enterprise oriented CMS as the GUI. The two most viable OSS ECM J2EE CMS platforms that I have ...

Alfresco 3 Labs: Adding a thumbnail to a document

Hey guys! Any Alfresco experts out there? I have created a document type in Alfresco and am trying to associate it with an image -- Somehow. I don t really mind how it s done - an image uploader in ...

热门标签