@Delete和@MoveFrom在一个请求中

时间:2014-07-23 12:21:26

标签: java cq5 sling aem

我正在尝试在多字段xtype中使用html5smartimage小部件实现轮播。让我来描述它是如何工作的。 数据结构如下:

\carousel
 \slides
  \1
   |image1
   |image2
   |...
  \2
   |...

在html5smartimage中,实际上有两个请求来保存图像。第一个将带有* .sftmp扩展名的文件上传到临时路径(carousel-temp / slides / 1 / image1),稍后,当您在对话框中单击“确定”时,将发出第二个请求,它包含以下postData:

./sling:resourceType:project1/components/carousel
./jcr:lastModified:
./jcr:lastModifiedBy:
_charset_:utf-8
:status:browser
./slides@Delete:
:assetname:
./slides/1/image1/fileReference:
./slides/1/image1/file@MoveFrom:/content/project1/en_GB/jcr:content/content-carousel/carousel_temp/slides/1/image1/file.sftmp
./slides/1/image1/imageMap:
./slides/1/image1/imageCrop:
./slides/1/image1/imageRotate:0
:assetname:
./slides/1/image2/fileReference:
./slides/1/jcr:lastModified:
./slides/1/jcr:lastModifiedBy:
./slides/1/image2/imageMap:
./slides/1/image2/imageCrop:
./slides/1/image2/imageRotate:0
./slides/1/image1/sling:resourceType:foundation/components/image
./slides/1/image2/sling:resourceType:foundation/components/image
:cq:undoblobs:update:/content/project1/en_GB/jcr:content/content-carousel/carousel/./slides/1/image1/slides/1/image1
:cq:undoblobs:update:/content/project1/en_GB/jcr:content/content-carousel/carousel/./slides/1/image2/slides/1/image2

作为此请求的结果,看起来@moveFrom将图像从临时路径移动到image1 / file节点,但是目标节点的父节点被./slides@Delete指令删除。我的理论得到了Sling返回的更改日志的证实:

moved("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/image1/file.sftmp", "/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/image1/file");
deleted("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/sling:resourceType");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/jcr:lastModified");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/jcr:lastModifiedBy");
created("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides");
created("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1");
created("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/image1");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/image1/imageRotate");
created("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/image2");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/jcr:lastModified");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/jcr:lastModifiedBy");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/image2/imageRotate");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/image1/sling:resourceType");
modified("/content/project1/en_GB/jcr:content/content-carousel/carousel/slides/1/image2/sling:resourceType");
modified("/content/project1/en_GB/jcr:content/cq:lastModified");
modified("/content/project1/en_GB/jcr:content/cq:lastModifiedBy")

有没有办法改变@Delete和@moveFrom后缀的优先级来避免y问题? 提前谢谢。

0 个答案:

没有答案