from-object ( object -- ) (original) (raw)
Inputs
object | an object |
---|
Outputs
None
Word description
Sets the current form's values to the object's slot values.
Examples
Here is a typical action implementation, which selects a golf course object from the database with the ID specified in the HTTP request, and renders a form with values from this object:
[ validate-integer-id "id" value select-tuple from-object ] >>init { golf "view-course" } >>template
Definition
USING: assocs kernel mirrors ;
: from-object ( object -- )
[ values ] [ make-mirror ] bi* assoc-union! drop ;