This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmethod render ((form form-component)) | |
(<:form :method "post" :action "mailto:[email protected]" | |
(<: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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcomponent form-component () | |
()) | |
(defcomponent products-dropdown () | |
()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcomponent basic-window-component | |
(basic-window-features-mixin window-component) | |
() | |
(:documentation | |
"A convenience class for writing window components.")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcomponent standard-window-component | |
(basic-window-component) | |
((body | |
:initform nil | |
:accessor window-body | |
:component t | |
:initarg :body))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcomponent orders-window (standard-window-component) | |
() | |
(:default-initargs | |
:title "Book Order Form")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defclass example-message () | |
((message :accessor message | |
:initarg :message | |
:initform "World!")) | |
(:metaclass standard-component-class)) | |
(defcomponent example-message () | |
((message :accessor message | |
:initarg :message | |
:initform "World!"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun startup-orders () | |
(startup-server *orders-ucw-server*)) | |
(defun shutdown-orders () | |
(shutdown-server *orders-ucw-server*)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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))) |
NewerOlder