The caveman2-widgets Reference Manual

This is the caveman2-widgets Reference Manual, version 0.5, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 16:34:18 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 caveman2-widgets

Weblocks like widgets for caveman2.

Author

Richard Paul Bäck

License

LLGPL

Long Description

* caveman2-widgets
** What is it
caveman2-widgets is an extension library to [[https://github.com/fukamachi/caveman][caveman2]]. It is influenced
by [[https://github.com/skypher/weblocks][Weblocks]] and introduces its widget system for the developer. By
only using its widget concept it does not control the developer as
much as Weblocks itself. For people who don’t now Weblocks’ approach:
the developer can create web applications (more) like a normal GUI
application by using subclassable widgets which can have callbacks and
their like. Each Widget is only responsible for its own content but
might interfere with other objects through a given context.
#+LATEX: \\\\
But the really cool part is that the framework automatically creates
your site for dynamically (JavaScript based) access *and* normal
access. For the dynamic approach this means that you don’t have to
manage or even care to refresh parts of your website, because widgets
can do that by themselves!

#+CAPTION: Quick overview where caveman2-widgets is in the caveman2 ecosystem
#+ATTR_LATEX: :width 10cm
#+LABEL: fig:overview
[[overview.jpg]]

** Installation
You can use caveman2-widgets with Quicklisp!
#+BEGIN_SRC lisp
(ql:quickload :caveman2-widgets)
#+END_SRC

If you want to contribute or be always up to date you can clone this
git-repository into "~/quicklisp/local-projects" or (if you are using
[[https://github.com/roswell/roswell][Roswell]]) "~/.roswell/local-projects" to QUICKLOAD it.
** See also
- [[https://github.com/ritschmaster/caveman2-widgets-bootstrap][caveman2-widgets-bootstrap]] :: Introduces new widgets that use [[https://getbootstrap.com/][Bootstrap]].
- [[https://github.com/ritschmaster/caveman2-widgets-blog][caveman2-widgets-blog]] :: An example application to demonstrate caveman2-widgets

** Websites running caveman2-widgets
- [[https://free-your-pc.com][Free-your-PC]] :: My personal website where I have among others a web
shop

Let me know if you use it too, to include you here!
** Contributions
You are very welcomed to contribute to this project! You can contribute by:
- Using it and spreading the word!
- Finding flaws and submitting [[https://github.com/ritschmaster/caveman2-widgets/issues][Issues]].
- Finding flaws and removing them (as [[https://github.com/ritschmaster/caveman2-widgets/pulls][Pull-requests]]).
- Adding new features (as [[https://github.com/ritschmaster/caveman2-widgets/pulls][Pull-requests]]). Before shooting in the dark create either an [[https://github.com/ritschmaster/caveman2-widgets/issues][Issues]] or mail me. Maybe your feature is on my agenda too.
- Showing your appreciation through a donation (please mail me for my
IBAN). It may be a donation in kind too! Via PayPal you can donate
to: richard.baeck@free-your-pc.com

If you add new features, please document them. Otherwise other
developers will have a hard time using this framework.
** Usage
*** General
The only important thing is to run the function INIT-WIDGETS with an
<APP>. If you use caveman’s MAKE-PROJECT function you will get file
called "src/web.lisp". In this file you can adapt the following:
#+BEGIN_SRC lisp

(defpackage my-caveman2-webapp.web
(:use :cl
:caveman2
:caveman2-widgets ;; easy use of the external symbols of this project
:my-caveman2-webapp.config
:my-caveman2-webapp.view
:my-caveman2-webapp.db
:datafly
:sxql)
(:export :*web*))

;; some other code

;; the following will be generated through MAKE-PROJECT but is very important:
(defclass <web> (<app>) ())
(defvar *web* (make-instance ’<web>))
(clear-routing-rules *web*)

;; the neccessary call to initialize the widgets:
(init-widgets *web*)

;; from now on you can do whatever you want
#+END_SRC

*If you create objects from your widget classes, then please always
use the MAKE-WIDGET function!* This method should be used, since it
does all the background stuff for you.

*** Global scope
There are two scopes: /global/ and /session/. The global scope
"limits" the widget to *all* users. Therefore if you create a stateful
widget the state will be displayed to all users of your site. Use
MAKE-WIDGET with :GLOBAL to get a globally scoped widget.
#+LATEX: \\\\
A very simple example of what you can do with it:
#+BEGIN_SRC lisp
(defclass <global-widget> (<widget>)
((enabled
:initform nil
:accessor enabled)))

(defmethod render-widget ((this <global-widget>))
(if (enabled this)
"<h1>enabled!</h1>"
"<h1>not enabled</h1>"))

(defvar *global-widget* (make-widget :global ’<global-widget>))

(defroute "/" ()
(render-widget *global-widget*))

(defroute "/disable" ()
(setf (enabled *global-widget*) nil)
"disabled it")

(defroute "/enable" ()
(setf (enabled *global-widget*) t)
"enabled it")
#+END_SRC

A good practice to create disposable widgets is to mark
them :GLOBAL. In the following example the widget will be created when
a user connects and will afterwards immediately be destroyed again by
the garbage collector.
#+BEGIN_SRC lisp
(defroute "/" ()
(render-widget
(make-widget :global ’<string-widget>
:text "Hello world!"))
#+END_SRC

*** Session scope
The other option is to use a /session/ scope. This is a bit more
tricky because all your /session/ widgets must be stored within the
session (but not as user of this framework). :SESSION is the keyword
for MAKE-WIDGET to get a /session/ widget. Of course you only need to
save the top level (highest) widget of a widget tree in the session
(the children will be saved where the parent is). A short overview of
the functions:
- SET-WIDGET-FOR-SESSION :: Saves a widget in the session
variable. This should be considered ONLY for session scoped
widgets.
- GET-WIDGET-FOR-SESSION :: Gets a previously saved widget from the
session variable (e.g. to render it).
- REMOVE-WIDGET-FOR-SESSION :: Removes a saved widget from the session
variable.

An example (with children):
#+BEGIN_SRC lisp
(defclass <display-id-widget> (<widget>)
())

(defmethod render-widget ((this <display-id-widget>))
(concatenate ’string
"<h3>display-id-widget id: <a href=\"/rest/display-id-widget?id="
(caveman2-widgets.widget::id this)
"\">"
(caveman2-widgets.widget::id this)
"</a></h3>"))

(defclass <session-widget> (<widget>)
((id-widget
:initform (make-widget :session ’<display-id-widget>)
:reader id-widget)))

(defmethod render-widget ((this <session-widget>))
(concatenate ’string
"<h1>The id of your widget</h1>"
"<h2>It should be different for each session</h2>"
"<p>My id: <a href=\"/rest/session-widget?id="
(caveman2-widgets.widget::id this)
"\">"
(caveman2-widgets.widget::id this)
"</a></p>"
(render-widget (id-widget this))))

(defroute "/" ()
(set-widget-for-session :session-widget
(make-widget :session ’<session-widget>))
(concatenate ’string
"<head>
<script src=\"https://code.jquery.com/jquery-2.2.2.min.js\" type=\"text/javascript\"></script>
<script src=\"/widgets/js/widgets.js\" type=\"text/javascript\"></script>
</head>"

(render-widget
(get-widget-for-session :session-widget))
(render-widget
(make-widget :global ’<button-widget>
:label "Reset session"
:callback #’(lambda ()
(remove-widget-for-session :session-widget))))))

(defroute "/reset-session" ()
(remove-widget-for-session :session-widget)
"reset your session")
#+END_SRC

*** Some default widgets and layouts
There are some helpful default widgets which may help you with your
code organisation. These are:
- <COMPOSITE-WIDGET> :: A layout which contains widgets that will be rendered
vertically.
- <HCOMPOSITE-WIDGET> :: A layout like the <COMPOSITE-WIDGET> but renders the
widgets horizontally.
- <BORDER-WIDGET> :: A layout which features sections to put widgets
in. Please note that this widget has styles in
*/static/css/widgets.css*.
- <STRING-WIDGET> :: A widget which renders only a string.
- <FUNCTION-WIDGET> :: A widget which uses a supplied function for
rendering. Therefore the supplied function has to return a
string!

A simple example:
#+BEGIN_SRC lisp
(defroute "/composite" ()
(with-html-document
(doc
(make-instance ’<header-widget>))
(setf (body doc)
(make-widget
:global ’<border-widget>
:east (make-widget :global ’<string-widget>
:text "<h2>Hello from east</h2>")
:center
(make-widget
:global ’<hcomposite-widget>
:widgets (list
(make-widget :global ’<string-widget>
:text "<h1>Hello from left</h1>")
(make-widget :global ’<function-widget>
:function
#’(lambda ()
"<h1>Hello from the mid</h1>"))
(make-widget :global ’<string-widget>
:text "<h1>Hello from right</h1>")))
:west (make-widget :global ’<string-widget>
:text "<h2>Hello from west</h2>")))))
#+END_SRC
*** Buttons and links
You can use buttons and links that call specific functions. When you
create a button/link only for a session the created route will be
guarded. Therefore only the user with the associated route may
actually access his button.
#+LATEX: \\\\
For each button there will be an URI like "/buttons/BUTTONID". You can
access buttons via POST only. Links get a URI like "/links/LINKID" and
can be accessed either by GET (get a redirect to the stored link) or
by POST (return only the value of the link). In any case the callback
function gets called - please keep that in mind.
#+LATEX: \\\\
If the return value of the link matches the current path then the side
will be reloaded entirely or, if JavaScript is enabled, the dirty
widgets will be reloaded. Please leave out the starting "/" If you
want to address a target on the localhost. E.g. you are on the page
"/test", then return "test" if you want to stay on it.
#+LATEX: \\\\
The BUTTONID and LINKID are the ID slots of the widget - which is
default a symbol generated by GENSYM. But you can change that by
giving your <CALLBACK-WIDGET> a specific ID (like in the example
below). This will ensure that the route will persist otherwise the
route for the <CALLBACK-WIDGET> will change with every restart of your
website or with every new session (depends on the scope). *Be careful,
the ID must be unique on object level, otherwise you overwrite
routes!*
#+LATEX: \\\\
An example:
#+BEGIN_SRC lisp
(defvar *got-here-by-link* nil)

(defroute "/otherpage" ()
(if *got-here-by-link*
(progn
(setf *got-here-by-link* nil)
"<h1>Got here by pressing the link</h2>")
"<h1>Got here by yourself</h2>"))

(defroute "/link-test" ()
(concatenate ’string
(render-widget
(make-widget :global ’<link-widget>
:label "Github"
:callback #’(lambda (args)
(format t "LOG: Link clicked!") "http://github.com/ritschmaster")
:target-foreign-p t ;; The link goes out of this domain
))
(render-widget
(make-widget :global ’<link-widget>
:label "Otherpage"
:id "otherpage" ;; href="/links/otherpage"
:callback #’(lambda (args)
(setf *got-here-by-link* t) "/otherpage")
:target-foreign-p t ;; The link goes out of this domain
))
(render-widget
(make-widget :global ’<button-widget>
:label "Button"
:callback #’(lambda (args)
(format t
"LOG: Button clicked!"))))))
#+END_SRC

You can create your own callback widgets too. Just look at the
<CALLBACK-WIDGET>, <BUTTON-WIDGET> classes for that.

*** Use caveman2-widgets for your entire HTML document
To make your life really easy you can create an entire HTML
document. You can either tinker your own widgets or whatever with the
<HMTL-DOCUMENT-WIDGET> and the <HEADER-WIDGET> or you can use the
handy WITH-HTML-DOCUMENT macro.

#+BEGIN_SRC lisp
(defclass <root-widget> (<body-widget>)
())

(defmethod render-widget ((this <root-widget>))
"Hello world!")

(defclass <otherpage-widget> (<body-widget>)
())

(defmethod render-widget ((this <otherpage-widget>))
"Hello from the other page!")

(defvar *header-widget* (make-instance ’<header-widget>
;; the title when this header is used
:title "Widgets test"

;; the icon when this header is used
:icon-path "/images/icon.png"

;; the following lines will be rendered in the header: :other-header-content
’("<meta name=\"author\" content=\"Richard Bäck\">"))
(defvar *root-widget* (make-widget :global ’<root-widget>))
(defvar *otherpage-widget* (make-widget :global ’<otherpage-widget>))

(defroute "/" ()
;; The *root-widget* can be accessed under:
;; /rest/root-widget?id=(caveman2-widgets.widget::id *root-widget*)
(render-widget
(make-instance ’<html-document-widget>
;; sets this specific header for this page
:header *header-widget*
:body *root-widget*)))
(defroute "/otherpage" ()
(with-html-document (doc
*header-widget*)
(setf (body doc)
*otherpage-widget*)))

#+END_SRC

*** Marking widgets dirty
You can mark specific widgets as dirty with the function
MARK-DIRTY. This means that they will be reloaded dynamically (if the
user has JavaScript is enabled). Please notice that you can mark *any*
widget as dirty. Therefore you can order JavaScript to reload global
widgets and sessioned widgets.
#+LATEX: \\\\
An example:
#+BEGIN_SRC lisp
(defclass <sessioned-widget> (<widget>)
((enabled
:initform nil
:accessor enabled)))

(defmethod render-widget ((this <sessioned-widget>))
(concatenate ’string
"<h2>Sessioned-widget:</h2>"
(if (enabled this)
"<h3>enabled!</h3>"
"<h3>not enabled</h3>")))

(defclass <my-body-widget> (<widget>)
())

(defmethod render-widget ((this <my-body-widget>))
(concatenate ’string
"<h1>MARK-DIRTY test</h1>"
(render-widget
(get-widget-for-session :sessioned-widget))
(render-widget
(make-widget
:global ’<button-widget>
:label "Enable"
:callback #’(lambda ()
(let ((sessioned-widget
(get-widget-for-session :sessioned-widget)))
(when sessioned-widget
(setf (enabled sessioned-widget) t)
(mark-dirty sessioned-widget))))))
(render-widget
(make-widget
:global ’<button-widget>
:label "Disable"
:callback #’(lambda ()
(let ((sessioned-widget
(get-widget-for-session :sessioned-widget)))
(when sessioned-widget
(setf (enabled sessioned-widget) nil)
(mark-dirty sessioned-widget))))))))

(defvar *header-widget* (make-instance ’<header-widget>
:title "Mark-dirty test"))
(defvar *my-body-widget* (make-widget :global ’<my-body-widget>))

(defroute "/mark-dirty-test" ()
(set-widget-for-session :sessioned-widget (make-widget :session ’<sessioned-widget>))
(render-widget
(make-instance ’<html-document-widget>
:header *header-widget*
:body *my-body-widget*)))
#+END_SRC

*** Navigation objects
You can create navigation objects too! The purpose of navigation
objects is that you don’t have to manage a navigation ever again!
Each navigation object contains another widget which displays the
currently selected path. If you click on a navigation link that object
is changed and refreshed (either via JavaScript or through the
link). Please keep in mind that navigation objects are *session
stateful widgets*.
#+LATEX: \\\\
Paths are only created automatically by the DEFNAV macro. The first
item in the list is the widget which will be displayed at the base
path of the navigation. You can use any string as path but be careful
to not interfere with the special paths of NINGLE
(e.g. "/:some-path"). Do not use those. The only special path you can
use is the wildcard (e.g "/*/").
#+LATEX: \\\\
A very basic example:
#+BEGIN_SRC lisp
(defvar *first-widget*
(make-widget :global ’<string-widget>
:text "<h1>Hello world from first</h1>"))

(defvar *second-widget*
(make-widget :global ’<string-widget>
:text "<h1>Hello world from second</h1>"))

(defclass <proxy-widget> (<widget>)
()
(:documentation "This class enables session based widgets for a
navigation."))

(defmethod render-widget ((this <proxy-widget>))
(set-widget-for-session :string-widget
(make-widget :session ’<string-widget>
:text "hello world"))
(render-widget (get-widget-for-session :string-widget)))

(defnav "/sophisticated/path"
((make-instance ’<header-widget>
:title "Navigation test")
(list
(list "First widget" "first" *first-widget*)
(list "Second widget" "second" *second-widget*)
(list "Third widget" "third" (make-widget :global
’<proxy-widget>))
(list "Hidden widget" "hidden"
(make-widget :global ’<string-widget>
:text "<h1>You have accessed a hidden widget!</h1>")
:hidden))
:kind ’<menu-navigation-widget>))
#+END_SRC

If the default navigation object doesn’t render as you wish, you can
subclass it and overwrite the RENDER-WIDGET method. Please notice that
you can actually very easily adjust the path where the navigation and
its widgets get rendered. The slot BASE-PATH is created for that.
#+LATEX: \\\\
There are two default navigation widgets:
- <MENU-NAVIGATION-WIDGET> :: A navigation with a menu. You can change
the menu appearance with CSS. With the :HIDDEN keyword you can
hide a path from the navigation list.
- <BLANK-NAVIGATION-WIDGET> :: A navigation without any menu. It is
controlled by the URL only - or by other widgets.
*** Table objects
You can create a table very simple. A <TABLE-WIDGET> displays *all*
items which are supplied through the PRODUCER function.
#+LATEX: \\\\
Important for the usage of tables is that you supply a PRODUCER
function. The function should return a list of <TABLE-ITEM>
objects. This function can be anything but it has to take the key
arguments:
- AMOUNT :: Tells how many items to get
- ALREADY :: Tells how many items already received
- LENGTH-P :: A flag which should tell the function to return the
available items if active.
AMOUNT and ALREADY can be seen as synonyms for FROM and TO.
#+LATEX: \\\\
A <TABLE-ITEM> object is needed for tables. The essence of those
objects is that they can be translated to lists through the generic
function GET-AS-LIST. Therefore you don’t have to subclass
<TABLE-ITEM> at all just to add an implementation of GET-AS-LIST for
your used class.
#+LATEX: \\\\
For the <TABLE-Widget> consider the following example:
#+BEGIN_SRC lisp
(defclass <my-item> (<table-item>)
((id
:initarg :id
:reader id)
(name
:initarg :name
:reader name)
(description
:initarg :description
:reader description)))

(defmethod get-as-list ((this <my-item>))
(list :id (id this)
:name (name this)
:description (description this)))

(defun producer (&key
amount
(already 0)
(length-p nil))
(if (null length-p)
(let ((all ’()))
(if (null amount)
(loop for x from 1 to 1000 do
(setf all
(append all
(list
(make-instance ’<my-item>
:id x
:name (format nil "~a" x)
:description (format nil "The ~a. item." x))))))
(loop for x from (+ already 1) to (+ already amount) do
(setf all
(append all
(list
(make-instance ’<my-item>
:id x
:name (format nil "~a" x)
:description (format nil "The ~a. item." x)))))))
all)
1000))

(defvar *table-widget*
(make-widget :global ’<table-widget>
:producer ’producer
:column-descriptions (list
(list :name "Name")
(list :description "Description"))))

(defroute "/table" ()
(with-html-document (doc
(make-instance ’<header-widget>))
(setf (body doc)
*table-widget*)))
#+END_SRC

*** Viewgrids
The <VIEWGRID-WIDGET> is used to display a bulk of heterogenous
items. The items must implement the RENDER-AS method. The
<VIEWGRID-WIDGET> calls RENDER-AS with its VIEW slot. Therefore you
have provide an implementation for the keyword supplied by VIEW in
your <VIEWGRID-WIDGET>.
#+LATEX: \\\\
You can limit the displayed items with the MAX-ITEMS-TO-DISPLAY
slot. If this slot is active the items are delivered on several pages
instead on only one. If you supply additionally the DISPLAY-SELECTOR
with the URI path on which the <VIEWGRID-WIDGET> object is rendered,
then selectable page numbers are displayed on the bottom too.
#+LATEX: \\\\
Each item can be accessed. When accessing the item a specific
given function is called with the item as parameter.
#+LATEX: \\\\
The following example covers all functionality:
#+BEGIN_SRC lisp
(defclass <my-viewgrid-item> (<viewgrid-item>)
((id
:initarg :id
:reader id)
(name
:initarg :name
:reader name)
(description
:initarg :description
:reader description)))

(defmethod render-as ((this <my-viewgrid-item>) (view (eql :short)))
(format nil "<div style=\"padding-bottom:30px\">id: ~a<br>name: ~a<br>desc: ~a<div>"
(id this) (name this) (description this)))

(defun producer (&key
(from 0)
(to nil)
(length-p nil))
(let ((all ’()))
(loop for x from 1 to 35 do
(setf all
(append all
(list
(make-instance ’<my-viewgrid-item>
:id x
:name (format nil "~a" x)
:description (format nil "The ~a. item." x))))))
(cond
(length-p
(length all))
((and from (not to))
(mapcan #’(lambda (item)
(if (>= (id item) from)
(list item)
nil))
all))
((and from to)
(mapcan #’(lambda (item)
(if (and (>= (id item) from) (< (id item) to))
(list item)
nil))
all)))))

(defroute "/viewgrid" ()
(with-html-document (doc
(make-instance ’<header-widget>))
(set-widget-for-session
:viewgrid
(make-widget :session ’<viewgrid-widget>
:producer #’producer
:view :short
:max-items-to-display 11
:display-selector "viewgrid"
:on-view #’(lambda (item)
(format t
(render-as item :short))
"viewgrid")))
(setf (body doc)
(get-widget-for-session :viewgrid))))
#+END_SRC
*** Forms
Forms can be pretty annoying but with the <FORM-WIDGET> you don’t have
to care for anything but for the naming of the inputs ever again. Each
<FORM-WIDGET> consists of 0 to n <FORM-FIELD> objects. If you have 0
<FORM-FIELD> objects it essentially only behaves like a
<BUTTON-WIDGET>.
#+LATEX: \\\\
<FORM-FIELD> is the base class for fields. Fields can be:
- <INPUT-FIELD> :: Is basically an abstraction of the HTML input-tag.
- <SELECT-FIELD> :: Consists of <OPTION-FIELD> objects.

Of course you can implement your own <FORM-FIELD> classes too! But
keep in mind that *the default <FORM-FIELD> already implements
constraints*.
#+LATEX: \\\\
To understand how constraints for forms work an examination of the
available slots for <FORM-FIELD> objects is necessary:
- REQUIRED :: A non-nil value indicates that this field has to have
some value.
- SUPPLIED :: Will be set NIL by SET-REQUIRED-PRESENT and set T by
RENDER-WIDGET. It is NIL if the field is not supplied
and is therefore not dependent on REQUIRED. It should
tell the server whether an parameter was passed or not.
- CHECK-FUNCTION :: Will be called by SET-REQUIRED-PRESENT and check
if the passed value by the client is "correct". It
is a lambda with one argument, which is the passed
string from the client. Should return NIL if the
passed string was not correct and a non-nil value
otherwise.
- ERROR-HAPPENED :: Will be set to T by SET-REQUIRED-PRESENT if the
CHECK-FUNCTION did not succeed. The rendering the
form will set it to NIL again.
- ERROR-MESSAGE :: The message that will be displayed if
ERROR-HAPPENED is T.

You don’t have to actually care for that procedure as the
<FORM-WIDGET> calls this the SET-REQUIRED-PRESENT by itself. But it
can be helpful to understand the entire process of checking the user
input. The only thing to really memorize here is that *the given
callback only gets called if all required fields where supplied and
those fields where supplied correctly*.
#+LATEX: \\\\
Consider the following example for additional help:
#+BEGIN_SRC lisp
(defvar *password-field*
(make-instance ’<input-field>
:input-type "password"
:check-function
#’(lambda (pass)
(if (<= (length pass)
2)
nil
t))
:error-message "Has to be longer than 2"
:name "password"
:value ""))

(defvar *form-widget*
(let ((text-field (make-instance ’<input-field>
:input-type "text"
:name "text"
:value ""
:required t))
(choice-field (make-instance
’<select-field>
:name "selection"
:options
(list (make-instance ’<option-field>
:value "first")
(make-instance ’<option-field>
:value "second"
:display-value "Other")))))
(make-widget :global ’<form-widget>
:input-fields (list
text-field
*password-field*
choice-field)
:label "Submit"
:callback
#’(lambda (args)
(format t "received correct values:
~a
————-"
args)))))

(defroute "/form" ()
(with-html-document (doc
(make-instance ’<header-widget>))
(setf (body doc)
*form-widget*)))
#+END_SRC
*** Protecting widgets
This library also enables you to protect widgets. Each widget has an
associated list of keywords which indicate the levels/circles of
authorization an requester needs.
#+LATEX: \\\\
By default the protection is an empty list (therefore NIL), which
means that everybody can access your widget. If the protection is
non-nil the non-nil value is a list of keywords which refers to a list
of keywords stored in the session. So if the session contains the
required keyword in its list the requester can access the
widget. Otherwise he is denied (throws a 403 code).
#+LATEX: \\\\
The <WIDGET> class holds the PROTECTED slot. This slots value
indicates the needed token in the session. But caveman2-widgets
supplies an additional, specific *PROTECT-WIDGET* method which should be
used. You can supply the following parameters:
- :LOGIN :: Protects the widget by the default login-widget
- A keyword in general :: Protects the widget with this keyword (adds
it)
- A list of keywords :: Protects the widget with this keywords (adds
them)

#+BEGIN_SRC lisp
(defvar *specific-protected-widget*
(protect-widget
(make-widget :global ’<string-widget>
:text "<h1>This is a protected text</h1>")
:myprotection))

;; Should throw 403
(defroute "/protected-widget" ()
(concatenate ’string
"<a href=\"/rest/string-widget?id="
(id *specific-protected-widget*)
"\">Will throw 403</a>"

(render-widget *specific-protected-widget*)))

(defmethod on-exception ((app <web>) (code (eql 403)))
(declare (ignore app))
"403 - The protection works.")
#+END_SRC

*** Login
Protecting certain widgets by a login is very easy. The <LOGIN-WIDGET>
organizes the following things:
1. It displays a login form and logs the client in if he passes the
challenge. The successful pass sets will result in an permanent
non-nil value if you call "(LOGGED-IN *SESSION*)". This means that
every widget that requires the authroization level :LOGIN through
the PROTECT-WIDGET method can now be accessed by the user.
2. It supplies a Logout button. This button can be access through the
LOGOUT-BUTTON reader. You therefore can render the button anywhere
you like. Pressing the button will result in a logout and therefore
in a permanent NIL for "(LOGGED-IN *SESSION*)".
3. It renders certain widgets if the login was successful. This can be
either used e.g. for a success message.

*The <LOGIN-WIDGET> has to run in :SESSION scope!*
#+LATEX: \\\\
Additionally you can specify different authentication challanges
(authentication functions) if you wish. But using the <LOGIN-WIDGET>
and passing the challenge will *only* set the authoriatzition level
to :LOGIN. This means that you need to create your own <LOGIN-WIDGET>
if you want some other level for different authentication functions!

#+BEGIN_SRC lisp
(defvar *protected-widget*
(protect-widget
(make-widget :global ’<string-widget>
:text "<h1>This is a protected text</h1>")
:login))

(defroute "/" ()
(with-html-document (doc
(make-instance ’<header-widget>))
(setf (body doc)
(make-widget
:global ’<function-widget>
:function
#’(lambda ()
(set-widget-for-session ;; running it in the session
:login-widget
(make-widget :session ’<login-widget>
:authenticator
#’(lambda (user password)
(if (and (string= user "ritschmaster")
(string= password "secret"))
t
nil))
:widgets
(list
*protected-widget*)))
(render-widget
(get-widget-for-session :login-widget)))))))
#+END_SRC
*** Language getting/setting
To store the accpeted languages in the session there is the
CHECK-AND-SET-LANGUAGE function. This function uses the value supplied
through the "Accept-languages" field in the HTTP request. It gets
called through the render method by any <HTML-DOCUMENT-WIDGET>
automatically. Which means that as soon as you use it you don’t have
to worry about getting the language. But on the other hand you have to
make sure that every subclass of <HTML-DOCUMENT-WIDGET> again uses
CHECK-AND-SET-LANGUAGE in its render-method.
#+LATEX: \\\\
You can access the currently accepted languages through the
ACCEPTED-LANGUAGES.
#+LATEX: \\\\
If you rather use a manual language chooser you can supply
AUTOMATICALLY-SET-LANGUAGES as NIL to the INIT-WIDGETS
function. Please then use the setf method for ACCEPTED-LANGUAGES to
set the language.
*** Translations
Most strings that are rendered human readable get translated through a
special function. You can specify your own translation function by
passing it to INIT-WIDGETS as :TRANSLATION-FUNCTION. The function
header should look like this:
#+BEGIN_SRC lisp
(defvar *my-translation-function*
#’(lambda (text
&key
plural-p
genitive-form-p
items-count
accusative-form-p
language
&allow-other-keys)
text))
#+END_SRC

Strings that are translated:
- The page names of a navigation

Strings that are definitely *not* translated:
- The TEXT of a <STRING-WIDGET>
- The return value of a <FUNCTION-WIDGET>

*** Development hooks
In case you want to do things at compile time (e.g. calling DEFROUTE)
whe INIT-WIDGETS is evaluated there is the variable
*INIT-WIDGETS-HOOKS*. Just append new functions as you wish.

#+BEGIN_SRC lisp
(setf *init-widgets-hooks*
(append
*init-widgets-hooks*
(list
#’(lambda ()
(defroute "/something" ()
;; Accessing the user supplied <APP> object:
(describe caveman2-widgets::*web*)
"something")))))
#+END_SRC
** Important notes/Things that happen automatically
The following things you should keep in mind when using
caveman2-widgets.

*** Automatically REST API creation
If you create a widget then routes for a REST API will be added
automatically. Suppose you subclass <WIDGET> with the class
<MY-WIDGET>, then you will get the path "/rest/my-widget" which you
can access.

#+BEGIN_SRC lisp
(defclass <my-widget> (<widget>)
())

(defmethod render-widget ((this <my-widget>))
"my-widget representation for the website")

(defmethod render-widget-rest ((this <my-widget>) (method (eql :get)) (args t))
"my-widget representation for the REST.")

(defmethod render-widget-rest ((this <my-widget>) (method (eql :post)) (args t))
(render-widget this))
#+END_SRC

Buttons and Links are *not* accessed through the REST path (see the
section above).

Widgets that are not accessible through the REST:
- <HTML-DOCUMENT-WIDGET>
- <HEADER-WIDGET>

*** Encapsulating widgets with divs
Each widget gets wrapped in a div automatically. Every widget will get
its entire class heritage included in the CSS class
attribute. Therefore you can access every widget (and derived widget)
very easily with CSS.

*** JavaScript dependencies
When <HEADER-WIDGET> is used all JavaScript dependencies are added
automatically. Please notice that these dependecies are needed to
ensure that the widgets work properly. If you don’t want to use
<HEADER-WIDGET> you have to manually add jQuery and all the JavaScript
Code supplied/needed by caveman2-widgets.

The routes for the JavaScript files (which have to be included in each
HTML file) are:
- /widgets/js/widgets.js

The jQuery-Version used is 2.2.2 minified. If you want another jQuery
file you can specify it with the variable \*jquery-cdn-link\* (should be
an URL).

*If you forget to use the JavaScript-files widgets might not work or
even break. Most likely all dynamic content just won’t work
(automatically fallback to non-JS)*

*** CSS dependencies
As with JavaScript, stylesheets are added in the <HEADER-WIDGET> automatically
too. The routes you need in your head tag are:
- /widgets/css/widgets.css

*** Session values
This section should inform you about keywords in the session variable
which you should absolutely not modify.
- :WIDGET-HOLDER :: <WIDGET-HOLDER> object. It holds all the session
scoped widgets.
- :DIRTY-OBJECT-IDS :: The name says it all.
- :JAVASCRIPT-AVAILABLE :: Holds a boolean value if JavaScript is
available or not.
- :ACCEPT-LANGUAGE :: Holds the languages accepted by the client.

** Author

+ Richard Paul Bäck (richard.baeck@free-your-pc.com)

** Copyright

Copyright (c) 2016 Richard Paul Bäck (richard.baeck@free-your-pc.com)

** License

Licensed under the LLGPL License.

Version

0.5

Dependencies
  • trivial-garbage (system).
  • moptilities (system).
  • caveman2 (system).
Source

caveman2-widgets.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 caveman2-widgets/src

Source

caveman2-widgets.asd.

Parent Component

caveman2-widgets (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 caveman2-widgets/caveman2-widgets.asd

Source

caveman2-widgets.asd.

Parent Component

caveman2-widgets (system).

ASDF Systems

caveman2-widgets.


4.1.2 caveman2-widgets/src/util.lisp

Source

caveman2-widgets.asd.

Parent Component

src (module).

Packages

caveman2-widgets.util.

Public Interface

4.1.3 caveman2-widgets/src/widget.lisp

Source

caveman2-widgets.asd.

Parent Component

src (module).

Packages

caveman2-widgets.widget.

Public Interface
Internals

4.1.4 caveman2-widgets/src/callback-widget.lisp

Source

caveman2-widgets.asd.

Parent Component

src (module).

Packages

caveman2-widgets.callback-widget.

Public Interface
Internals

4.1.5 caveman2-widgets/src/default-widgets.lisp

Source

caveman2-widgets.asd.

Parent Component

src (module).

Packages

caveman2-widgets.default-widgets.

Public Interface
Internals

4.1.6 caveman2-widgets/src/login.lisp

Source

caveman2-widgets.asd.

Parent Component

src (module).

Packages

caveman2-widgets.login.

Public Interface
Internals

4.1.7 caveman2-widgets/src/document.lisp

Source

caveman2-widgets.asd.

Parent Component

src (module).

Packages

caveman2-widgets.document.

Public Interface
Internals

4.1.8 caveman2-widgets/src/navigation.lisp

Source

caveman2-widgets.asd.

Parent Component

src (module).

Packages

caveman2-widgets.navigation.

Public Interface
Internals

4.1.9 caveman2-widgets/src/caveman2-widgets.lisp

Source

caveman2-widgets.asd.

Parent Component

src (module).

Packages

caveman2-widgets.

Public Interface

5 Packages

Packages are listed by definition order.


5.1 caveman2-widgets.default-widgets

Source

default-widgets.lisp.

Use List
Used By List
Public Interface
Internals

5.2 caveman2-widgets.document

Source

document.lisp.

Use List
Used By List
Public Interface
Internals

5.3 caveman2-widgets.util

Source

util.lisp.

Use List
  • caveman2.
  • common-lisp.
  • metabang.moptilities.
Used By List
Public Interface

5.4 caveman2-widgets.navigation

Source

navigation.lisp.

Use List
Used By List

caveman2-widgets.

Public Interface
Internals

5.5 caveman2-widgets.login

Source

login.lisp.

Use List
Used By List

caveman2-widgets.

Public Interface
Internals

5.7 caveman2-widgets.widget

Source

widget.lisp.

Use List
Used By List
Public Interface
Internals

5.8 caveman2-widgets.callback-widget

Source

callback-widget.lisp.

Use List
Used By List
Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *application-root*
Package

caveman2-widgets.util.

Source

util.lisp.

Special Variable: *automatically-set-languages*
Package

caveman2-widgets.util.

Source

util.lisp.

Special Variable: *button-call-path*
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Special Variable: *css-directory*
Package

caveman2-widgets.util.

Source

util.lisp.

Special Variable: *css-path*

An absolute route where caveman2-widgets’ CSS files can be accessed.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *dirty-objects-uri-path*
Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *init-widgets-hooks*

This variable holds a list of functions which will be called when INIT-WIDGETS is evaluated. You add any function you like but the main idea was to add functions from caveman2-widgets based libraries/applications that need those variables at compile time.

Package

caveman2-widgets.

Source

caveman2-widgets.lisp.

Special Variable: *javascript-checker-path*
Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *javascript-path*

An absolute path where caveman2-widgets’ JavaScript files can be accessed.

Package

caveman2-widgets.widget.

Source

widget.lisp.

The URL to access jQuery.

Package

caveman2-widgets.document.

Source

document.lisp.

Special Variable: *js-directory*
Package

caveman2-widgets.util.

Source

util.lisp.

Special Variable: *language-key-in-session*
Package

caveman2-widgets.util.

Source

util.lisp.

Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Special Variable: *login-authentication-keyword*

This variable holds the keyword which is used within the session to indicated that a session holder is logged in (or not).

Package

caveman2-widgets.login.

Source

login.lisp.

Special Variable: *port*
Package

caveman2-widgets.navigation.

Source

navigation.lisp.

Special Variable: *protection-circles-session-key*
Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *rest-path*
Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *static-directory*
Package

caveman2-widgets.util.

Source

util.lisp.

Special Variable: *web*

An <app>-instance

Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *widgets-css-filename*

The filename of the CSS file which manages all standard widget styles.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *widgets-js-filename*

The filename of the JavaScript file which manages all standard widget functionality.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: +translate+

This should be a function which should translate a given text. You can modify it to your needs. By default this function does nothing.

@param plural-p
@param genitive-form-p
@param items-count
@param accusative-form-p
@param language

Package

caveman2-widgets.util.

Source

util.lisp.


6.1.2 Macros

Macro: defnav (base-path (header-widget pages &key kind bottom-widget session-key))

@param base-path The path for the navigation. Should have a starting "/". @param header-widget A <HEADER-WIDGET> for the navigation and it’s children. @param pages A list of lists.

Package

caveman2-widgets.navigation.

Source

navigation.lisp.

Macro: make-widget (scope class &rest obj-args)

@param obj-args The parameter which are passed to the constructor for the new widget.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Macro: with-html-document ((document-symbol header &key doc-kind) &rest body)

@param document-symbol The symbol name to access the document. @param doc-kind The class which is used as HTML document. @param header A <HEADER-WIDGET> for this document.

Package

caveman2-widgets.document.

Source

document.lisp.


6.1.3 Ordinary functions

Function: add-authorization (circle &optional session)
Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: authorized (widget &optional session)
Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: check-and-set-language (request session)
Package

caveman2-widgets.util.

Source

util.lisp.

Package

caveman2-widgets.util.

Source

util.lisp.

Function: defroute-static (uri-path path app content-type)
Package

caveman2-widgets.util.

Source

util.lisp.

Function: get-from-callback-args (key args)

@param key A string which might be in the args
@param args The value passed by a <CALLBACK-WIDGET> in its callback function.

Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Function: get-trimmed-class-name (obj &key get-all)

@param obj The object of which the name is required @param get-all-self If non-nil returns the entire hierarchy.

Package

caveman2-widgets.util.

Source

util.lisp.

Function: get-value-for-cons-list (some-list key)
Package

caveman2-widgets.util.

Source

util.lisp.

Function: get-widget-for-session (session-tag &optional session)

Gets a previously saved widget from the session variable (e.g. to render it).

Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: has-trailing-slash (str)
Package

caveman2-widgets.util.

Source

util.lisp.

Function: init-mark-dirty (web &optional uri-path)
Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: init-widgets (webapp &key port translation-function javascript-path css-path rest-path button-call-path link-call-path dirty-objects-uri-path login-authentication-keyword automatically-set-languages)
Package

caveman2-widgets.

Source

caveman2-widgets.lisp.

Function: mark-dirty (widget &optional session)

Marks a widget that it should be rendered ASAP.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: remove-authorization (circle &optional session)
Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: remove-widget-for-session (session-tag &optional session)

Removes a saved widget from the session variable.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: set-widget-for-session (session-tag widget &optional session &key force)

Saves a widget in the session variable. This should be considered ONLY for session scoped widgets. Only adds WIDGET if there is no widget at SESSION-TAG already.

@param force If non-nil overwrites the already stored value.

@return The current value in the SESSION at position SESSION-TAG.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: string-case-insensitive= (str1 str2)
Package

caveman2-widgets.util.

Source

util.lisp.


6.1.4 Generic functions

Generic Function: accepted-languages (session)
Package

caveman2-widgets.util.

Source

util.lisp.

Methods
Method: accepted-languages ((session hash-table))
Generic Function: (setf accepted-languages) (session)
Package

caveman2-widgets.util.

Source

util.lisp.

Methods
Method: (setf accepted-languages) ((session hash-table))
Generic Function: append-item (this item)
Package

caveman2-widgets.util.

Source

util.lisp.

Methods
Method: append-item ((this <navigation-widget>) (item list))

@param item This should be a list which should looke like that: (list "pagetitle" "uri-path" <widget-for-pagetitle>).

Source

navigation.lisp.

Method: append-item ((this <header-widget>) (item string))

The given item will be added to the <head> tag as given.

Source

document.lisp.

Method: append-item ((this <header-widget>) (item <css-file>))
Source

document.lisp.

Method: append-item ((this <header-widget>) (item <js-file>))
Source

document.lisp.

Method: append-item ((this <table-widget>) (item cons))

@param item Must not have more than two values. The first value is the keyword which should be displayed when a <TABLE-ITEM> object is accessed. The second value is the header text for the column.

Source

default-widgets.lisp.

Method: append-item ((this <composite-widget>) (item <widget>))
Source

default-widgets.lisp.

Method: append-item ((this <form-widget>) (item <form-field>))
Source

callback-widget.lisp.

Method: append-item ((this <radio-field>) (item string))
Source

callback-widget.lisp.

Method: append-item ((this <select-field>) (item <option-field>))
Source

callback-widget.lisp.

Method: append-item ((this <dirty-widget-holder>) (item <widget>))
Source

widget.lisp.

Method: append-item ((this <widget-holder>) (item <widget>))
Source

widget.lisp.

Method: append-item (this item)
Generic Reader: base-path (object)
Generic Writer: (setf base-path) (object)
Package

caveman2-widgets.navigation.

Methods
Reader Method: base-path ((<navigation-widget> <navigation-widget>))
Writer Method: (setf base-path) ((<navigation-widget> <navigation-widget>))

Determines the path for this navigation. It does not need an initial or trailing forward slash.

Source

navigation.lisp.

Target Slot

base-path.

Generic Reader: body (object)
Package

caveman2-widgets.document.

Methods
Reader Method: body ((<html-document-widget> <html-document-widget>))

automatically generated reader method

Source

document.lisp.

Target Slot

body.

Generic Writer: (setf body) (object)
Package

caveman2-widgets.document.

Methods
Writer Method: (setf body) ((<html-document-widget> <html-document-widget>))

automatically generated writer method

Source

document.lisp.

Target Slot

body.

Generic Reader: bottom (object)
Package

caveman2-widgets.document.

Methods
Reader Method: bottom ((<html-document-widget> <html-document-widget>))

automatically generated reader method

Source

document.lisp.

Target Slot

bottom.

Generic Writer: (setf bottom) (object)
Package

caveman2-widgets.document.

Methods
Writer Method: (setf bottom) ((<html-document-widget> <html-document-widget>))

automatically generated writer method

Source

document.lisp.

Target Slot

bottom.

Generic Reader: callback (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: callback ((<callback-widget> <callback-widget>))
Source

callback-widget.lisp.

Target Slot

callback.

Generic Reader: charset (object)
Package

caveman2-widgets.document.

Methods
Reader Method: charset ((<header-widget> <header-widget>))

automatically generated reader method

Source

document.lisp.

Target Slot

charset.

Generic Writer: (setf charset) (object)
Package

caveman2-widgets.document.

Methods
Writer Method: (setf charset) ((<header-widget> <header-widget>))

automatically generated writer method

Source

document.lisp.

Target Slot

charset.

Generic Reader: check-function (object)
Generic Writer: (setf check-function) (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: check-function ((<form-field> <form-field>))
Writer Method: (setf check-function) ((<form-field> <form-field>))

Checks the user input for flaws. Takes one
argument - the string passed by the user. Should return non-nil if everything is correct.

Source

callback-widget.lisp.

Target Slot

check-function.

Generic Reader: checked-option (object)
Generic Writer: (setf checked-option) (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: checked-option ((<radio-field> <radio-field>))
Writer Method: (setf checked-option) ((<radio-field> <radio-field>))

The option which is checked. Must be a number. Start with 0.

Source

callback-widget.lisp.

Target Slot

checked-option.

Generic Reader: classes (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: classes ((<callback-widget> <callback-widget>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

classes.

Generic Writer: (setf classes) (object)
Package

caveman2-widgets.callback-widget.

Methods
Writer Method: (setf classes) ((<callback-widget> <callback-widget>))

automatically generated writer method

Source

callback-widget.lisp.

Target Slot

classes.

Generic Reader: column-descriptions (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: column-descriptions ((<table-widget> <table-widget>))

This is a list of cons which where the cons is one column. The first value of the cons is the keyword to display. The second value of the cons is the table header for that column. For the header (second value) you can use HTML code!

Example:
(list (list :firstcolumn "First column"))

Source

default-widgets.lisp.

Target Slot

colum-descriptions.

Generic Reader: composite (object)
Package

caveman2-widgets.navigation.

Methods
Reader Method: composite ((<navigation-widget> <navigation-widget>))

automatically generated reader method

Source

navigation.lisp.

Target Slot

composite.

Generic Writer: (setf composite) (object)
Package

caveman2-widgets.navigation.

Methods
Writer Method: (setf composite) ((<navigation-widget> <navigation-widget>))

automatically generated writer method

Source

navigation.lisp.

Target Slot

composite.

Generic Reader: crossorigin (object)
Package

caveman2-widgets.document.

Methods
Reader Method: crossorigin ((<file> <file>))

automatically generated reader method

Source

document.lisp.

Target Slot

crossorigin.

Generic Writer: (setf crossorigin) (object)
Package

caveman2-widgets.document.

Methods
Writer Method: (setf crossorigin) ((<file> <file>))

automatically generated writer method

Source

document.lisp.

Target Slot

crossorigin.

Generic Reader: current-page (object)
Package

caveman2-widgets.navigation.

Methods
Reader Method: current-page ((<navigation-widget> <navigation-widget>))

The name for the current page to display.

Source

navigation.lisp.

Target Slot

current-page.

Generic Writer: (setf current-page) (this)
Package

caveman2-widgets.navigation.

Source

navigation.lisp.

Methods
Writer Method: (setf current-page) ((this <navigation-widget>))

@param value Must be an uri path string

Target Slot

current-page.

Generic Function: delete-item (this item)
Package

caveman2-widgets.util.

Source

util.lisp.

Methods
Method: delete-item ((this <dirty-widget-holder>) (item <widget>))
Source

widget.lisp.

Method: delete-item ((this <widget-holder>) (item <widget>))
Source

widget.lisp.

Method: delete-item (this item)
Generic Reader: east (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: east ((<border-widget> <border-widget>))

automatically generated reader method

Source

default-widgets.lisp.

Target Slot

east.

Generic Writer: (setf east) (object)
Package

caveman2-widgets.default-widgets.

Methods
Writer Method: (setf east) ((<border-widget> <border-widget>))

automatically generated writer method

Source

default-widgets.lisp.

Target Slot

east.

Generic Reader: error-happened (object)
Generic Writer: (setf error-happened) (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: error-happened ((<form-field> <form-field>))
Writer Method: (setf error-happened) ((<form-field> <form-field>))

A highly frequented slot. Non-nil indicates that an error occurred.

Source

callback-widget.lisp.

Target Slot

error-happened.

Generic Reader: error-message (object)
Generic Writer: (setf error-message) (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: error-message ((<form-field> <form-field>))
Writer Method: (setf error-message) ((<form-field> <form-field>))

The error message that will be displayed if
ERROR-HAPPENED is non-nil. The error message will be translated before rendered.

Source

callback-widget.lisp.

Target Slot

error-message.

Generic Function: find-item (this to-find)
Package

caveman2-widgets.util.

Source

util.lisp.

Methods
Method: find-item ((this <navigation-widget>) (item string))

@param item The URI path as string.

Source

navigation.lisp.

Method: find-item ((this <widget-holder>) (to-find string))
Source

widget.lisp.

Method: find-item (this item)
Generic Reader: fn (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: fn ((<function-widget> <function-widget>))

automatically generated reader method

Source

default-widgets.lisp.

Target Slot

fn.

Generic Writer: (setf fn) (object)
Package

caveman2-widgets.default-widgets.

Methods
Writer Method: (setf fn) ((<function-widget> <function-widget>))

automatically generated writer method

Source

default-widgets.lisp.

Target Slot

fn.

Generic Function: get-as-list (this)

This generic method should return the entire object
as cons-list. If you want to hide certain slots, just keep them out of the list!

Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Methods
Method: get-as-list ((this <table-item>))
Generic Reader: header (object)
Package

caveman2-widgets.document.

Methods
Reader Method: header ((<html-document-widget> <html-document-widget>))

automatically generated reader method

Source

document.lisp.

Target Slot

header.

Generic Writer: (setf header) (object)
Package

caveman2-widgets.document.

Methods
Writer Method: (setf header) ((<html-document-widget> <html-document-widget>))

automatically generated writer method

Source

document.lisp.

Target Slot

header.

Generic Reader: http-method (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: http-method ((<callback-widget> <callback-widget>))

This slot should be one of the HTTP methods as keyword (e.g. :post or :get

Source

callback-widget.lisp.

Target Slot

http-method.

Generic Reader: icon-path (object)
Generic Writer: (setf icon-path) (object)
Package

caveman2-widgets.document.

Methods
Reader Method: icon-path ((<header-widget> <header-widget>))
Writer Method: (setf icon-path) ((<header-widget> <header-widget>))

The path to a specific image to use as icon for page.

Source

document.lisp.

Target Slot

icon-path.

Generic Reader: id (object)
Package

caveman2-widgets.widget.

Methods
Reader Method: id ((<widget> <widget>))

automatically generated reader method

Source

widget.lisp.

Target Slot

id.

Generic Reader: input-fields (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: input-fields ((<form-widget> <form-widget>))

A list of <FORM-FIELD> objects.

Source

callback-widget.lisp.

Target Slot

input-fields.

Generic Reader: input-type (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: input-type ((<input-field> <input-field>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

input-type.

Generic Function: javascript-available (session)
Package

caveman2-widgets.util.

Source

util.lisp.

Methods
Method: javascript-available ((session hash-table))
Generic Function: (setf javascript-available) (session)
Package

caveman2-widgets.util.

Source

util.lisp.

Methods
Method: (setf javascript-available) ((session hash-table))
Generic Reader: label (object)
Generic Writer: (setf label) (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: label ((<form-field> <form-field>))
Writer Method: (setf label) ((<form-field> <form-field>))

The label which will be placed before the <input> tag.

Source

callback-widget.lisp.

Target Slot

label.

Reader Method: label ((<callback-widget> <callback-widget>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

label.

Generic Function: logged-in (session)
Package

caveman2-widgets.login.

Source

login.lisp.

Methods
Method: logged-in ((session hash-table))
Generic Function: (setf logged-in) (session)
Package

caveman2-widgets.login.

Source

login.lisp.

Methods
Method: (setf logged-in) ((session hash-table))
Generic Reader: login-authenticator (object)
Package

caveman2-widgets.login.

Methods
Reader Method: login-authenticator ((<login-widget> <login-widget>))

Must be a function that takes two parameters. The first is the username and the second is the password.

Source

login.lisp.

Target Slot

login-authenticator.

Generic Reader: login-form (object)
Package

caveman2-widgets.login.

Methods
Reader Method: login-form ((<login-widget> <login-widget>))

automatically generated reader method

Source

login.lisp.

Target Slot

login-form.

Generic Reader: logout-button (object)
Package

caveman2-widgets.login.

Methods
Reader Method: logout-button ((<login-widget> <login-widget>))

automatically generated reader method

Source

login.lisp.

Target Slot

logout-button.

Generic Reader: max-items-to-display (object)
Generic Writer: (setf max-items-to-display) (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: max-items-to-display ((<viewgrid-widget> <viewgrid-widget>))
Writer Method: (setf max-items-to-display) ((<viewgrid-widget> <viewgrid-widget>))

Non-nil value must be a number which describes how many items will be displayed on each viewgrid page.

Source

default-widgets.lisp.

Target Slot

max-items-to-display.

Generic Reader: multiple (object)
Generic Writer: (setf multiple) (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: multiple ((<select-field> <select-field>))
Writer Method: (setf multiple) ((<select-field> <select-field>))

Non-nil allows multiple choices.

Source

callback-widget.lisp.

Target Slot

multiple.

Generic Reader: name (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: name ((<form-field> <form-field>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

name.

Generic Reader: north (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: north ((<border-widget> <border-widget>))

automatically generated reader method

Source

default-widgets.lisp.

Target Slot

north.

Generic Writer: (setf north) (object)
Package

caveman2-widgets.default-widgets.

Methods
Writer Method: (setf north) ((<border-widget> <border-widget>))

automatically generated writer method

Source

default-widgets.lisp.

Target Slot

north.

Generic Reader: on-view (object)
Generic Writer: (setf on-view) (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: on-view ((<viewgrid-widget> <viewgrid-widget>))
Writer Method: (setf on-view) ((<viewgrid-widget> <viewgrid-widget>))

Must either be NIL or a function which takes one
argument. The passed argument is the item in the viewgrid which is viewed. If the value is NIL the client can’t view a specific item.

Source

default-widgets.lisp.

Target Slot

on-view.

Generic Reader: on-view-label (object)
Generic Writer: (setf on-view-label) (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: on-view-label ((<viewgrid-widget> <viewgrid-widget>))
Writer Method: (setf on-view-label) ((<viewgrid-widget> <viewgrid-widget>))

The text which should be displayed on the button for the ON-VIEW callback.

Source

default-widgets.lisp.

Target Slot

on-view-label.

Generic Reader: options (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: options ((<radio-field> <radio-field>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

options.

Reader Method: options ((<select-field> <select-field>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

options.

Generic Writer: (setf options) (object)
Package

caveman2-widgets.callback-widget.

Methods
Writer Method: (setf options) ((<radio-field> <radio-field>))

automatically generated writer method

Source

callback-widget.lisp.

Target Slot

options.

Writer Method: (setf options) ((<select-field> <select-field>))

automatically generated writer method

Source

callback-widget.lisp.

Target Slot

options.

Generic Reader: other-header-content (object)
Package

caveman2-widgets.document.

Methods
Reader Method: other-header-content ((<header-widget> <header-widget>))

A list of strings that will be directly put in the header tag.

Source

document.lisp.

Target Slot

other-header-content.

Generic Reader: pages (object)
Package

caveman2-widgets.navigation.

Methods
Reader Method: pages ((<navigation-widget> <navigation-widget>))

A list of cons. This slot holds all possible pages
and it should look like: (list (list "pagetitle" "uri-path" <widget>))

Source

navigation.lisp.

Target Slot

pages.

Generic Reader: path (object)
Package

caveman2-widgets.document.

Methods
Reader Method: path ((<file> <file>))

automatically generated reader method

Source

document.lisp.

Target Slot

path.

Generic Function: protect-widget (widget for)

@return The WIDGET object.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Methods
Method: protect-widget ((widget <widget>) (for symbol))

@param for A keyword

Method: protect-widget ((widget <widget>) (for list))

@param for A list of keywords

Generic Reader: protected (object)
Package

caveman2-widgets.widget.

Methods
Reader Method: protected ((<widget> <widget>))

This is a list of protection circles. If NIL (or
an empty list) the widget is not procted. If non-nil it should be a list of keywords. That list indicates which keywords (or authorized circles) the requester has in his session. Use PROTECT-WIDGET to use this slot.

Source

widget.lisp.

Target Slot

protected.

Generic Function: render-as (this view)
Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Methods
Method: render-as ((this <viewgrid-item>) (view (eql :oneline)))
Method: render-as ((this <viewgrid-item>) (view (eql :short)))
Method: render-as ((this <viewgrid-item>) (view (eql :full)))
Generic Function: render-widget (this)

@return Returns the HTML representation of the
widget as string. It is intended to use this within a simple HTML transfer or embedded in another page.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Methods
Method: render-widget ((this <blank-navigation-widget>))
Source

navigation.lisp.

Method: render-widget ((this <menu-navigation-widget>))
Source

navigation.lisp.

Method: render-widget ((this <html-document-widget>))
Source

document.lisp.

Method: render-widget ((this <header-widget>))
Source

document.lisp.

Method: render-widget ((this <css-file>))
Source

document.lisp.

Method: render-widget ((this <js-file>))
Source

document.lisp.

Method: render-widget ((this <login-widget>))
Source

login.lisp.

Method: render-widget ((this <border-widget>))
Source

default-widgets.lisp.

Method: render-widget ((this <viewgrid-widget>))
Source

default-widgets.lisp.

Method: render-widget :around ((this <table-widget>))
Source

default-widgets.lisp.

Method: render-widget ((this <table-widget>))
Source

default-widgets.lisp.

Method: render-widget ((this <function-widget>))
Source

default-widgets.lisp.

Method: render-widget ((this <hcomposite-widget>))
Source

default-widgets.lisp.

Method: render-widget ((this <composite-widget>))
Source

default-widgets.lisp.

Method: render-widget ((this <string-widget>))
Source

default-widgets.lisp.

Method: render-widget ((this <form-widget>))
Source

callback-widget.lisp.

Method: render-widget ((this <radio-field>))
Source

callback-widget.lisp.

Method: render-widget ((this <select-field>))
Source

callback-widget.lisp.

Method: render-widget ((this <option-field>))
Source

callback-widget.lisp.

Method: render-widget ((this <input-field>))
Source

callback-widget.lisp.

Method: render-widget :around ((this <form-field>))
Source

callback-widget.lisp.

Method: render-widget ((this <form-field>))
Source

callback-widget.lisp.

Method: render-widget ((this <link-widget>))
Source

callback-widget.lisp.

Method: render-widget ((this <button-widget>))
Source

callback-widget.lisp.

Method: render-widget :around ((this <widget>))
Generic Function: render-widget-body (this)
Package

caveman2-widgets.widget.

Source

widget.lisp.

Methods
Method: render-widget-body ((this <table-widget>))
Source

default-widgets.lisp.

Generic Function: render-widget-header (this)
Package

caveman2-widgets.widget.

Source

widget.lisp.

Methods
Method: render-widget-header ((this <table-widget>))
Source

default-widgets.lisp.

Generic Function: render-widget-rest (this method args)

@return Returns the HTML representation of the
widget as string. To generate a method for a specific HTTP method you can do the following:

(defmethod render-widget-rest ((this <widget>) (method (eql :get)) (args t)) "HTML output for the REST when GET.")

Package

caveman2-widgets.widget.

Source

widget.lisp.

Methods
Method: render-widget-rest :around ((this <widget>) method args)
Method: render-widget-rest ((this <widget>) method args)
Generic Reader: required (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: required ((<form-field> <form-field>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

required.

Generic Writer: (setf required) (object)
Package

caveman2-widgets.callback-widget.

Methods
Writer Method: (setf required) ((<form-field> <form-field>))

automatically generated writer method

Source

callback-widget.lisp.

Target Slot

required.

Generic Reader: session-tag (object)
Package

caveman2-widgets.navigation.

Methods
Reader Method: session-tag ((<navigation-widget> <navigation-widget>))

automatically generated reader method

Source

navigation.lisp.

Target Slot

session-tag.

Generic Writer: (setf session-tag) (object)
Package

caveman2-widgets.navigation.

Methods
Writer Method: (setf session-tag) ((<navigation-widget> <navigation-widget>))

automatically generated writer method

Source

navigation.lisp.

Target Slot

session-tag.

Generic Reader: signout-hook (object)
Generic Writer: (setf signout-hook) (object)
Package

caveman2-widgets.login.

Methods
Reader Method: signout-hook ((<login-widget> <login-widget>))
Writer Method: (setf signout-hook) ((<login-widget> <login-widget>))

A functions which will be called after signing out.

Source

login.lisp.

Target Slot

signout-hook.

Generic Reader: south (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: south ((<border-widget> <border-widget>))

automatically generated reader method

Source

default-widgets.lisp.

Target Slot

south.

Generic Writer: (setf south) (object)
Package

caveman2-widgets.default-widgets.

Methods
Writer Method: (setf south) ((<border-widget> <border-widget>))

automatically generated writer method

Source

default-widgets.lisp.

Target Slot

south.

Generic Reader: supplied (object)
Generic Writer: (setf supplied) (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: supplied ((<form-field> <form-field>))
Writer Method: (setf supplied) ((<form-field> <form-field>))

A highly frequented slot. It tells if the form field was filled by the client.

Source

callback-widget.lisp.

Target Slot

supplied.

Generic Reader: text (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: text ((<string-widget> <string-widget>))

automatically generated reader method

Source

default-widgets.lisp.

Target Slot

text.

Generic Writer: (setf text) (object)
Package

caveman2-widgets.default-widgets.

Methods
Writer Method: (setf text) ((<string-widget> <string-widget>))

automatically generated writer method

Source

default-widgets.lisp.

Target Slot

text.

Generic Reader: title (object)
Package

caveman2-widgets.document.

Methods
Reader Method: title ((<header-widget> <header-widget>))

automatically generated reader method

Source

document.lisp.

Target Slot

title.

Generic Writer: (setf title) (object)
Package

caveman2-widgets.document.

Methods
Writer Method: (setf title) ((<header-widget> <header-widget>))

automatically generated writer method

Source

document.lisp.

Target Slot

title.

Generic Reader: uri-path (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: uri-path ((<callback-widget> <callback-widget>))

This slot should give the exact path to access this widget.

Source

callback-widget.lisp.

Target Slot

uri-path.

Generic Reader: value (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: value ((<option-field> <option-field>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

value.

Reader Method: value ((<input-field> <input-field>))

automatically generated reader method

Source

callback-widget.lisp.

Target Slot

value.

Generic Reader: view (object)
Generic Writer: (setf view) (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: view ((<viewgrid-widget> <viewgrid-widget>))
Writer Method: (setf view) ((<viewgrid-widget> <viewgrid-widget>))

The value of this slot is passed to the RENDER-AS
method. Therefore you can use an arbitary value but you have to provide an according method for that value!

Source

default-widgets.lisp.

Target Slot

view.

Generic Reader: west (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: west ((<border-widget> <border-widget>))

automatically generated reader method

Source

default-widgets.lisp.

Target Slot

west.

Generic Writer: (setf west) (object)
Package

caveman2-widgets.default-widgets.

Methods
Writer Method: (setf west) ((<border-widget> <border-widget>))

automatically generated writer method

Source

default-widgets.lisp.

Target Slot

west.

Generic Reader: widget-scope (object)
Package

caveman2-widgets.widget.

Methods
Reader Method: widget-scope ((<widget> <widget>))

automatically generated reader method

Source

widget.lisp.

Target Slot

scope.

Generic Reader: widgets (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: widgets ((<composite-widget> <composite-widget>))

automatically generated reader method

Source

default-widgets.lisp.

Target Slot

widgets.

Generic Writer: (setf widgets) (object)
Package

caveman2-widgets.default-widgets.

Methods
Writer Method: (setf widgets) ((<composite-widget> <composite-widget>))

automatically generated writer method

Source

default-widgets.lisp.

Target Slot

widgets.


6.1.5 Standalone methods

Method: initialize-instance :after ((this <login-widget>) &key)
Source

login.lisp.

Method: initialize-instance :after ((this <widget>) &key)

Generates a REST for the widget. It will automatically generate accessable URIs for the HTTP methods stored in *rest-methods*. The REST can be accessed by the URI /*rest-path*/widget-name

Source

widget.lisp.

Method: initialize-instance :after ((this <button-widget>) &key)
Source

callback-widget.lisp.

Method: initialize-instance :after ((this <link-widget>) &key)
Source

callback-widget.lisp.

Method: initialize-instance :after ((this <form-widget>) &key)
Source

callback-widget.lisp.


6.1.6 Classes

Class: <blank-navigation-widget>
Package

caveman2-widgets.navigation.

Source

navigation.lisp.

Direct superclasses

<navigation-widget>.

Direct methods

render-widget.

Class: <border-widget>
Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct superclasses

<widget>.

Direct methods
Direct slots
Slot: north
Initargs

:north

Readers

north.

Writers

(setf north).

Slot: east
Initargs

:east

Readers

east.

Writers

(setf east).

Slot: south
Initargs

:south

Readers

south.

Writers

(setf south).

Slot: west
Initargs

:west

Readers

west.

Writers

(setf west).

Slot: center
Initargs

:center

Readers

center.

Writers

(setf center).

Class: <button-widget>

The callback function will be called when the user presses the button.

Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct superclasses

<callback-widget>.

Direct subclasses

<form-widget>.

Direct methods
Direct Default Initargs
InitargValue
:uri-path
:http-methodpost
Class: <callback-widget>
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct superclasses

<widget>.

Direct subclasses
Direct methods
Direct slots
Slot: label
Initargs

:label

Readers

label.

Writers

This slot is read-only.

Slot: callback
Initform

(function (lambda (caveman2-widgets.callback-widget::args) ""))

Initargs

:callback

Readers

callback.

Writers

This slot is read-only.

Slot: uri-path

This slot should give the exact path to access this widget.

Initform

(error "must supply an uri-path to access the widget.")

Initargs

:uri-path

Readers

uri-path.

Writers

This slot is read-only.

Slot: http-method

This slot should be one of the HTTP methods as keyword (e.g. :post or :get

Initform

(error "must supply a method to access the http url.")

Initargs

:http-method

Readers

http-method.

Writers

This slot is read-only.

Slot: classes
Initargs

:classes

Readers

classes.

Writers

(setf classes).

Class: <composite-widget>
Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct superclasses

<widget>.

Direct subclasses
Direct methods
Direct slots
Slot: widgets
Initform

(quote nil)

Initargs

:widgets

Readers

widgets.

Writers

(setf widgets).

Class: <css-file>
Package

caveman2-widgets.document.

Source

document.lisp.

Direct superclasses

<file>.

Direct methods
Class: <form-field>
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: name
Initform

(error "must specify a name for the form field.")

Initargs

:name

Readers

name.

Writers

This slot is read-only.

Slot: label

The label which will be placed before the <input> tag.

Initform

""

Initargs

:label

Readers

label.

Writers

(setf label).

Slot: supplied

A highly frequented slot. It tells if the form field was filled by the client.

Initform

t

Readers

supplied.

Writers

(setf supplied).

Slot: required
Initargs

:required

Readers

required.

Writers

(setf required).

Slot: check-function

Checks the user input for flaws. Takes one
argument - the string passed by the user. Should return non-nil if everything is correct.

Initform

(function (lambda (caveman2-widgets.callback-widget::str) t))

Initargs

:check-function

Readers

check-function.

Writers

(setf check-function).

Slot: error-happened

A highly frequented slot. Non-nil indicates that an error occurred.

Readers

error-happened.

Writers

(setf error-happened).

Slot: error-message

The error message that will be displayed if
ERROR-HAPPENED is non-nil. The error message will be translated before rendered.

Initform

""

Initargs

:error-message

Readers

error-message.

Writers

(setf error-message).

Class: <form-widget>
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct superclasses

<button-widget>.

Direct methods
Direct slots
Slot: input-fields

A list of <FORM-FIELD> objects.

Initform

(quote nil)

Initargs

:input-fields

Readers

input-fields.

Writers

This slot is read-only.

Class: <function-widget>

Uses a fucntion for rendering. The given function should return a string which will then be rendered.

Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct superclasses

<widget>.

Direct methods
Direct slots
Slot: fn
Initform

(function (lambda nil ""))

Initargs

:function

Readers

fn.

Writers

(setf fn).

Class: <hcomposite-widget>

This is a Horizontal composite widget. Therefore it
is essentially the same as the <COMPOSITE-WIDGET> with the difference that is displays its widgets horizontally.

Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct superclasses

<composite-widget>.

Direct methods

render-widget.

Class: <header-widget>
Package

caveman2-widgets.document.

Source

document.lisp.

Direct methods
Direct slots
Slot: css-files
Initform

(list (make-instance (quote caveman2-widgets.document:<css-file>) :path (concatenate (quote string) caveman2-widgets.widget:*css-path* "/" caveman2-widgets.widget:*widgets-css-filename*)))

Readers

css-files.

Writers

This slot is read-only.

Slot: js-files
Initform

(list (make-instance (quote caveman2-widgets.document:<js-file>) :path caveman2-widgets.document:*jquery-cdn-link*) (make-instance (quote caveman2-widgets.document:<js-file>) :path (concatenate (quote string) caveman2-widgets.widget:*javascript-path* "/" caveman2-widgets.widget:*widgets-js-filename*)))

Readers

js-files.

Writers

This slot is read-only.

Slot: title
Initargs

:title

Readers

title.

Writers

(setf title).

Slot: icon-path

The path to a specific image to use as icon for page.

Initargs

:icon-path

Readers

icon-path.

Writers

(setf icon-path).

Slot: charset
Initform

"utf-8"

Initargs

:charset

Readers

charset.

Writers

(setf charset).

Slot: other-header-content

A list of strings that will be directly put in the header tag.

Initform

(quote nil)

Initargs

:other-header-content

Readers

other-header-content.

Writers

This slot is read-only.

Class: <html-document-widget>

The body-widget will be wrapped in a div with the
id "body" automatically. Rendering this widget automatically sets the language!

Package

caveman2-widgets.document.

Source

document.lisp.

Direct subclasses

<navigation-widget>.

Direct methods
Direct slots
Slot: header
Initargs

:header

Readers

header.

Writers

(setf header).

Slot: body
Initargs

:body

Readers

body.

Writers

(setf body).

Slot: bottom
Initargs

:bottom

Readers

bottom.

Writers

(setf bottom).

Class: <input-field>
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct superclasses

<form-field>.

Direct methods
Direct slots
Slot: input-type
Initform

(error "must specify an input type.")

Initargs

:input-type

Readers

input-type.

Writers

This slot is read-only.

Slot: value
Initform

(error "must specify an input value.")

Initargs

:value

Readers

value.

Writers

This slot is read-only.

Class: <js-file>
Package

caveman2-widgets.document.

Source

document.lisp.

Direct superclasses

<file>.

Direct methods

The callback function will be called when the user
clickes the link. The function must return a string. The returned string should be an URL to which the server should redirect.

Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct superclasses

<callback-widget>.

Direct methods
Direct Default Initargs
InitargValue
:uri-path
:http-methodget
Direct slots
Slot: target-foreign-p

When the given link redirects absolute (like http://...).

Initargs

:target-foreign-p

Class: <login-widget>
Package

caveman2-widgets.login.

Source

login.lisp.

Direct superclasses

<composite-widget>.

Direct methods
Direct slots
Slot: login-authenticator

Must be a function that takes two parameters. The first is the username and the second is the password.

Initform

(function (lambda (caveman2-widgets.login::user caveman2-widgets.login::password) nil))

Initargs

:authenticator

Readers

login-authenticator.

Writers

This slot is read-only.

Slot: signout-hook

A functions which will be called after signing out.

Initargs

:signout-hook

Readers

signout-hook.

Writers

(setf signout-hook).

Slot: login-failed

For internal use only. This slot is used to indicate that the login procedure did not work.

Readers

login-failed.

Writers

(setf login-failed).

Slot: login-form
Readers

login-form.

Writers

This slot is read-only.

Slot: logout-button
Readers

logout-button.

Writers

This slot is read-only.

Class: <menu-navigation-widget>
Package

caveman2-widgets.navigation.

Source

navigation.lisp.

Direct superclasses

<navigation-widget>.

Direct methods

render-widget.

Class: <option-field>
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct methods
Direct slots
Slot: value
Initform

(error "must supply a value.")

Initargs

:value

Readers

value.

Writers

This slot is read-only.

Slot: display-value

If NIL then the displayed value will equal the used value.

Initargs

:display-value

Readers

display-value.

Writers

This slot is read-only.

Class: <radio-field>
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct superclasses

<form-field>.

Direct methods
Direct slots
Slot: options
Initform

(quote nil)

Initargs

:options

Readers

options.

Writers

(setf options).

Slot: checked-option

The option which is checked. Must be a number. Start with 0.

Initargs

:checked-option

Readers

checked-option.

Writers

(setf checked-option).

Class: <select-field>
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Direct superclasses

<form-field>.

Direct methods
Direct slots
Slot: options
Initform

(quote nil)

Initargs

:options

Readers

options.

Writers

(setf options).

Slot: multiple

Non-nil allows multiple choices.

Initargs

:multiple

Readers

multiple.

Writers

(setf multiple).

Class: <string-widget>
Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct superclasses

<widget>.

Direct methods
Direct slots
Slot: text
Initform

""

Initargs

:text

Readers

text.

Writers

(setf text).

Class: <table-item>

This class is used to display items in a widget. It essentially is only relevant for the GET-AS-LIST method which is used by the <TABLE-WIDGET>.

Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct methods

get-as-list.

Class: <table-widget>
Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct superclasses

<composite-widget>.

Direct methods
Direct slots
Slot: producer

A function which supplies the table with
<TABLE-ITEM> objects. It is possible to use a heterogenous list of <TABLE-ITEM> objects but it is strongly advised to watch out by doing so (accessing not available slots might cause an error!). The producer should be able to deliver a specific amount of items too (AMOUNT = m, ALREADY = n, LENGTH-P = nil => gets items from (m) to (m + n)). To know how many items are avaible please supply the key LENGTH-P which returns a number when non-nil. Consider the following lambda as producer:
(lambda (&key
amount
(already 0)
(length-p nil))
(list (make-instance ’<table-item>)))

Initform

(error "must supply a producer.")

Initargs

:producer

Readers

producer.

Writers

This slot is read-only.

Slot: colum-descriptions

This is a list of cons which where the cons is one column. The first value of the cons is the keyword to display. The second value of the cons is the table header for that column. For the header (second value) you can use HTML code!

Example:
(list (list :firstcolumn "First column"))

Initform

(quote nil)

Initargs

:column-descriptions

Readers

column-descriptions.

Writers

This slot is read-only.

Class: <viewgrid-item>
Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct methods
Class: <viewgrid-widget>
Package

caveman2-widgets.default-widgets.

Source

default-widgets.lisp.

Direct superclasses

<widget>.

Direct methods
Direct slots
Slot: producer

A function which supplies the table with
<VIEWGRID-ITEM> objects. It is possible to use a heterogenous list of <VIEWGRID-ITEM> objects. The producer should be able to deliver a specific amount of items too (FROM = m, TO = n, LENGTH-P = nil => gets items from (m) to (m + n); FROM = m, TO = NIL, LENGTH-P = nil => gets items from (m) to LENGTH). To know how many items are avaible please supply the key LENGTH-P which returns a number when non-nil. Consider the following lambda as producer:
(lambda (&key
(from 0)
(to nil)
(length-p nil))
(list (make-instance ’<table-item>)))

Initform

(error "must supply a producer.")

Initargs

:producer

Readers

producer.

Writers

This slot is read-only.

Slot: view

The value of this slot is passed to the RENDER-AS
method. Therefore you can use an arbitary value but you have to provide an according method for that value!

Initform

(error "must supply which view should be used.")

Initargs

:view

Readers

view.

Writers

(setf view).

Slot: on-view

Must either be NIL or a function which takes one
argument. The passed argument is the item in the viewgrid which is viewed. If the value is NIL the client can’t view a specific item.

Initargs

:on-view

Readers

on-view.

Writers

(setf on-view).

Slot: on-view-label

The text which should be displayed on the button for the ON-VIEW callback.

Initform

"view dataview item"

Initargs

:on-view-label

Readers

on-view-label.

Writers

(setf on-view-label).

Slot: max-items-to-display

Non-nil value must be a number which describes how many items will be displayed on each viewgrid page.

Initargs

:max-items-to-display

Readers

max-items-to-display.

Writers

(setf max-items-to-display).

Slot: display-selector

A page selector are the page numbers which the
user can click to access the page. If NIL don’t display a page selector. The non-nil value has to be the URI path in which the viewgrid is used. E.g. display-selector = "view" if the viewgrid is accessed on the page /view.

Initargs

:display-selector

Readers

display-selector.

Writers

(setf display-selector).

Slot: current-from
Initform

0

Slot: selector
Slot: prev-button
Slot: next-button
Class: <widget>
Package

caveman2-widgets.widget.

Source

widget.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: id
Initform

(symbol-name (gensym))

Initargs

:id

Readers

id.

Writers

This slot is read-only.

Slot: scope
Readers

widget-scope.

Writers

This slot is read-only.

Slot: protected

This is a list of protection circles. If NIL (or
an empty list) the widget is not procted. If non-nil it should be a list of keywords. That list indicates which keywords (or authorized circles) the requester has in his session. Use PROTECT-WIDGET to use this slot.

Initform

(quote nil)

Initargs

:protected

Readers

protected.

Writers

This slot is read-only.


6.2 Internals


6.2.1 Special variables

Special Variable: *dirty-objects-session-key*
Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *global-widget-holder*
Package

caveman2-widgets.widget.

Source

widget.lisp.

Special Variable: *input-field-for-old-uri*
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Special Variable: *navigation-widgets*
Package

caveman2-widgets.navigation.

Source

navigation.lisp.

Special Variable: *rest-methods*
Package

caveman2-widgets.widget.

Source

widget.lisp.


6.2.2 Ordinary functions

Function: demark-dirty (widget &optional session)

Marks a widget as rendered.

Package

caveman2-widgets.widget.

Source

widget.lisp.

Function: test-widget-if-session (scope widget-id &optional session)
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.


6.2.3 Generic functions

Generic Reader: center (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: center ((<border-widget> <border-widget>))

automatically generated reader method

Source

default-widgets.lisp.

Target Slot

center.

Generic Writer: (setf center) (object)
Package

caveman2-widgets.default-widgets.

Methods
Writer Method: (setf center) ((<border-widget> <border-widget>))

automatically generated writer method

Source

default-widgets.lisp.

Target Slot

center.

Generic Reader: created-paths (object)
Package

caveman2-widgets.navigation.

Methods
Reader Method: created-paths ((<navigation-widget> <navigation-widget>))

automatically generated reader method

Source

navigation.lisp.

Target Slot

created-paths.

Generic Writer: (setf created-paths) (object)
Package

caveman2-widgets.navigation.

Methods
Writer Method: (setf created-paths) ((<navigation-widget> <navigation-widget>))

automatically generated writer method

Source

navigation.lisp.

Target Slot

created-paths.

Generic Reader: css-files (object)
Package

caveman2-widgets.document.

Methods
Reader Method: css-files ((<header-widget> <header-widget>))

automatically generated reader method

Source

document.lisp.

Target Slot

css-files.

Generic Reader: display-selector (object)
Generic Writer: (setf display-selector) (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: display-selector ((<viewgrid-widget> <viewgrid-widget>))
Writer Method: (setf display-selector) ((<viewgrid-widget> <viewgrid-widget>))

A page selector are the page numbers which the
user can click to access the page. If NIL don’t display a page selector. The non-nil value has to be the URI path in which the viewgrid is used. E.g. display-selector = "view" if the viewgrid is accessed on the page /view.

Source

default-widgets.lisp.

Target Slot

display-selector.

Generic Reader: display-value (object)
Package

caveman2-widgets.callback-widget.

Methods
Reader Method: display-value ((<option-field> <option-field>))

If NIL then the displayed value will equal the used value.

Source

callback-widget.lisp.

Target Slot

display-value.

Generic Reader: integrity (object)
Package

caveman2-widgets.document.

Methods
Reader Method: integrity ((<file> <file>))

automatically generated reader method

Source

document.lisp.

Target Slot

integrity.

Generic Writer: (setf integrity) (object)
Package

caveman2-widgets.document.

Methods
Writer Method: (setf integrity) ((<file> <file>))

automatically generated writer method

Source

document.lisp.

Target Slot

integrity.

Generic Reader: js-files (object)
Package

caveman2-widgets.document.

Methods
Reader Method: js-files ((<header-widget> <header-widget>))

automatically generated reader method

Source

document.lisp.

Target Slot

js-files.

Generic Reader: login-failed (object)
Generic Writer: (setf login-failed) (object)
Package

caveman2-widgets.login.

Methods
Reader Method: login-failed ((<login-widget> <login-widget>))
Writer Method: (setf login-failed) ((<login-widget> <login-widget>))

For internal use only. This slot is used to indicate that the login procedure did not work.

Source

login.lisp.

Target Slot

login-failed.

Generic Reader: producer (object)
Package

caveman2-widgets.default-widgets.

Methods
Reader Method: producer ((<viewgrid-widget> <viewgrid-widget>))

A function which supplies the table with
<VIEWGRID-ITEM> objects. It is possible to use a heterogenous list of <VIEWGRID-ITEM> objects. The producer should be able to deliver a specific amount of items too (FROM = m, TO = n, LENGTH-P = nil => gets items from (m) to (m + n); FROM = m, TO = NIL, LENGTH-P = nil => gets items from (m) to LENGTH). To know how many items are avaible please supply the key LENGTH-P which returns a number when non-nil. Consider the following lambda as producer:
(lambda (&key
(from 0)
(to nil)
(length-p nil))
(list (make-instance ’<table-item>)))

Source

default-widgets.lisp.

Target Slot

producer.

Reader Method: producer ((<table-widget> <table-widget>))

A function which supplies the table with
<TABLE-ITEM> objects. It is possible to use a heterogenous list of <TABLE-ITEM> objects but it is strongly advised to watch out by doing so (accessing not available slots might cause an error!). The producer should be able to deliver a specific amount of items too (AMOUNT = m, ALREADY = n, LENGTH-P = nil => gets items from (m) to (m + n)). To know how many items are avaible please supply the key LENGTH-P which returns a number when non-nil. Consider the following lambda as producer:
(lambda (&key
amount
(already 0)
(length-p nil))
(list (make-instance ’<table-item>)))

Source

default-widgets.lisp.

Target Slot

producer.

Generic Function: set-required-present (this container)
Package

caveman2-widgets.callback-widget.

Source

callback-widget.lisp.

Methods
Method: set-required-present ((this <form-widget>) (container list))

Sets the SUPPLIED slot of the INPUT-FIELDS based on a given list. Sets also the ERROR-HAPPENED slot by running the check function.

@param container Should be the ARGS parameter of the the callback
which is an ALIST.

@return Returns NIL if any requirement is not met or any . Non-nil value if all requirements are met.


6.2.4 Classes

Class: <dirty-widget-holder>
Package

caveman2-widgets.widget.

Source

widget.lisp.

Direct methods
Direct slots
Slot: widgets

Holds the ids of all widgets that are marked as dirty.

Initform

(quote nil)

Class: <file>
Package

caveman2-widgets.document.

Source

document.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: path
Initform

(error "must supply a path to access the file.")

Initargs

:path

Readers

path.

Writers

This slot is read-only.

Slot: integrity
Initargs

:integrity

Readers

integrity.

Writers

(setf integrity).

Slot: crossorigin
Initargs

:crossorigin

Readers

crossorigin.

Writers

(setf crossorigin).

Class: <navigation-widget>

This is an abstract widget which implements all
interactions with a navigation but not the RENDER-WIDGET. Please subclass this class as you want (default implementations are <MENU-NAVIGATION-WIDGET> and <BLANK-NAVIGATION-WIDGET>.

Package

caveman2-widgets.navigation.

Source

navigation.lisp.

Direct superclasses
Direct subclasses
Direct methods
Direct slots
Slot: created-paths
Allocation

:class

Initform

(quote nil)

Readers

created-paths.

Writers

(setf created-paths).

Slot: pages

A list of cons. This slot holds all possible pages
and it should look like: (list (list "pagetitle" "uri-path" <widget>))

Initform

(quote nil)

Initargs

:pages

Readers

pages.

Writers

This slot is read-only.

Slot: current-page

The name for the current page to display.

Type

(quote string)

Readers

current-page.

Writers

(setf current-page).

Slot: composite
Readers

composite.

Writers

(setf composite).

Slot: base-path

Determines the path for this navigation. It does not need an initial or trailing forward slash.

Initform

""

Initargs

:base-path

Readers

base-path.

Writers

(setf base-path).

Slot: session-tag
Initform

(error "must supply a tag for the session.")

Initargs

:session-tag

Readers

session-tag.

Writers

(setf session-tag).

Class: <widget-holder>
Package

caveman2-widgets.widget.

Source

widget.lisp.

Direct methods
Direct slots
Slot: widgets

Holds all widgets and derived widgets of a specific session. If a widget is finalized it will be removed from this list automatically. This list is neccessary for the REST API to get exactly the given widget.

Initform

(quote nil)


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   H   I   J   L   M   N   O   P   R   S   T   U   V   W  
Index Entry  Section

(
(setf accepted-languages): Public generic functions
(setf accepted-languages): Public generic functions
(setf base-path): Public generic functions
(setf base-path): Public generic functions
(setf body): Public generic functions
(setf body): Public generic functions
(setf bottom): Public generic functions
(setf bottom): Public generic functions
(setf center): Private generic functions
(setf center): Private generic functions
(setf charset): Public generic functions
(setf charset): Public generic functions
(setf check-function): Public generic functions
(setf check-function): Public generic functions
(setf checked-option): Public generic functions
(setf checked-option): Public generic functions
(setf classes): Public generic functions
(setf classes): Public generic functions
(setf composite): Public generic functions
(setf composite): Public generic functions
(setf created-paths): Private generic functions
(setf created-paths): Private generic functions
(setf crossorigin): Public generic functions
(setf crossorigin): Public generic functions
(setf current-page): Public generic functions
(setf current-page): Public generic functions
(setf display-selector): Private generic functions
(setf display-selector): Private generic functions
(setf east): Public generic functions
(setf east): Public generic functions
(setf error-happened): Public generic functions
(setf error-happened): Public generic functions
(setf error-message): Public generic functions
(setf error-message): Public generic functions
(setf fn): Public generic functions
(setf fn): Public generic functions
(setf header): Public generic functions
(setf header): Public generic functions
(setf icon-path): Public generic functions
(setf icon-path): Public generic functions
(setf integrity): Private generic functions
(setf integrity): Private generic functions
(setf javascript-available): Public generic functions
(setf javascript-available): Public generic functions
(setf label): Public generic functions
(setf label): Public generic functions
(setf logged-in): Public generic functions
(setf logged-in): Public generic functions
(setf login-failed): Private generic functions
(setf login-failed): Private generic functions
(setf max-items-to-display): Public generic functions
(setf max-items-to-display): Public generic functions
(setf multiple): Public generic functions
(setf multiple): Public generic functions
(setf north): Public generic functions
(setf north): Public generic functions
(setf on-view): Public generic functions
(setf on-view): Public generic functions
(setf on-view-label): Public generic functions
(setf on-view-label): Public generic functions
(setf options): Public generic functions
(setf options): Public generic functions
(setf options): Public generic functions
(setf required): Public generic functions
(setf required): Public generic functions
(setf session-tag): Public generic functions
(setf session-tag): Public generic functions
(setf signout-hook): Public generic functions
(setf signout-hook): Public generic functions
(setf south): Public generic functions
(setf south): Public generic functions
(setf supplied): Public generic functions
(setf supplied): Public generic functions
(setf text): Public generic functions
(setf text): Public generic functions
(setf title): Public generic functions
(setf title): Public generic functions
(setf view): Public generic functions
(setf view): Public generic functions
(setf west): Public generic functions
(setf west): Public generic functions
(setf widgets): Public generic functions
(setf widgets): Public generic functions

A
accepted-languages: Public generic functions
accepted-languages: Public generic functions
add-authorization: Public ordinary functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
append-item: Public generic functions
authorized: Public ordinary functions

B
base-path: Public generic functions
base-path: Public generic functions
body: Public generic functions
body: Public generic functions
bottom: Public generic functions
bottom: Public generic functions

C
callback: Public generic functions
callback: Public generic functions
center: Private generic functions
center: Private generic functions
charset: Public generic functions
charset: Public generic functions
check-and-set-language: Public ordinary functions
check-function: Public generic functions
check-function: Public generic functions
checked-option: Public generic functions
checked-option: Public generic functions
classes: Public generic functions
classes: Public generic functions
clean-list-of-broken-links: Public ordinary functions
column-descriptions: Public generic functions
column-descriptions: Public generic functions
composite: Public generic functions
composite: Public generic functions
created-paths: Private generic functions
created-paths: Private generic functions
crossorigin: Public generic functions
crossorigin: Public generic functions
css-files: Private generic functions
css-files: Private generic functions
current-page: Public generic functions
current-page: Public generic functions

D
defnav: Public macros
defroute-static: Public ordinary functions
delete-item: Public generic functions
delete-item: Public generic functions
delete-item: Public generic functions
delete-item: Public generic functions
demark-dirty: Private ordinary functions
display-selector: Private generic functions
display-selector: Private generic functions
display-value: Private generic functions
display-value: Private generic functions

E
east: Public generic functions
east: Public generic functions
error-happened: Public generic functions
error-happened: Public generic functions
error-message: Public generic functions
error-message: Public generic functions

F
find-item: Public generic functions
find-item: Public generic functions
find-item: Public generic functions
find-item: Public generic functions
fn: Public generic functions
fn: Public generic functions
Function, add-authorization: Public ordinary functions
Function, authorized: Public ordinary functions
Function, check-and-set-language: Public ordinary functions
Function, clean-list-of-broken-links: Public ordinary functions
Function, defroute-static: Public ordinary functions
Function, demark-dirty: Private ordinary functions
Function, get-from-callback-args: Public ordinary functions
Function, get-trimmed-class-name: Public ordinary functions
Function, get-value-for-cons-list: Public ordinary functions
Function, get-widget-for-session: Public ordinary functions
Function, has-trailing-slash: Public ordinary functions
Function, init-mark-dirty: Public ordinary functions
Function, init-widgets: Public ordinary functions
Function, mark-dirty: Public ordinary functions
Function, remove-authorization: Public ordinary functions
Function, remove-widget-for-session: Public ordinary functions
Function, set-widget-for-session: Public ordinary functions
Function, string-case-insensitive=: Public ordinary functions
Function, test-widget-if-session: Private ordinary functions

G
Generic Function, (setf accepted-languages): Public generic functions
Generic Function, (setf base-path): Public generic functions
Generic Function, (setf body): Public generic functions
Generic Function, (setf bottom): Public generic functions
Generic Function, (setf center): Private generic functions
Generic Function, (setf charset): Public generic functions
Generic Function, (setf check-function): Public generic functions
Generic Function, (setf checked-option): Public generic functions
Generic Function, (setf classes): Public generic functions
Generic Function, (setf composite): Public generic functions
Generic Function, (setf created-paths): Private generic functions
Generic Function, (setf crossorigin): Public generic functions
Generic Function, (setf current-page): Public generic functions
Generic Function, (setf display-selector): Private generic functions
Generic Function, (setf east): Public generic functions
Generic Function, (setf error-happened): Public generic functions
Generic Function, (setf error-message): Public generic functions
Generic Function, (setf fn): Public generic functions
Generic Function, (setf header): Public generic functions
Generic Function, (setf icon-path): Public generic functions
Generic Function, (setf integrity): Private generic functions
Generic Function, (setf javascript-available): Public generic functions
Generic Function, (setf label): Public generic functions
Generic Function, (setf logged-in): Public generic functions
Generic Function, (setf login-failed): Private generic functions
Generic Function, (setf max-items-to-display): Public generic functions
Generic Function, (setf multiple): Public generic functions
Generic Function, (setf north): Public generic functions
Generic Function, (setf on-view): Public generic functions
Generic Function, (setf on-view-label): Public generic functions
Generic Function, (setf options): Public generic functions
Generic Function, (setf required): Public generic functions
Generic Function, (setf session-tag): Public generic functions
Generic Function, (setf signout-hook): Public generic functions
Generic Function, (setf south): Public generic functions
Generic Function, (setf supplied): Public generic functions
Generic Function, (setf text): Public generic functions
Generic Function, (setf title): Public generic functions
Generic Function, (setf view): Public generic functions
Generic Function, (setf west): Public generic functions
Generic Function, (setf widgets): Public generic functions
Generic Function, accepted-languages: Public generic functions
Generic Function, append-item: Public generic functions
Generic Function, base-path: Public generic functions
Generic Function, body: Public generic functions
Generic Function, bottom: Public generic functions
Generic Function, callback: Public generic functions
Generic Function, center: Private generic functions
Generic Function, charset: Public generic functions
Generic Function, check-function: Public generic functions
Generic Function, checked-option: Public generic functions
Generic Function, classes: Public generic functions
Generic Function, column-descriptions: Public generic functions
Generic Function, composite: Public generic functions
Generic Function, created-paths: Private generic functions
Generic Function, crossorigin: Public generic functions
Generic Function, css-files: Private generic functions
Generic Function, current-page: Public generic functions
Generic Function, delete-item: Public generic functions
Generic Function, display-selector: Private generic functions
Generic Function, display-value: Private generic functions
Generic Function, east: Public generic functions
Generic Function, error-happened: Public generic functions
Generic Function, error-message: Public generic functions
Generic Function, find-item: Public generic functions
Generic Function, fn: Public generic functions
Generic Function, get-as-list: Public generic functions
Generic Function, header: Public generic functions
Generic Function, http-method: Public generic functions
Generic Function, icon-path: Public generic functions
Generic Function, id: Public generic functions
Generic Function, input-fields: Public generic functions
Generic Function, input-type: Public generic functions
Generic Function, integrity: Private generic functions
Generic Function, javascript-available: Public generic functions
Generic Function, js-files: Private generic functions
Generic Function, label: Public generic functions
Generic Function, logged-in: Public generic functions
Generic Function, login-authenticator: Public generic functions
Generic Function, login-failed: Private generic functions
Generic Function, login-form: Public generic functions
Generic Function, logout-button: Public generic functions
Generic Function, max-items-to-display: Public generic functions
Generic Function, multiple: Public generic functions
Generic Function, name: Public generic functions
Generic Function, north: Public generic functions
Generic Function, on-view: Public generic functions
Generic Function, on-view-label: Public generic functions
Generic Function, options: Public generic functions
Generic Function, other-header-content: Public generic functions
Generic Function, pages: Public generic functions
Generic Function, path: Public generic functions
Generic Function, producer: Private generic functions
Generic Function, protect-widget: Public generic functions
Generic Function, protected: Public generic functions
Generic Function, render-as: Public generic functions
Generic Function, render-widget: Public generic functions
Generic Function, render-widget-body: Public generic functions
Generic Function, render-widget-header: Public generic functions
Generic Function, render-widget-rest: Public generic functions
Generic Function, required: Public generic functions
Generic Function, session-tag: Public generic functions
Generic Function, set-required-present: Private generic functions
Generic Function, signout-hook: Public generic functions
Generic Function, south: Public generic functions
Generic Function, supplied: Public generic functions
Generic Function, text: Public generic functions
Generic Function, title: Public generic functions
Generic Function, uri-path: Public generic functions
Generic Function, value: Public generic functions
Generic Function, view: Public generic functions
Generic Function, west: Public generic functions
Generic Function, widget-scope: Public generic functions
Generic Function, widgets: Public generic functions
get-as-list: Public generic functions
get-as-list: Public generic functions
get-from-callback-args: Public ordinary functions
get-trimmed-class-name: Public ordinary functions
get-value-for-cons-list: Public ordinary functions
get-widget-for-session: Public ordinary functions

H
has-trailing-slash: Public ordinary functions
header: Public generic functions
header: Public generic functions
http-method: Public generic functions
http-method: Public generic functions

I
icon-path: Public generic functions
icon-path: Public generic functions
id: Public generic functions
id: Public generic functions
init-mark-dirty: Public ordinary functions
init-widgets: Public ordinary functions
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
input-fields: Public generic functions
input-fields: Public generic functions
input-type: Public generic functions
input-type: Public generic functions
integrity: Private generic functions
integrity: Private generic functions

J
javascript-available: Public generic functions
javascript-available: Public generic functions
js-files: Private generic functions
js-files: Private generic functions

L
label: Public generic functions
label: Public generic functions
label: Public generic functions
logged-in: Public generic functions
logged-in: Public generic functions
login-authenticator: Public generic functions
login-authenticator: Public generic functions
login-failed: Private generic functions
login-failed: Private generic functions
login-form: Public generic functions
login-form: Public generic functions
logout-button: Public generic functions
logout-button: Public generic functions

M
Macro, defnav: Public macros
Macro, make-widget: Public macros
Macro, with-html-document: Public macros
make-widget: Public macros
mark-dirty: Public ordinary functions
max-items-to-display: Public generic functions
max-items-to-display: Public generic functions
Method, (setf accepted-languages): Public generic functions
Method, (setf base-path): Public generic functions
Method, (setf body): Public generic functions
Method, (setf bottom): Public generic functions
Method, (setf center): Private generic functions
Method, (setf charset): Public generic functions
Method, (setf check-function): Public generic functions
Method, (setf checked-option): Public generic functions
Method, (setf classes): Public generic functions
Method, (setf composite): Public generic functions
Method, (setf created-paths): Private generic functions
Method, (setf crossorigin): Public generic functions
Method, (setf current-page): Public generic functions
Method, (setf display-selector): Private generic functions
Method, (setf east): Public generic functions
Method, (setf error-happened): Public generic functions
Method, (setf error-message): Public generic functions
Method, (setf fn): Public generic functions
Method, (setf header): Public generic functions
Method, (setf icon-path): Public generic functions
Method, (setf integrity): Private generic functions
Method, (setf javascript-available): Public generic functions
Method, (setf label): Public generic functions
Method, (setf logged-in): Public generic functions
Method, (setf login-failed): Private generic functions
Method, (setf max-items-to-display): Public generic functions
Method, (setf multiple): Public generic functions
Method, (setf north): Public generic functions
Method, (setf on-view): Public generic functions
Method, (setf on-view-label): Public generic functions
Method, (setf options): Public generic functions
Method, (setf options): Public generic functions
Method, (setf required): Public generic functions
Method, (setf session-tag): Public generic functions
Method, (setf signout-hook): Public generic functions
Method, (setf south): Public generic functions
Method, (setf supplied): Public generic functions
Method, (setf text): Public generic functions
Method, (setf title): Public generic functions
Method, (setf view): Public generic functions
Method, (setf west): Public generic functions
Method, (setf widgets): Public generic functions
Method, accepted-languages: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, append-item: Public generic functions
Method, base-path: Public generic functions
Method, body: Public generic functions
Method, bottom: Public generic functions
Method, callback: Public generic functions
Method, center: Private generic functions
Method, charset: Public generic functions
Method, check-function: Public generic functions
Method, checked-option: Public generic functions
Method, classes: Public generic functions
Method, column-descriptions: Public generic functions
Method, composite: Public generic functions
Method, created-paths: Private generic functions
Method, crossorigin: Public generic functions
Method, css-files: Private generic functions
Method, current-page: Public generic functions
Method, delete-item: Public generic functions
Method, delete-item: Public generic functions
Method, delete-item: Public generic functions
Method, display-selector: Private generic functions
Method, display-value: Private generic functions
Method, east: Public generic functions
Method, error-happened: Public generic functions
Method, error-message: Public generic functions
Method, find-item: Public generic functions
Method, find-item: Public generic functions
Method, find-item: Public generic functions
Method, fn: Public generic functions
Method, get-as-list: Public generic functions
Method, header: Public generic functions
Method, http-method: Public generic functions
Method, icon-path: Public generic functions
Method, id: Public generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, input-fields: Public generic functions
Method, input-type: Public generic functions
Method, integrity: Private generic functions
Method, javascript-available: Public generic functions
Method, js-files: Private generic functions
Method, label: Public generic functions
Method, label: Public generic functions
Method, logged-in: Public generic functions
Method, login-authenticator: Public generic functions
Method, login-failed: Private generic functions
Method, login-form: Public generic functions
Method, logout-button: Public generic functions
Method, max-items-to-display: Public generic functions
Method, multiple: Public generic functions
Method, name: Public generic functions
Method, north: Public generic functions
Method, on-view: Public generic functions
Method, on-view-label: Public generic functions
Method, options: Public generic functions
Method, options: Public generic functions
Method, other-header-content: Public generic functions
Method, pages: Public generic functions
Method, path: Public generic functions
Method, producer: Private generic functions
Method, producer: Private generic functions
Method, protect-widget: Public generic functions
Method, protect-widget: Public generic functions
Method, protected: Public generic functions
Method, render-as: Public generic functions
Method, render-as: Public generic functions
Method, render-as: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget: Public generic functions
Method, render-widget-body: Public generic functions
Method, render-widget-header: Public generic functions
Method, render-widget-rest: Public generic functions
Method, render-widget-rest: Public generic functions
Method, required: Public generic functions
Method, session-tag: Public generic functions
Method, set-required-present: Private generic functions
Method, signout-hook: Public generic functions
Method, south: Public generic functions
Method, supplied: Public generic functions
Method, text: Public generic functions
Method, title: Public generic functions
Method, uri-path: Public generic functions
Method, value: Public generic functions
Method, value: Public generic functions
Method, view: Public generic functions
Method, west: Public generic functions
Method, widget-scope: Public generic functions
Method, widgets: Public generic functions
multiple: Public generic functions
multiple: Public generic functions

N
name: Public generic functions
name: Public generic functions
north: Public generic functions
north: Public generic functions

O
on-view: Public generic functions
on-view: Public generic functions
on-view-label: Public generic functions
on-view-label: Public generic functions
options: Public generic functions
options: Public generic functions
options: Public generic functions
other-header-content: Public generic functions
other-header-content: Public generic functions

P
pages: Public generic functions
pages: Public generic functions
path: Public generic functions
path: Public generic functions
producer: Private generic functions
producer: Private generic functions
producer: Private generic functions
protect-widget: Public generic functions
protect-widget: Public generic functions
protect-widget: Public generic functions
protected: Public generic functions
protected: Public generic functions

R
remove-authorization: Public ordinary functions
remove-widget-for-session: Public ordinary functions
render-as: Public generic functions
render-as: Public generic functions
render-as: Public generic functions
render-as: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget: Public generic functions
render-widget-body: Public generic functions
render-widget-body: Public generic functions
render-widget-header: Public generic functions
render-widget-header: Public generic functions
render-widget-rest: Public generic functions
render-widget-rest: Public generic functions
render-widget-rest: Public generic functions
required: Public generic functions
required: Public generic functions

S
session-tag: Public generic functions
session-tag: Public generic functions
set-required-present: Private generic functions
set-required-present: Private generic functions
set-widget-for-session: Public ordinary functions
signout-hook: Public generic functions
signout-hook: Public generic functions
south: Public generic functions
south: Public generic functions
string-case-insensitive=: Public ordinary functions
supplied: Public generic functions
supplied: Public generic functions

T
test-widget-if-session: Private ordinary functions
text: Public generic functions
text: Public generic functions
title: Public generic functions
title: Public generic functions

U
uri-path: Public generic functions
uri-path: Public generic functions

V
value: Public generic functions
value: Public generic functions
value: Public generic functions
view: Public generic functions
view: Public generic functions

W
west: Public generic functions
west: Public generic functions
widget-scope: Public generic functions
widget-scope: Public generic functions
widgets: Public generic functions
widgets: Public generic functions
with-html-document: Public macros


A.3 Variables

Jump to:   *   +  
B   C   D   E   F   H   I   J   L   M   N   O   P   R   S   T   U   V   W  
Index Entry  Section

*
*application-root*: Public special variables
*automatically-set-languages*: Public special variables
*button-call-path*: Public special variables
*css-directory*: Public special variables
*css-path*: Public special variables
*dirty-objects-session-key*: Private special variables
*dirty-objects-uri-path*: Public special variables
*global-widget-holder*: Private special variables
*init-widgets-hooks*: Public special variables
*input-field-for-old-uri*: Private special variables
*javascript-checker-path*: Public special variables
*javascript-path*: Public special variables
*jquery-cdn-link*: Public special variables
*js-directory*: Public special variables
*language-key-in-session*: Public special variables
*link-call-path*: Public special variables
*login-authentication-keyword*: Public special variables
*navigation-widgets*: Private special variables
*port*: Public special variables
*protection-circles-session-key*: Public special variables
*rest-methods*: Private special variables
*rest-path*: Public special variables
*static-directory*: Public special variables
*web*: Public special variables
*widgets-css-filename*: Public special variables
*widgets-js-filename*: Public special variables

+
+translate+: Public special variables

B
base-path: Private classes
body: Public classes
bottom: Public classes

C
callback: Public classes
center: Public classes
charset: Public classes
check-function: Public classes
checked-option: Public classes
classes: Public classes
colum-descriptions: Public classes
composite: Private classes
created-paths: Private classes
crossorigin: Private classes
css-files: Public classes
current-from: Public classes
current-page: Private classes

D
display-selector: Public classes
display-value: Public classes

E
east: Public classes
error-happened: Public classes
error-message: Public classes

F
fn: Public classes

H
header: Public classes
http-method: Public classes

I
icon-path: Public classes
id: Public classes
input-fields: Public classes
input-type: Public classes
integrity: Private classes

J
js-files: Public classes

L
label: Public classes
label: Public classes
login-authenticator: Public classes
login-failed: Public classes
login-form: Public classes
logout-button: Public classes

M
max-items-to-display: Public classes
multiple: Public classes

N
name: Public classes
next-button: Public classes
north: Public classes

O
on-view: Public classes
on-view-label: Public classes
options: Public classes
options: Public classes
other-header-content: Public classes

P
pages: Private classes
path: Private classes
prev-button: Public classes
producer: Public classes
producer: Public classes
protected: Public classes

R
required: Public classes

S
scope: Public classes
selector: Public classes
session-tag: Private classes
signout-hook: Public classes
Slot, base-path: Private classes
Slot, body: Public classes
Slot, bottom: Public classes
Slot, callback: Public classes
Slot, center: Public classes
Slot, charset: Public classes
Slot, check-function: Public classes
Slot, checked-option: Public classes
Slot, classes: Public classes
Slot, colum-descriptions: Public classes
Slot, composite: Private classes
Slot, created-paths: Private classes
Slot, crossorigin: Private classes
Slot, css-files: Public classes
Slot, current-from: Public classes
Slot, current-page: Private classes
Slot, display-selector: Public classes
Slot, display-value: Public classes
Slot, east: Public classes
Slot, error-happened: Public classes
Slot, error-message: Public classes
Slot, fn: Public classes
Slot, header: Public classes
Slot, http-method: Public classes
Slot, icon-path: Public classes
Slot, id: Public classes
Slot, input-fields: Public classes
Slot, input-type: Public classes
Slot, integrity: Private classes
Slot, js-files: Public classes
Slot, label: Public classes
Slot, label: Public classes
Slot, login-authenticator: Public classes
Slot, login-failed: Public classes
Slot, login-form: Public classes
Slot, logout-button: Public classes
Slot, max-items-to-display: Public classes
Slot, multiple: Public classes
Slot, name: Public classes
Slot, next-button: Public classes
Slot, north: Public classes
Slot, on-view: Public classes
Slot, on-view-label: Public classes
Slot, options: Public classes
Slot, options: Public classes
Slot, other-header-content: Public classes
Slot, pages: Private classes
Slot, path: Private classes
Slot, prev-button: Public classes
Slot, producer: Public classes
Slot, producer: Public classes
Slot, protected: Public classes
Slot, required: Public classes
Slot, scope: Public classes
Slot, selector: Public classes
Slot, session-tag: Private classes
Slot, signout-hook: Public classes
Slot, south: Public classes
Slot, supplied: Public classes
Slot, target-foreign-p: Public classes
Slot, text: Public classes
Slot, title: Public classes
Slot, uri-path: Public classes
Slot, value: Public classes
Slot, value: Public classes
Slot, view: Public classes
Slot, west: Public classes
Slot, widgets: Public classes
Slot, widgets: Private classes
Slot, widgets: Private classes
south: Public classes
Special Variable, *application-root*: Public special variables
Special Variable, *automatically-set-languages*: Public special variables
Special Variable, *button-call-path*: Public special variables
Special Variable, *css-directory*: Public special variables
Special Variable, *css-path*: Public special variables
Special Variable, *dirty-objects-session-key*: Private special variables
Special Variable, *dirty-objects-uri-path*: Public special variables
Special Variable, *global-widget-holder*: Private special variables
Special Variable, *init-widgets-hooks*: Public special variables
Special Variable, *input-field-for-old-uri*: Private special variables
Special Variable, *javascript-checker-path*: Public special variables
Special Variable, *javascript-path*: Public special variables
Special Variable, *jquery-cdn-link*: Public special variables
Special Variable, *js-directory*: Public special variables
Special Variable, *language-key-in-session*: Public special variables
Special Variable, *link-call-path*: Public special variables
Special Variable, *login-authentication-keyword*: Public special variables
Special Variable, *navigation-widgets*: Private special variables
Special Variable, *port*: Public special variables
Special Variable, *protection-circles-session-key*: Public special variables
Special Variable, *rest-methods*: Private special variables
Special Variable, *rest-path*: Public special variables
Special Variable, *static-directory*: Public special variables
Special Variable, *web*: Public special variables
Special Variable, *widgets-css-filename*: Public special variables
Special Variable, *widgets-js-filename*: Public special variables
Special Variable, +translate+: Public special variables
supplied: Public classes

T
target-foreign-p: Public classes
text: Public classes
title: Public classes

U
uri-path: Public classes

V
value: Public classes
value: Public classes
view: Public classes

W
west: Public classes
widgets: Public classes
widgets: Private classes
widgets: Private classes


A.4 Data types

Jump to:   <  
C   D   F   L   M   N   P   S   U   W  
Index Entry  Section

<
<blank-navigation-widget>: Public classes
<border-widget>: Public classes
<button-widget>: Public classes
<callback-widget>: Public classes
<composite-widget>: Public classes
<css-file>: Public classes
<dirty-widget-holder>: Private classes
<file>: Private classes
<form-field>: Public classes
<form-widget>: Public classes
<function-widget>: Public classes
<hcomposite-widget>: Public classes
<header-widget>: Public classes
<html-document-widget>: Public classes
<input-field>: Public classes
<js-file>: Public classes
<link-widget>: Public classes
<login-widget>: Public classes
<menu-navigation-widget>: Public classes
<navigation-widget>: Private classes
<option-field>: Public classes
<radio-field>: Public classes
<select-field>: Public classes
<string-widget>: Public classes
<table-item>: Public classes
<table-widget>: Public classes
<viewgrid-item>: Public classes
<viewgrid-widget>: Public classes
<widget-holder>: Private classes
<widget>: Public classes

C
callback-widget.lisp: The caveman2-widgets/src/callback-widget․lisp file
caveman2-widgets: The caveman2-widgets system
caveman2-widgets: The caveman2-widgets package
caveman2-widgets.asd: The caveman2-widgets/caveman2-widgets․asd file
caveman2-widgets.callback-widget: The caveman2-widgets․callback-widget package
caveman2-widgets.default-widgets: The caveman2-widgets․default-widgets package
caveman2-widgets.document: The caveman2-widgets․document package
caveman2-widgets.lisp: The caveman2-widgets/src/caveman2-widgets․lisp file
caveman2-widgets.login: The caveman2-widgets․login package
caveman2-widgets.navigation: The caveman2-widgets․navigation package
caveman2-widgets.util: The caveman2-widgets․util package
caveman2-widgets.widget: The caveman2-widgets․widget package
Class, <blank-navigation-widget>: Public classes
Class, <border-widget>: Public classes
Class, <button-widget>: Public classes
Class, <callback-widget>: Public classes
Class, <composite-widget>: Public classes
Class, <css-file>: Public classes
Class, <dirty-widget-holder>: Private classes
Class, <file>: Private classes
Class, <form-field>: Public classes
Class, <form-widget>: Public classes
Class, <function-widget>: Public classes
Class, <hcomposite-widget>: Public classes
Class, <header-widget>: Public classes
Class, <html-document-widget>: Public classes
Class, <input-field>: Public classes
Class, <js-file>: Public classes
Class, <link-widget>: Public classes
Class, <login-widget>: Public classes
Class, <menu-navigation-widget>: Public classes
Class, <navigation-widget>: Private classes
Class, <option-field>: Public classes
Class, <radio-field>: Public classes
Class, <select-field>: Public classes
Class, <string-widget>: Public classes
Class, <table-item>: Public classes
Class, <table-widget>: Public classes
Class, <viewgrid-item>: Public classes
Class, <viewgrid-widget>: Public classes
Class, <widget-holder>: Private classes
Class, <widget>: Public classes

D
default-widgets.lisp: The caveman2-widgets/src/default-widgets․lisp file
document.lisp: The caveman2-widgets/src/document․lisp file

F
File, callback-widget.lisp: The caveman2-widgets/src/callback-widget․lisp file
File, caveman2-widgets.asd: The caveman2-widgets/caveman2-widgets․asd file
File, caveman2-widgets.lisp: The caveman2-widgets/src/caveman2-widgets․lisp file
File, default-widgets.lisp: The caveman2-widgets/src/default-widgets․lisp file
File, document.lisp: The caveman2-widgets/src/document․lisp file
File, login.lisp: The caveman2-widgets/src/login․lisp file
File, navigation.lisp: The caveman2-widgets/src/navigation․lisp file
File, util.lisp: The caveman2-widgets/src/util․lisp file
File, widget.lisp: The caveman2-widgets/src/widget․lisp file

L
login.lisp: The caveman2-widgets/src/login․lisp file

M
Module, src: The caveman2-widgets/src module

N
navigation.lisp: The caveman2-widgets/src/navigation․lisp file

P
Package, caveman2-widgets: The caveman2-widgets package
Package, caveman2-widgets.callback-widget: The caveman2-widgets․callback-widget package
Package, caveman2-widgets.default-widgets: The caveman2-widgets․default-widgets package
Package, caveman2-widgets.document: The caveman2-widgets․document package
Package, caveman2-widgets.login: The caveman2-widgets․login package
Package, caveman2-widgets.navigation: The caveman2-widgets․navigation package
Package, caveman2-widgets.util: The caveman2-widgets․util package
Package, caveman2-widgets.widget: The caveman2-widgets․widget package

S
src: The caveman2-widgets/src module
System, caveman2-widgets: The caveman2-widgets system

U
util.lisp: The caveman2-widgets/src/util․lisp file

W
widget.lisp: The caveman2-widgets/src/widget․lisp file