[ https://issues.apache.org/jira/browse/SLING-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536442 ]
Lars Trieloff commented on SLING-73: ------------------------------------ I think the default behavior should be to save the session as this is what most people want to do. As an additional convenience method I would add a save() and rollback() method to sling helper, so you can simply add a <% sling.save() %> at the end of every page, or even better only a <% sling.rollback() %> if something went wrong, as I suppose a <% sling.save() %> is forgotten easily and will lead to lots of noise on the user mailing list. > Provided SlingRequestContext to scripts > --------------------------------------- > > Key: SLING-73 > URL: https://issues.apache.org/jira/browse/SLING-73 > Project: Sling > Issue Type: Bug > Components: microsling > Reporter: Lars Trieloff > Assignee: Felix Meschberger > Attachments: microsling-save-session-on-post.patch, POST.esp > > > POST scripts (e.g. attached POST.js) cannot have side-effects because the > session is not saved after processing the script. Unfortunately the session > is not made available to the script so the script cannot save the session > itself (which I would consider an ugly workaround). > If the SlingRequestContext would be provided as a scripting variable, the > session would be available and could be saved. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.