Tags:
create new tag
view all tags

RestPlugin

Full implementation of REST - starting with FormFields

Usage

This plugin begins the task of creating a real REST URI engine for TWiki. It uses a TWiki:Codev.TopicObjectModel addressing scheme based on the IfStatements and QuerySearch syntax, and then enable both the retriving and setting / creation of topics and parts of topics.

Initially, it will be implemented using Dojotoolkit's Diji InlineEdit component, and apply just to formfields. This should give us a strong basis to extend the work to all topic fragments.

Examples

FORMFIELD

This allows you to change values in TWiki Forms without leaving the current topic - useful for reports and inline data-wiki applications. This syntax will be simplified in future.

This example alows you to view, and change the Summary Field in BugItem1 (from TWiki:Plugins.BugsContrib) - by just clicking on the text, changing it, and then hitting ENTER

Summary field not found

%FORMFIELD{
    "Summary" 
    topic="Sandbox.BugItem1" 
    default="(not set)" 
    alttext="Summary field not found"
    format="<span id='Sandbox.BugItem1:FIELD.Summary' class="RestPluginEditable" dojoType='dijit.InlineEditBox' onChange='myHandler(this.id,arguments[0])'>$value</span>"
}%

Inline edit of forms in topic.

If you have installed this plugin, enabled it, and set SKIN=dojo,pattern then you can also goto BugItem1, and edit each of the formfields directly.

Customisation

To make customisation possible, the javascript, and the formtables rendering is defined using the restpluginscript.tmpl and formtables.dojo.tmpl templates. To create your own implementations, create a new TWiki Contrib that contains your javascript (in pub) and templates to activate them. Then set your SKIN to include your templates.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running.

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running.

Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the BuildContrib.

  • If you have TWiki 4.2 or later, you can install from the configure interface (Go to Plugins->Find More Extensions)
  • If you have any problems, then you can still install manually from the command-line:
    1. Download one of the .zip or .tgz archives
    2. Unpack the archive in the root directory of your TWiki installation.
    3. Run the installer script ( perl <module>_installer )
    4. Run configure and enable the module, if it is a plugin.
    5. Repeat for any missing dependencies.
  • If you are still having problems, then instead of running the installer script:
    1. Make sure that the file permissions allow the webserver user to access all files.
    2. Check in any installed files that have existing ,v files in your existing install (take care not to lock the files when you check in)
    3. Manually edit LocalSite.cfg to set any configuration variables.

Plugin Info

Plugin Author: TWiki:Main.SvenDowideit - http://distributedINFORMATION.com a WikiRing founding partner
Copyright: © 2008 SvenDowideit@distributedINFORMATIONPLEASENOSPAM.com;
© 2008-2010, TWiki:TWiki/TWikiContributor
Gear Icon based on eXperience Crystal, by David Christian Berg
License: GPL (Gnu General Public License)
Plugin Version: 2010-05-26 v1.1
Change History:  
2010-05-26: TWikibug:Item6433 - doc improvements
2008-03-19: Initial version
Dependencies:
NameVersionDescription
TWiki::Contrib::DojoToolkitContrib>=1.0DojoToolkit release 1.0
Plugin Home: http://twiki.org/cgi-bin/view/Plugins/RestPlugin
Feedback: http://twiki.org/cgi-bin/view/Plugins/RestPluginDev
Appraisal: http://twiki.org/cgi-bin/view/Plugins/RestPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 RestPlugin.md5 r3 r2 r1 manage 0.1 K 2010-05-27 - 05:34 PeterThoeny  
Compressed Zip archivetgz RestPlugin.tgz r3 r2 r1 manage 68.6 K 2010-05-27 - 05:34 PeterThoeny  
Compressed Zip archivezip RestPlugin.zip r3 r2 r1 manage 70.6 K 2010-05-27 - 05:34 PeterThoeny  
Unknown file formatext RestPlugin_installer r2 r1 manage 3.8 K 2010-05-27 - 05:34 PeterThoeny  
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2012-05-14 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.