Skip to content

Instantly share code, notes, and snippets.

(defmethod render ((form form-component))
(<:form :method "post" :action "mailto:felideon+blog@gmail.com"
(<:as-html "Name: ") (<:text :name "Name") (<:br)
(<:as-html "Address: ") (<:text :name "Address") (<:br)
(<:as-html "Phone: ") (<:text :name "Phone") (<:br)
(<:p) (render (make-instance 'products-dropdown))
(<:p) (<:submit :value "Place Order")))
(defmethod render ((products products-dropdown))
(<:select :name "Product"
(defcomponent form-component ()
())
(defcomponent products-dropdown ()
())
(defcomponent basic-window-component
(basic-window-features-mixin window-component)
()
(:documentation
"A convenience class for writing window components."))
(defcomponent standard-window-component
(basic-window-component)
((body
:initform nil
:accessor window-body
:component t
:initarg :body)))
(defcomponent orders-window (standard-window-component)
()
(:default-initargs
:title "Book Order Form"))
(defclass example-message ()
((message :accessor message
:initarg :message
:initform "World!"))
(:metaclass standard-component-class))
(defcomponent example-message ()
((message :accessor message
:initarg :message
:initform "World!")))
(defun startup-orders ()
(startup-server *orders-ucw-server*))
(defun shutdown-orders ()
(shutdown-server *orders-ucw-server*))
(in-package #:ucw)
(defun make-orders-backend ()
(make-backend :httpd :host "localhost" :port 8080))
(defclass orders-server (standard-server)
())
(defun make-orders-server ()
(make-instance 'orders-server :backend (make-orders-backend)))