REST in Place

REST in Place is an AJAX Inplace-Editor that talks to RESTful controllers. It requires absolutely no additional server-side code if your controller fulfills the following REST preconditions:

  • It uses the HTTP PUT method to update a record
  • It delivers an object in JSON form for requests with “Accept: application/json” headers

The editor works by PUTting the updated value to the server and GETting the updated record afterwards to display the updated value. That way any authentication methods or otherwise funky workflows in your controllers are used for the inplace-editors requests.

To save the additional GET request, you can take the shortcut of returning the updated record in the response to the PUT request. See the testapp for an example.

Key Links

Tags: Editor, JavaScript, other



/apitools/rest_in_place.php