Gendl Documentationstatic

base-form-control

objectgwl
mixins: gwl::skeleton-form-controlvanilla-mixin

This object can be used to represent a single HTML form control. It captures the initial default value, some display information such as the label, and all the standard HTML tag attributes for the tag e.g. INPUT, SELECT, TEXTAREA. GWL will process the data types according to specific rules, and validate the typed value according to other default rules. A custom validation-function can also be provided by user code.

Sequences of these objects (with :size, :indices, :matrix, and :radial) are supported.

This facility and its documentation is expected to undergo significant and frequent upgrades in the remainder of GDL 1573 and upcoming 1575.

Current to-do list:

  • Currently this works with normal HTTP form submission and full page reloading. We intend to make it work with AJAX and surgical page update as well.

  • We intend to provide inputs for all the standard tag attributes for the accompanying LABEL tag for the form control.

  • Additional form control elements to be included, to cover all types of form elements specified in current HTML standard from

    http://www.w3.org/TR/html401/interact/forms.html#h-17.2.1

  • button-form-control: submit buttons, reset buttons, push buttons.

  • checkbox-form-control: checkboxes, radio buttons (multiple of these must be able to have same name)

  • menu-form-control: select, along with optgroup and option.

  • text-form-control: single-line text input (including masked passwords) and multi-line (TEXTAREA) text input.

  • file-form-control: file select for submittal with a form.

  • hidden-form-control: input of type hidden.

  • object-form-control: (not sure how this is supposed to work yet).

Also, we have to study and clarify the issue of under what conditions values can possibly take on nil values, and what constitutes a required field as opposed to a non-validated field, and whether a blank string on a text input should be represented as a nil value or as an empty string.

Note that checkbox-form-control and menu-form-control currently get automatically included in the possible-nils.

Examples

 (in-package :gwl-user)

 (define-object test-form (base-html-sheet)
  
   :objects
   ((username :type 'text-form-control
              :size 35
              :maxlength 30
              :allow-nil? t
              :default "Ron Paul")
   
    (age :type 'text-form-control
         :size 5
         :validation-function #'(lambda(input) (or (null input) (> 80 input 70)))
         :domain :number
         ;;:default 72
         :default nil )
   
    (bio :type 'text-form-control
         :rows 8
         :size 120
         :default "
Congressman Ron Paul is the leading advocate for freedom in our nation's capital. 
As a member of the U.S. House of Representatives, Dr. Paul tirelessly works for 
limited constitutional government, low taxes, free markets, and a return to sound 
monetary policies. He is known among his congressional colleagues and his constituents 
for his consistent voting record. Dr. Paul never votes for legislation unless the 
proposed measure is expressly authorized by the Constitution. In the words of former 
Treasury Secretary William Simon, Dr. Paul is the one exception to the Gang of 535 on 
Capitol Hill.")
   
    (issues :type 'menu-form-control
            :choice-list (list "Taxes" "Health Care" "Foreign Policy")
            :default "Taxes"
            :multiple? t)
   
    (color :type 'menu-form-control
           :size 7
           :choice-plist (list :red "red" 
                               :green "green" 
                               :blue "blue" 
                               :magenta "magenta" 
                               :cyan "cyan" 
                               :yellow "yellow" 
                               :orange "orange")
           :validation-function #'(lambda(color)
                                    (if (intersection (ensure-list color) 
                                                      (list :yellow :magenta))
                                        (list :error :disallowed-color-choice)
                                      t))
           ;;:append-error-string? nil
           :multiple? t
           :default :red
           ;;:onchange "alert('hey now');" 
           )
   
    (early-riser? :type 'checkbox-form-control
                  :default nil)
   
    (favorite-links :type 'text-form-control
                    :sequence (:size 3)
                    :size 70
                    :default "http://")))

 (define-lens (html-format test-form)()
   :output-functions
   ((main-sheet
     ()
     (with-html-output (*html-stream* nil :indent t)
       (:html (:head (:title "Test Form"))
              (:body (:h2 (:center "Test Form"))
                     (the write-development-links)
                     (with-html-form (:cl-who? t)
                       (:p (str (the username html-string)))
                       (:p "(internal value is: " (fmt "~s" (the username value)) ")")
                       (:p (str (the age html-string)))
                       (:p "(internal value is: " (fmt "~s" (the age value)) ")")
                       (:p (str (the bio html-string)))
                       (:p (:table 
                            (:tr (:td (str (the issues html-string))))
                            (:tr (:td (str (the color html-string))))))
                       (:p (str (the early-riser? html-string)))
                      
                       (dolist (link (list-elements (the favorite-links)))
                         (htm (str (the-object link html-string))))
                      
                       (:p ((:input :type :submit :value " OK "))))))))))
 
 (publish :path "/fe"
          :function #'(lambda(req ent)
                        (gwl-make-object req ent "gwl-user::test-form")))

Messages (117 documented, 169 total)

acceptoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

accesskeyoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

aggregatecomputed-slotfrom vanilla-mixin*

GDL Instance. In an element of a sequence, this is the container object which holds all elements.

ajax-submit-on-change?optional-input-slot

Boolean. If set to non-nil, this field's value will be sent to server upon change. Default is nil.

ajax-submit-on-enter?optional-input-slot

Boolean. If set to non-nil, this field's value will be sent to server upon enter. Default is nil.

alignoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

all-mixinscomputed-slotfrom vanilla-mixin*

List of Symbols. Lists all the superclasses of the type of this object.

allow-invalid-type?optional-input-slot

Boolean. If non-nil, then values which fail the type test will still be allowed to be the value. Default is nil.

allow-invalid?optional-input-slot

Boolean. If non-nil, then values which fail the type or validation test will still be allowed to be the value. Default is t.

allow-nil?optional-input-slot

Boolean. Regardless of :domain, if this is non-nil, nil values will be accepted. Defaults to t if (the default) is nil, otherwise defaults to nil.

altoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

append-error-string?optional-input-slot

Boolean. Determines whether a default error string is appended to string ouput-function for html-format (and therefore html-string computed-slot as well). Defaults to t.

autocompleteoptional-input-slot

String. Hint to browser regarding autocomplete. Default is nil.

basheeoptional-input-slotfrom skeleton-ui-element

GDL Object. Object to have its settable computed-slots and/or query-plist set from the fields on the form upon submission. Defaults to self.

childrencomputed-slotfrom vanilla-mixin*

List of GDL Instances. All objects from the :objects specification, including elements of sequences as flat lists.

children-uncacheduncached-computed-slotfrom vanilla-mixin*

List of GDL Instances. All objects from the :objects specification, including elements of sequences as flat lists.

classoptional-input-slotfrom skeleton-form-control

String. You can use this to specify a user-defined class for the form-control. Defaults to nil, which means no class attribute will be generated.

defaultoptional-input-slot

Lisp value of a type compatible with (the domain). This is the initial default value for the control. This must be specified by user code, or an error will result.

direct-mixinscomputed-slotfrom vanilla-mixin*

List of Symbols. Lists the direct superclasses of the type of this object.

disabled?optional-input-slot

Boolean. Maps to HTML form control attribute of the same name. Default is nil.

documentationfunctionfrom vanilla-mixin*

Plist. Returns the :documentation plist which has been specified the specific part type of this instance.

dom-idoptional-input-slotfrom skeleton-ui-element

String. This is the auto-computed dom-id which should be used for rendering this section. If you use the main-div HTML string for rendering this object as a page section, then you do not have to generate the :div tag yourself - the main-div will be a string of HTML which is wrapped in the correct :div tag already.

domainoptional-input-slot

Keyword symbol, one of :number, :keyword, :list-of-strings, :list-of-anything, or :string. This specifies the expected and acceptable type for the submitted form value. If possible, the submitted value will be coerced into the specified type. The default is based upon the Lisp type of (the default) provided as input to this object. If the default is nil, the domain will default to :string

errorsettable-computed-slot

String or error object. This will be set to a validation error if any, and cleared when the error is gone.

failed-form-controlscomputed-slotfrom skeleton-ui-element

List of GDL objects. All the form-controls which do not pass validation.

failed-valuesettable-computed-slot

Lisp value. The value which was attempted to be set but failed validation.

field-nameoptional-input-slotfrom skeleton-form-control

Keyword symbol. The name of this field. Computed from the object name within the tree.

first?computed-slotfrom vanilla-mixin*

Boolean. For elements of sequences, T iff there is no previous element.

follow-root-pathfunctionfrom vanilla-mixin*

GDL Instance. Using this instance as the root, follow the reference chain represented by the given path. :arguments (path "List of Symbols or Pairs of Symbol and Integer")

force-validation-foroptional-input-slotfrom skeleton-ui-element

List of GDL objects of type form-control. The validation-function will be forced on these objects when a form is submitted, even if the object's html form-control does not happen to be included in the values submitted with the form. Defaults to nil.

form-controlcomputed-slotfrom skeleton-form-control

String of valid HTML. This is the default HTML which can be included in a form in a web page to display this form control. Previously known as form-control-string. Default is the form-control-string.

form-control-stringcomputed-slotfrom skeleton-form-control

String of valid HTML. Also known as simply form-control. This is the default HTML which can be included in a form in a web page to display this form control. Default is the output from form-control method of the lens for html-format and the specific type of this object, returned as a string.

form-controlscomputed-slotfrom skeleton-form-control

List of GDL objects. All the children or hidden-children of type base-form-control.

fragment-divfunctionfrom skeleton-ui-element

String of HTML. The value of the computed-slot named by KEY (a keyword) wrapped in a div carrying the fragment's auto dom-id, so a gdlAjax call can replace its innerHTML without the content living in a base-html-div child section. List KEY in html-fragments to participate in ajax responses. [gornskew 2026-07-20]

gdl-ajax-callfunctionfrom skeleton-ui-element

String.

This function returns a string of Javascript, appropriate to use for events such as :onclick, :onchange, etc, which will invoke an Ajax request to the server, which will respond by replacing the innerHTML of affected :div's, and running the Javascript interpreter to evaluate (the js-to-eval), if any.

:examples "

 FLAG -- Fill in!!!

"

:&key ((bashee (the bashee)) "GDL Object. This object will have the function-key called on it, if any." (respondent (the respondent)) "GDL Object. This must be the object which represents the actual web page being used." (function-key nil) "Keyword symbol. This keyword symbol must name a GDL function or method which is to be invoked with the Ajax call." (arguments nil) "List of values. This is the argument list on which the function named by function-key will be applied." (form-controls nil) "List of GDL objects of type base-form-control. Each of the objects in this list will have its current value (as entered by the user) scraped from the web page and its value in the model "bashed" to reflect what has been entered on the page.")

hidden-childrencomputed-slotfrom vanilla-mixin*

List of GDL Instances. All objects from the :hidden-objects specification, including elements of sequences as flat lists.

hidden?optional-input-slotfrom vanilla-mixin*

Boolean. Indicates whether the object should effectively be a hidden-object even if specified in :objects. Default is nil.

html-fragmentsoptional-input-slotfrom skeleton-ui-element

List of keyword symbols, naming computed-slots of this sheet whose values are HTML strings rendered at toplevel via fragment-div. Usually UNNECESSARY: fragment-div self-registers each key it renders (monotonically, outside the KB), so this list is only for extra keys not (yet) rendered through fragment-div on this sheet. Any listed fragment whose slot-status is :invalidated at gdlAjax response time gets recomputed and its innerHTML replaced in the browser -- no base-html-div child section required. [gornskew 2026-07-20]

html-sectionsoptional-input-slotfrom skeleton-ui-element

List of HTML sections to be scanned and possibly replaced in response to GDL Ajax calls. Override this slot at your own risk. The default is all sections who are most recently laid out on the respondent sheet, and this is set programmatically every time the sheet section's main-div is demanded.

html-sections-validoptional-input-slotfrom skeleton-ui-element

List of valid HTML sections to be scanned and possibly replaced in response to GDL Ajax calls. Override this slot at your own risk. The default is all sections who are most recently laid out on the respondent sheet, and this is set programmatically every time the sheet section's main-div is demanded.

html-stringcomputed-slotfrom skeleton-form-control

String of valid HTML. This is the default HTML which can be included in a form in a web page to display this form control, wrapped with labels and table cells.

idoptional-input-slotfrom skeleton-form-control

Keyword symbol. The ID attribute for this tag. Defaults to (the field-name).

indexcomputed-slotfrom vanilla-mixin*

Integer. Sequential index number for elements of a sequence, NIL for singular objects.

inner-htmloptional-input-slotfrom skeleton-ui-element

String. This can be used with (str ...) [in cl-who] or (:princ ...) [in htmlGen] to output this section of the page, without the wrapping :div tag [so if you use this, your code would be responsible for wrapping the :div tag with :id (the dom-id).]

ismap?optional-input-slot

Boolean. Maps to HTML form control attribute of the same name. Default is nil.

js-to-evaloptional-input-slotfrom skeleton-ui-element

String of valid Javascript. This Javascript will be send with the Ajax response, and evaluated after the innerHTML for this section has been replaced.

label-positionoptional-input-slot

Keyword symbol or nil. Specifies where the label tag goes, if any. Can be :table-td (label goes in a td before the form control), :table-td-append (label goes in a td after the form control), :prepend (label tag wraps around form control and label text comes before form control),
:append (label tag wraps around form control and label text comes after form control), :table-with-class (like :table-td, but adds a class "form-control" to the table), or :as-div (puts label and control inside a div of class "form-control").

Default is :as-div

langoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

last?computed-slotfrom vanilla-mixin*

Boolean. For elements of sequences, T iff there is no next element.

leaf?computed-slotfrom vanilla-mixin*

Boolean. T if this object has no children, NIL otherwise.

leavescomputed-slotfrom vanilla-mixin*

List of GDL Objects. A Collection of the leaf nodes of the given object.

leaves-uncacheduncached-computed-slotfrom vanilla-mixin*

List of GDL Objects. A Collection of the leaf nodes of the given object.

main-div%computed-slotfrom skeleton-ui-element

String. This should be used with (str ...) [in cl-who] or (:princ ...) [in htmlGen] to output this section of the page, including the wrapping :div tag.

maxlengthoptional-input-slot

Number or nil. Maps to HTML form control attribute of the same name. Default is nil.

message-documentationfunctionfrom vanilla-mixin*

String. This is synonymous with slot-documentation

message-listfunctionfrom vanilla-mixin*

List of Keyword Symbols. Returns the messages (slots, objects, and functions) of this object, according to the filtering criteria as specified by the arguments. :&key ((category :all) "Keyword. Either :all or the individual category of messages to be returned. This can be one of:

  • :computed-slots

  • :settable-computed-slots

  • :required-input-slots

  • :optional-input-slots

  • :defaulted-input-slots

  • :query-slots

  • :functions

  • :objects

  • :quantified-objects

  • :hidden-objects

  • :quantified-hidden-objects

" (message-type :global) "Keyword Symbol, :local or :global. Indicates whether to return messages only from the local specific part type, or from all superclasses (mixins) as well." (return-category? nil) "Boolean. Indicates whether or not the category of each message should be returned before each message in the returned list." (base-part-type nil) "Symbol naming a GDL Part Type. Indicates a "base" part from which no messages should be returned, nor should messages be returned from superclasses (mixins) of this base part. If NIL (the default), messages are considered from all superclasses." (sort-order :unsorted) "Keyword Symbol. One of: :unsorted, :by-category, or :by-name." (filter :normal) "Function Object of two arguments or :normal. If a function object, applies this function to each returned category and message keyword, and filters out all pairs for which the function returns NIL. If :normal (the default), then no filtering is done.")

mixinsfunctionfrom vanilla-mixin*

List of Symbols. Returns the names of the immediate superclasses of this object.

:&key ((local? t) "Boolean. Indicates whether to give only direct mixins or all mixins from the entire inheritance hierarchy.")

name-for-displaycomputed-slotfrom vanilla-mixin*

Keyword symbol. The part's simple name, derived from its object specification in the parent or from the type name if this is the root instance.

nextcomputed-slotfrom vanilla-mixin*

GDL Instance. For elements of sequences, returns the next part in the sequence.

nullify-empty-string?optional-input-slot

Boolean. Regardless of :domain, if this is non-nil, empty strings will convert to nil. Defaults to (the allow-nil?)

onbluroptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onchangeoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil, unless ajax-submit-on-change? is non-nil, in which case it calls ajax to set current form value.

onclickoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

ondblclickoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onenteroptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil, unless ajax-submit-on-enter? is non-nil, in which case it calls ajax to set current form value.

onfocusoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onkeydownoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onkeypressoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onkeyupoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onmousedownoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onmousemoveoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onmouseoutoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onmouseoveroptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onmouseupoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

onselectoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

ordered-form-controlsoptional-input-slotfrom skeleton-ui-element

List of GDL objects, which should be of type 'base-form-control.

[Note -- this slot is not really necessary for protecting out-of-bounds sequence references anymore, the form-control processor protects against this by itself now].

These objects are validated and bashed first, in the order given. If the cardinality of one form-control depends on another as in the example below, then you should list those dependent objects first. Default is nil.

:examples

 
...
  
  :computed-slots ((number-of-nozzles (the number-of-nozzles-form value))
        (ordered-form-controls 
         (append (list-elements (the inner-flange-form))
             (list (the number-of-nozzles-form)))))
  
  :objects
  ((inner-flange-form
    :type 'menu-form-control 
    :choice-plist (list :hey "hey" :now "now")
    :default :hey
    :sequence (:size (the number-of-nozzles)))

   (number-of-nozzles-form
    :type 'text-form-control 
    :prompt "Number of Shell Nozzles Required: "
    :domain :number     
    :default 0)
parentcomputed-slotfrom vanilla-mixin*

GDL Instance. The parent of this object, or NIL if this is the root object.

placeholderoptional-input-slot

String. Text to place in the field by default, overwritten as soon as the field is selected. Works only in HTML5. Default is nil.

possible-nilsoptional-input-slotfrom skeleton-ui-element

List of keyword symbols. Messages corresponding to form fields which could be missing from form submission (e.g. checkbox fields). Defaults to the names of any children or hidden-children of type menu-form-control or checkbox-form-control.

preset-all?optional-input-slotfrom skeleton-ui-element

Boolean. This switch determines whether all form-controls should be preset before the final setting, in order to allow any interdependencies to be detected for validation or detecting changed values. If this is specified as a non-nil value, then any nil values of (the preset?) on individual form controls will be ignored. If this is specified as nil, then (the preset?) of individual form-controls (default of these is also nil) will be respected. Default is nil.

preset?optional-input-slot

Boolean. This switch determines whether this form-control should be preset before the final setting, in order to allow any interdependencies to be detected for validation or detecting changed values. Default is nil.

previouscomputed-slotfrom vanilla-mixin*

GDL Instance. For elements of sequences, returns the previous part in the sequence.

primary?optional-input-slotfrom skeleton-form-control

Boolean. Set this to t if the form-control should always occur first in an outputted snapshot file. Defaults to nil.

promptoptional-input-slot

String. The prompt used in the label.

readonly?optional-input-slot

Boolean. Maps to HTML form control attribute of the same name. Default is nil.

respondentdefaulted-input-slotfrom skeleton-ui-element

GDL Object. Object to respond to the form submission. Defaults to self.

restore-all-defaults!functionfrom vanilla-mixin*

Void. Restores all settable-slots in this instance to their default values.

restore-defaults!function

Void. Restores the default for the value, the failed-value, and the error.

restore-root!functionfrom vanilla-mixin*

Multiple Values: Total root-paths affected and total slots affected. Reverts any "remembered" bashed slots, starting from the root, to their default values. Note that any call to set-slot! or set-slots! or any use of web form-controls will result in "remembered values". Note that there is a :remember? keyword argument to set-slot! which defaults to t but if you specify it as nil, you can bash values without having them "remembered" and such slots would not be affected by this function.

restore-slot-default!functionfrom vanilla-mixin*

NIL. Restores the value of the given slot to its default, thus "undoing" any forcibly set value in the slot. Any dependent slots in the tree will respond accordingly when they are next demanded. Note that the slot must be specified as a keyword symbol (i.e. prepended with a colon (":")), otherwise it will be evaluated as a variable according to normal Lisp functional evaluation rules. :arguments (slot "Keyword Symbol") :key (force? "Boolean. Specify as t if you want to force non-settable slots to recompute (e.g. reading from databases or external files). Defaults to nil.")

restore-slot-defaults!functionfrom vanilla-mixin*

nil. Restores the value of the given slots to their defaults, thus "undoing" any forcibly set values in the slots. Any dependent slots in the tree will respond accordingly when they are next demanded. Note that the slots must be specified as keyword symbols (i.e. prepended with colons (":")), otherwise they will be evaluated as variables according to normal Lisp functional evaluation rules.

:arguments (slots "List of Keyword Symbols")

:&key ((force? force-restore-slot-default?) "Boolean. Indicates whether the slot values should be unbound, regardless of whether it had actually been bashed previously.")

restore-tree!functionfrom vanilla-mixin*

Void. Restores all settable-slots in this instance, and recursively in all descendant instances, to their default values.

rootoptional-input-slotfrom vanilla-mixin*

GDL Instance. The root-level node in this object's "tree" (instance hierarchy).

root-pathcomputed-slotfrom vanilla-mixin*

List of Symbols or of Pairs of Symbol and Integer. Indicates the path through the instance hierarchy from the root to this object. Can be used in conjunction with the follow-root-path GDL function to return the actual instance.

root-path-localcomputed-slotfrom vanilla-mixin*

List of Symbols or of Pairs of Symbol and Integer. Indicates the path through the instance hierarchy from the local root to this object. Can be used in conjunction with the follow-root-path GDL function to return the actual instance.

root?computed-slotfrom vanilla-mixin*

Boolean. T iff this part has NIL as its parent and therefore is the root node.

safe-childrenoptional-input-slotfrom vanilla-mixin*

List of GDL Instances. All objects from the :objects specification, including elements of sequences as flat lists. Any children which throw errors come back as a plist with error information

safe-hidden-childrencomputed-slotfrom vanilla-mixin*

List of GDL Instances. All objects from the :hidden-objects specification, including elements of sequences as flat lists. Any children which throw errors come back as a plist with error information

set-slot!functionfrom vanilla-mixin*

NIL. Forcibly sets the value of the given slot to the given value. The slot must be defined as :settable for this to work properly. Any dependent slots in the tree will respond accordingly when they are next demanded. Note that the slot must be specified as a keyword symbol (i.e. prepended with a colon (":")), otherwise it will be evaluated as a variable according to normal Lisp functional evaluation rules.

Note also that this must not be called (either directly or indirectly) from within the body of a Gendl computed-slot. The caching and dependency tracking mechanism in Gendl will not work properly if this is called from the body of a computed-slot, and furthermore a runtime error will be generated.

:arguments (slot "Keyword Symbol" value "Lisp Object. (e.g. Number, String, List, etc.)")

:&key ((remember? t) "Boolean. Determines whether to save in current version-tree." (warn-on-non-toplevel? t) "Boolean. Determines whether to warn if this is called from the body of a cached slot." )

set-slots!functionfrom vanilla-mixin*

NIL. Forcibly sets the value of the given slots to the given values. The slots must be defined as :settable for this to work properly. Any dependent slots in the tree will respond accordingly when they are next demanded. Note that the slots must be specified as a keyword symbols (i.e. prepended with a colon (":")), otherwise they will be evaluated as variables according to normal Lisp functional evaluation rules. :arguments (slots-and-values "Plist. Contains alternating slots and values to which they are to be set." warn-on-non-toplevel? "Boolean. Indicates whether a warning should be issued for calling from inside the body of a cached slot. Default is t.")

sizeoptional-input-slot

Number or nil. Maps to HTML form control attribute of the same name. Default is nil.

slot-documentationfunctionfrom vanilla-mixin*

Plist of Symbols and Strings. Returns the part types and slot documentation which has been specified for the given slot, from most specific to least specific in the CLOS inheritance order. Note that the slot must be specified as a keyword symbol (i.e. prepended with a colon (":")), otherwise it will be evaluated as a variable according to normal Lisp functional evaluation rules. :arguments (slot "Keyword Symbol. Names the slot for which documentation is being requested.")

slot-sourcefunctionfrom vanilla-mixin*

Body of GDL code, in list form.

:arguments (slot "Keyword Symbol. Names the slot for which documentation is being requested.")

slot-statusfunctionfrom vanilla-mixin*

Keyword symbol. Describes the current status of the requested slot:

  • :unbound: it has never been demanded.

  • :invalidated: it was demanded at some point, but something it depends on has been modified since; it is currently unbound and will be re-evaluated on next demand.

  • :evaluated: it has been demanded and it is currently bound to the default value based on the code.

  • :set: (for :settable slots only, which includes all required :input-slots) it has been modified and is currently bound to the value to which it was explicitly set.

  • :toplevel: (for root-level object only) its value was passed into the root-level object as a toplevel input at the time of object instantiation.

srcoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

strings-for-displayoptional-input-slotfrom vanilla-mixin*

String or List of Strings. Determines how the name of objects of this type will be printed in most places. This defaults to the name-for-display (generally the part's name as specified in its parent), followed by an index number if the part is an element of a sequence.

styleoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

tabindexoptional-input-slot

Integer or nil. Maps to HTML form control attribute of the same name. Default is nil.

titleoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

toggle-slot!functionfrom vanilla-mixin*

Void. Sets giving slot to its boolean opposite. &args (slot "Keyword symbol. Name of the slot as a keyword symbol.")

typecomputed-slotfrom vanilla-mixin*

Symbol. The GDL Type of this object.

update!functionfrom vanilla-mixin*

Void. Uncaches all cached data in slots and objects throughout the instance tree from this node, forcing all code to run again the next time values are demanded. This is useful for updating an existing model or part of an existing model after making changes and recompiling/reloading the code of the underlying definitions. Any set (modified) slot values will, however, be preserved by the update.

usemapoptional-input-slot

String or nil. Maps to HTML form control attribute of the same name. Default is nil.

validation-functionoptional-input-slot

Function of one argument. The argument will be the submitted form value converted to the proper type. The return value from this function can be nil, any non-nil value, or a plist with keys :validated-value and :error. The following behavior applies:

  • If the function returns nil, error is set to :unspecified-validation-fail.

  • If the function returns a plist with keys :validated-value and :error, and if :error is non-nil, it means the value is not acceptable, the form-controls error message is set to this error (usually a keyword symbol), and the error string will be appended to the html-string by default.

  • If the function returns any other value, then the properly typed submitted form value is considered valid and is used.

In the case of an error, the form-control's failed-value message is set to the properly typed submitted form value. If allow-invalid? is non-nil, then the form-control's value message is also set to this value (i.e. the invalid value is still accepted, even though a non-nil error is present).

Default is (list :validated-value value :error nil).

valuesettable-computed-slot

Lisp value. The current value of this form control.

visible-childrenoptional-input-slotfrom vanilla-mixin*

List of GDL Instances. Additional objects to display in Tatu tree. Typically this would be a subset of hidden-children. Defaults to NIL.

write-snapshotfunctionfrom vanilla-mixin*

Void. Writes a file containing the toplevel inputs and modified settable-slots starting from the root of the current instance. Typically this file can be read back into the system using the read-snapshot function.

:&key ((filename "/tmp/snap.gdl") "String or pathname. The target file to be written." (root-paths-to-ignore nil) "List of root-paths or nil. Any objects with matching root-path will be ignored for the snapshot write." )