[cells-devel] OpenAIR: Doesn't work for me any more ...
Frank Goenninger
frgo at mac.com
Fri Apr 11 14:51:53 UTC 2008
Andy,
I have tried to get this to work:
--- BEGIN OF FILE ---
(in-package #:openair)
(defvar *web-app*)
(defparameter *server* nil)
(defun ht-monitor-page (path resource-class)
(lambda (request)
(start-session)
(let ((root (or (session-value 'root)
(mk-web-app (:prefix path
:request (c-in request))
(make-instance resource-class
:fm-parent *parent*)))))
(setf *web-app* root)
(setf (session-value 'root) root)
(setf (request root) request)
(handler root))))
(defmd ht-monitor (page)
name
ip-address
term
:title ":: HUNCHENTOOT MONITOR ::"
:style "/css/ht-monitor.css"
:name (c? (server-name *server*))
:ip-address (c_? (server-address *server*))
:term (c-in "")
:kids (c? (the-kids
(mk-div ()
(mk-text (c? (conc$ "Name: " (name (u^ ht-monitor)))))
(mk-div ()
(mk-text (c? (conc$ "IP Address: " (ip-address (u^ ht-
monitor)))))))
(mk-form (:action "get")
(mk-label (:for "i")
(mk-text "Input: "))
(mk-input (:name "i" :id "i"
:-type "text"
:value (c? (reverse (term (u^ ht-
monitor)))))))
(mk-div ()
(mk-text (c? (conc$ "Reversed: " (reverse (term (u^
ht-monitor)))))))
)))
(defun start-ht-monitor ()
(cells-reset)
(reset-sessions)
(setf *catch-errors-p* nil)
(setf *print-circle* nil)
(setf *dispatch-table*
(list
(ht-monitor-page "/ht-monitor" 'ht-monitor)
(create-static-file-dispatcher-and-handler
"/index.html"
"/Users/frgo/projects/gt/app/ht-monitor/index.html")
(create-folder-dispatcher-and-handler
"/css/"
"/Users/frgo/projects/gt/app/ht-monitor/css/")
(create-folder-dispatcher-and-handler
"/js/"
"/opt/common-lisp/openair/js/")))
(when *server*
(hunchentoot:stop-server *server*))
(setq *server* (hunchentoot:start-server
:name "frgo's HT MONITOR"
:port 4242
:dispatch-table *dispatch-table* )))
(export! start-ht-monitor)
--- END OF FILE ---
Symptoms:
1. No updates received from Web browser
2. When trying to update a slot on a page model I do not get any
update of the Web page ...
Is the git repo somehow in an "intermediate state" ? - I seem to
remember you saying so in some email.
Appreciate your feedback.
Best,
Frank
More information about the cells-devel
mailing list