Hi,
On 30.03.2010 22:15, Ray Davis wrote:
> All operations performed by the SlingPostServlet are mutually exclusive.
> In particular, a request which moves a node or copies a node cannot
> change or add a property of that node.
>
> For example:
>
> curl -u admin:admin -F ":operation"=move \
> -F ":dest"="/content/anotherpath" \
> -F myprop=newval \
> http://localhost:8080/content/mynode
The question here is: where do you want to the myprop property be set ?
on the /content/mynode node (which is being moved away, but is the
official target) or the new /content/anotherpath node ?
But, the default operation supports your use case:
curl -u admin:admin \
-F "anotherp...@movefrom=mynode" \
-F "anotherpath/myprop=newval" \
http://localhost:8080/content
Regards
Felix
> curl -u admin:admin http://localhost:8080/content/anotherpath.json
> # {"myprop":"oldval","jcr:primaryType":"nt:unstructured"}
>
> When I stop to think about it, this seems OK. But since it's not
> completely obvious at first glance and since ignored properties aren't
> called out in log messages, would someone with site edit access mind
> documenting the restriction at
> "http://sling.apache.org/site/manipulating-content-the-slingpostservlet.html"?
I added this to the site:
Please note that operations are mutually exclusive. For a single
POST request only one operation may be executed. Operations also
only consume the request parameters as described below. Any excess
parameters are silently ignored.
Regards
Felix
>
>
> Thanks,
> Ray
>