Object: BASE-HTML-SHEET (The :GWL Package) |
Mixins: SHEET-SECTION, VANILLA-MIXIN |
Input Slots (optional) | |
AFTER-PRESENT! void | |
This is an empty function by default, but can be overridden in the respondent of a form, to do some processing after the respondent's write-html-sheet function runs to present the object. | |
AFTER-SET! void | |
This is an empty function by default, but can be overridden in the requestor of a form, to do some processing after the requestor's form values are set into the specified bashee. | |
BASHEE [from 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. | |
BEFORE-PRESENT! void | |
This is an empty function by default, but can be overridden in the respondent of a form, to do some processing before the respondent's write-html-sheet function runs to present the object. This can be useful especially for objects which are subclasses of higher-level mixins such as application-mixin and node-mixin, where you do not have direct access to the write-html-sheet function and typically only define the model-inputs function. It is not always reliable to do processing in the model-inputs function, since some slots which depend on your intended modifications may already have been evaluated by the time the model-inputs function runs. | |
BEFORE-RESPONSE! void | |
This is an empty function by default, but can be overridden in a user specialization of base-html-sheet, to do some processing before the header-plist is evaluated and before the HTTP response is actually initiated. | |
BEFORE-SET! void | |
This is an empty function by default, but can be overridden in the requestor of a form, to do some processing before the requestor's form values are set into the specified bashee. | |
CHECK-SANITY? boolean | |
Determines whether a a sanity check is done (with the check-sanity function) before presenting the response page if this page is a respondent. Default is NIL. | |
DOM-ID [from 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. | |
FORCE-VALIDATION-FOR [from 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. | |
HIDDEN? [from VANILLA-MIXIN*] boolean | |
Indicates whether the object should effectively be a hidden-object even if specified in :objects. Default is nil. | |
HTML-SECTIONS [from 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-VALID [from 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. | |
INNER-HTML [from 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).] | |
JS-TO-EVAL [from 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. | |
ORDERED-FORM-CONTROLS [from 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.
| |
POSSIBLE-NILS [from 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? [from 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. | |
PROCESS-COOKIES! void | |
This is an empty function by default, but can be overridden in a user specialization of base-html-sheet, to do some processing before the header-plist is evaluated and before the HTTP response is actually initiated, but after the cookies-received have been set. | |
RETURN-OBJECT gdl object | |
Default object to which control will return with the write-back-link method | |
ROOT [from VANILLA-MIXIN*] gdl instance | |
The root-level node in this object's ``tree'' (instance hierarchy). | |
SAFE-CHILDREN [from 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 | |
STRINGS-FOR-DISPLAY [from 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. | |
TARGET string | |
Name of a browser frame or window to display this page. Default of NIL indicates to use the same window. | |
TRANSITORY-SLOTS list of keyword symbols | |
Messages corresponding to form fields which should not be retained against Updates to the model (e.g. calls to the update! function or hitting the Update button or link in the browser in development mode). Defaults to NIL (the empty list). | |
VISIBLE-CHILDREN [from 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. | |
Input Slots (optional, defaulting) | |
RESPONDENT [from SKELETON-UI-ELEMENT] gdl object | |
Object to respond to the form submission. Defaults to self. | |
Computed Slots (settable) | |
QUERY-PLIST plist | |
Contains submitted form field names and values for which no corresponding settable computed-slots exist. Where corresponding settable computed-slots exist, their values are set from the submitted form fields automatically. | |
Computed Slots | |
HEADER-PLIST plist | |
Extra http headers to be published with the URI for this page. | |
URL string | |
The canonical web address in the current session which points at this page. Also see `full-url`. Published on demand. | |
GDL Functions | |
CHECK-SANITY nil or error object | |
This function checks the "sanity" of this object. By default, it checks that following the object's root-path from the root resolves to this object. If the act of following the root-path throws an error, this error will be returned. Otherwise, if the result of following the root-path does not match the identity of this object, an error is thrown indicating this. Otherwise, NIL is returned and no error is thrown. You can override this function to do what you wish. It should return NIL if the object is found to be "sane" and an throw an error otherwise. If check-sanity? is set to T in this object, this function will be invoked automatically within an ignore-errors by the function handling the GWL "/answer" form action URI when this object is a respondent, before the main-sheet is presented. | |
RESTORE-FORM-CONTROLS! void | |
Calls restore-defaults! on all the form-controls in this sheet. | |
SANITY-ERROR void | |
Emits a page explaining the sanity error. This will be invoked instead of the write-main-sheet if check-sanity? is set to T and the check-sanity throws an error. You may override this function to do what you wish. By default a minimal error message is displayed and a link to the root object is presented.
| |
SELECT-CHOICES void | |
Writes an HTML Select field with Options.
| |
WRITE-CHILD-LINKS void | |
Creates a default unordered list with links to each child part of self. The text of the links will come from each child's strings-for-display. | |
WRITE-DEVELOPMENT-LINKS void | |
Writes links for access to the standard developer views of the object, currently consisting of an update (Refresh!) link, a Break link, and a ta2 link. | |
WRITE-HTML-SHEET void | |
This GDL function should be redefined to generate the HTML page corresponding to this object. It can be specified here, or as the main-sheet output-function in an html-format lens for this object's type. This write-html-sheet function, if defined, will override any main-sheet function defined in the lens. Typically a write-html-sheet function would look as follows:
| |
WRITE-SELF-LINK void | |
Emits a hyperlink pointing to self. Note that if you need extra customization on the display-string (e.g. to include an image tag or other arbitrary markup), use with-output-to-string in conjunction with the html-stream macro.
| |
WRITE-STANDARD-FOOTER void | |
Writes some standard footer information. Defaults to writing Genworks and Franz copyright and product links. Note that VAR agreements often require that you include a ``powered by'' link to the vendor on public web pages. | |