[ 
https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565495#action_12565495
 ] 

Felix Meschberger commented on SLING-213:
-----------------------------------------

Applied modified patch in Rev. 618397:

Default response is HTML response and elements with well-known ID tags:

    Status : status code, e.g. 200
    Message : status code message, e.g. OK
    Location : URL to created/modified Resource, e.g. http://host/a/b/c
    ParentLocation: URL to parent of created/modified Resource, e.g. 
http://host/a/b
    Path : Absolute path of created/modified Resource, e.g. /a/b/c
    Referer : Referer header of POST request
    ChangeLog : The operations applied, list of add, removed, modify

All values are available as element content of the respective DOM elements, the 
elements are available by getElementById


modified ujax:redirect support

   (1) ujax:redirect parameter not set: Default HTML response, see above
   (2) ujax:redirect parameter set to any URL : Temporary redirect (302) to the 
given URL
   (3) ujax:redirect parameter contains "*" : Temporary redirect (302) to the 
URL where "*" is replaced with the
                       name (Node.getName()) of the Resource created/modified.

Example for (3): Given a node with name "1234" is created:

    ujax:redirect=*   ==> redirect to "1234"
    ujax:redirect=*.html   ==> redirect to "1234.html"
    ujax:redirect=*/suffix.pdf   ==> redirect to "1234/suffix.pdf"
    ujax:redirect=prefix/*/suffix.pdf  ==> redirect to "prefix/1234/suffix.pdf"

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather 
> than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on 
> the modifications.
> will provide a patch for the post servlet that responds with that status 
> page. the old redirect behavior can still be achieved by sending a 
> ujax:redirect="*" input parameter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to