【问题标题】:How to add new property to JCR node through CQ.extjs?如何通过 CQ.extjs 向 JCR 节点添加新属性?
【发布时间】:2013-12-05 11:21:48
【问题描述】:

我需要向 JCR 中的现有节点添加一个新属性:来自 javascript(ExtJS) 的内容。

【问题讨论】:

  • 欢迎来到 Stack Overflow。您可以发布一些您尝试过的代码吗?

标签: extjs aem


【解决方案1】:

使用 HTTP POST 方法(通过 AJAX)和Sling POST servlet,例如:

CQ.HTTP.post('/content/path/to/my/page/jcr:content', null, { newProperty: '123' });

【讨论】:

  • 您可以使用错误处理函数来代替null,即CQ.HTTP.post('/content/path/to/my/page/jcr:content', function(options, success, response){if (!success){alert('Could not save data');}},{ newProperty: '123' });
  • 嗨 Tomek,你能回答这个问题吗stackoverflow.com/questions/29745246/…
猜你喜欢
  • 2023-03-27
  • 1970-01-01
  • 2014-02-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多