Class Form-View

A view designed to interact with the user via input
forms.

Part of:

package weblocks, class view

Direct Superclass

viewA meta description of the user interface.

Slot

buttons
Contains a list of keywords that identify buttons to be rendered (by default contains :submit and :cancel). Default form view only recognizes :submit and :cancel keywords. Each item of the list may be a cons pair, in which case CAR of the pair should be a keyword, and CDR of the pair should be a string that will be presented to the user via value of the button.
Initform:(list submit cancel), Initargs::buttons; Accessors:form-view-buttons.
caption
A caption string to be used for the view. If this field is set to NIL (the default), each view may use a specialized caption.
Initargs::caption; Accessors:view-caption.
default-action
A default action that will be called upon submission of the form if :action isn't specified in keyword parameters when rendering the view.
Initform:(lambda (&rest args) (declare (ignore args))), Initargs::default-action; Accessors:form-view-default-action.
default-fields-prefix-fn
A function called prior to rendering the fields. The function should expect the view object, the object being rendered, and any additional arguments passed to the view.
Initargs::default-fields-prefix-fn; Accessors:view-fields-default-prefix-fn.
default-fields-suffix-fn
A function called after rendering the fields. The function should expect the view object, the object being rendered, and any additional arguments passed to the view.
Initargs::default-fields-suffix-fn; Accessors:view-fields-default-suffix-fn.
default-method
Default HTML method used for this form if :method isn't specified in keyword parameters when rendering the view. Possible values are :get (default) and :post.
Initform:get, Initargs::default-method; Accessors:form-view-default-method.
enctype
An enctype that will be used upon submission of the form.
Initargs::enctype; Accessors:form-view-default-enctype.
error-summary-threshold
When the number of fields in a form is longer than this threshold, an error summary is rendered at top whenever applicable.
Initform:*form-default-error-summary-threshold*, Initargs::error-summary-threshold; Accessors:form-view-error-summary-threshold.
fields
A list of objects of class 'view-field', used to describe the fields that the view will render.
Initargs::fields; Accessors:view-fields.
focusp
If set to true, renders appropriate JavaScript to focus on the first element of the form once the form is loaded. This slot is set to false by default.
Initargs::focusp; Accessors:form-view-focus-p.
inherit-from
A view to inherit from. Possible values include scaffold views (in which case a default scaffolding view will be used), a custom view name, or NIL. Specific views should inherit from an appropriate scaffold view by default.
Initargs::inherit-from; Accessors:view-inherit-from.
persistp
If this slot is set to true, the mixed in object will be persisted prior to being written to its parent via 'persist-object'. If null, 'persist-object' will not be called. If this slot is unbound (the default), the value will be taken from 'form-view-persist-p' of the mixin view.
Initargs::persistp; Accessors:mixin-form-view-field-persist-p.
use-ajax-p
If set to true (default) uses AJAX on form submission. Otherwise, a full postback is done to submit the form.
Initform:t, Initargs::use-ajax-p; Accessors:form-view-use-ajax-p.

Direct Method

parse-view-field-valueParse a string 'value' obtained from a request
using a specified 'parser' and save it into an app...
render-form-view-buttonsRenders buttons specified view 'buttons' slot of the 'form-view'
object. By default, this method ...
render-validation-summaryRenders a summary of validation errors on top of
the form. This function can be redefined to rend...
render-view-fieldRenders a given view field. This function should
render appropriate structural markup, and call r...
render-view-field-valueRenders 'value' obtained from 'field' using
'presentation'. If this function requires a textual r...
validate-form-view-fieldCalled by 'validate-object-form-view' during form
deserialization to validate a form view field. ...
validate-object-form-viewCalled by the framework during form deserialization
to validate a form view. Default implementati...
view-caption
with-view-headerRenders header and footer around the body of the
view. Specialize this function to customize rend...

Other Method

dependenciesReturn a list of dependencies for a particular
object.

Whenever a widget is rendered by webl...