[
https://issues.apache.org/jira/browse/SLING-1137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762760#action_12762760
]
Alexander Klimetschek commented on SLING-1137:
----------------------------------------------
You can create a hierarchy with a single post request, it's only the client
that has to know how it should look like.
For example, a post to
/content/new/path/to/something
with jcr:primaryType=my:nodetype and other properties set, will create the path
(assuming only /content exists) /content/new/path/to with nt:unstructured node
as node type.
To define nodetypes and properties for the intermediary nodes, you can adjust
the post to go to
/content
and set
new/jcr:primaryType = nt:folder
new/path/jcr:primaryType = nt:folder
etc.
If you are stuck with the post to the full path, you can also use absolute
paths in the fields (AFAIK):
/content/new/jcr:primaryType = nt:folder
> Support hierarchical child node creation from SlingPostServlet
> --------------------------------------------------------------
>
> Key: SLING-1137
> URL: https://issues.apache.org/jira/browse/SLING-1137
> Project: Sling
> Issue Type: Improvement
> Components: Servlets
> Reporter: Mark Baker
> Priority: Minor
>
> The default node creation functionality on "/" terminated paths via the
> SlingPostServlet doesn't scale very well as it only supports creation of
> nodes immediately under the targeted path. So, for example, when using this
> via a CQ form to capture form responses in the repository, a site can
> potentially have thousands of child nodes, leading to well known performance
> problems.
> I think it would be useful to offer an option for the servlet to save a
> hierarchy of nodes, perhaps via the common convention of using the first 4
> characters of the would-be node id to create a 2 level hierarchy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.