sling-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Joschko <markus.josc...@gmail.com>
Subject Create a node in a different path and redirect to that
Date Fri, 21 Jan 2011 11:58:30 GMT
Hi,
I face some difficulties in realizing the following case:

I have a node to which I want to add children. The problem is, that
(depending on the content of the to be created node) it is not added
to the node directly but a folder is created to which the node is
added. Like that

+ parent
     + folderA (dynamically created)
         - childABC
     + folderB (dynamically created)
         -childBAC

Because the folders might not be available, I post to parent/* and
registered a postprocessor to create the folder and move the just
created child to the corresponding folder.
That works fine. However the redirect url is still pointing to the
previous location (parent/childABC) instead of
parent/folderA/childABC.
And I can't find a way to modify the location of the response within
the postprocessor.

So I wonder whether I am on the right track or should choose a
different approach. Alternatively I could create my own postoperation
but that seems to be cumbersome as extending from ModifyOperation
isn't easy because of the dependencies in the constructor and
AbstractCreateOperation is package private. So I would basically need
to copy code directly.

Any thoughts on this?

Thanks,
 Markus

Mime
View raw message