You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Andrew Jaquith (JIRA)" <ji...@apache.org> on 2010/02/17 04:22:27 UTC

[jira] Commented: (JSPWIKI-436) Auto-save during editing

    [ https://issues.apache.org/jira/browse/JSPWIKI-436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834622#action_12834622 ] 

Andrew Jaquith commented on JSPWIKI-436:
----------------------------------------

If and when someone takes a whack at solving this issue, the auto-save function should use the JavaScript Stripes.submitFormEvent() function to submit the current form contents with the parameters intact. This is important because of the hidden spam-protect parameters injected by the wiki:spamProtect tag.

For example, the auto-save code might do this:

var autosaver = Stripes.submitFormEvent( "editForm", "autosave", "autosaveMessage", callback )

...where:
* "editForm" is the ID of the textarea's enclosing form
* "autosave" is the name of the EditActionBean event handler method autosave() that performs the actual save
* "autosaveMessage" is the div element that holds any response messages
* "callback" is a callback function that executes (if needed) when the AJAX call completes

The autosave() method should also be annoted with @SpamProtect (like save() is) to ensure that we check for the spam parameters.

> Auto-save during editing
> ------------------------
>
>                 Key: JSPWIKI-436
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-436
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Core & storage
>    Affects Versions: 2.8
>            Reporter: Dirk Frederickx
>            Priority: Minor
>             Fix For: 3.0
>
>
> Allow to auto-save the page during (long) edit-sessions.
> This requires the jspwiki-engine to support Minor -Edit [JSPWIKI-435]	such that no new versions are created for each auto-save operations.
> The auto-save will be performed through an ajax call to the backend.
> {noformat}
> POST:
> {"id":nnn,"method":"edit.saveText","params":["markup",xxxx]}
> {noformat}

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