2.1 wuwei

WuWei is a toolkit for building Ajax web pages and web sites in Common Lisp. It’s designed to be light-weight, a toolkit rather than a platform. Features include: Continuation-based AJAX user interfaces; Server-side DOM operations (add/remove elements, visual fades, drag and drop); High-level interfaces to in-place-editing and autocomplete widgets; Login and session management

6.1.3 Functions

Generate an HTML autocompletion field. Arguments below (all except completions-url are optional)
ID - the HTML ID of the element
NAME - the name of the field
VALUE - the current value of the field
TEXTAREA - T to use a multi-line textarea
OPTIONS - additional options to pass to the scriptaculous Ajax.Autocompleter object.
INPUT-OPTIONS - options to pass to the input or textarea tag (eg ’(("tokens" . ("," #Newline))))
COMPLETIONS-GENERATOR - a procedure that takes a prefix and returns a list of (id . name) pairs
EMBEDDED-HTML - T if strings can contain HTML markup
COMPLETIONS-URL - a URL that supplies the completions. Either this or COMPLETIONS-GENERATOR must be supplied, but not both
ON-SELECTED - a function that is called with the value, value string, and id of the selected option
UPDATE - the HTML ID of the autocompletion box
SCROLL? - If an integer, add scroll bar if more completions than this (default to 30)
SPINNER? - T to show a spinner while fetching completions

Generate a remote function (javascript Ajax call)
ex: (remote-function "/new-chunk" :params ‘(:user ,user :type (:raw ,(format nil "$(~A).value" selector-id))))
returns:
new Ajax.Request(’/new-chunk’, {"asynchronous":true,"parameters":{"user":"mt","type":$(selector23).value}}); return false;
:form If t, serialize the surrounding form; if a string serialise the form with that name; else use params
:params List of (:key1 value1 ...), ignored if :form is t
:confirm Ask user for confirmation first (value is the message)
:complete Javascript to execute when action completes
:success as :complete, but on success only
:failure as :complete, but on failure only
:before Javascript to run before the Ajax request
:after Javascript to run after the Ajax request
:spinner The ID of an elt, a spinner will be inserted after the elt before the Ajax request and removed when completed
:in-function?
:eval-scripts?
:stop-propagation? Stop propagation of events to parents. Forces :in-function? to be nil
:updater? Make an Ajax.Updater object rather than an Ajax.Request; value is dom id of item to be updated
:periodic? Make an Ajax.PeriodicalUpdater, updater? must be non-nil