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.
Initform:(list submit cancel), Initargs::buttons; Accessors:form-view-buttons.
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.
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.
default-title
A default title that will be presented to the user if :title isn't specified in keyword parameters when rendering the view.
Initform:viewing, Initargs::default-title; Accessors:data-view-default-title.
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.
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.

Direct Method

parse-view-field-valueParse a string 'value' obtained from a request
using a specified 'parser' and save it into an app...
print-view-field-valueConverts a value to a textual representation.
Specialize this function to change the way a value ...
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...
with-view-headerRenders header and footer around the body of the
view. Specialize this function to customize rend...