[Bese-devel] Next trouble striking

Friedrich Dominicus frido at q-software-solutions.de
Thu Jul 7 13:53:24 UTC 2005


Again a simple problem. See the following code
(defcomponent foo-bar (form-component)
  ((num :accessor num
        :component (integer-field)))
  (:metaclass standard-component-class))

(defclass product ()
          ((tag :initarg :tag)
           (description :initarg :description)))
          

(defmethod render-on ((res response)(foo foo-bar))
  (let ((stream (content-stream res)))
    (write-main-menu :active +home-index+ :stream stream)
    (let ((product (make-instance 'product 
                                  :tag "foo"
                                  :description "foo-bar")))
      (<:h1 "Just testing")
      
      (<ucw:form :action (submit foo)
                 (<:table
                  (<:tr  
                   (<:td  (render-on res (num foo-bar)))
                   (<:td (<:as-html (tag product)))))))
    (write-footer :stream stream)))

(defentry-point "index.ucw" (:application *shop-application*) ()
  (call 'foo-bar))




(defparameter *shop-application*
  (make-instance 'cookie-session-application
                 :url-prefix "/ucw/shop/"
                 :tal-generator (make-instance 'yaclml:file-system-generator
                                               :cachep t
                                               :root-directories (list *ucw-tal-root*))))



Now I expected some output while doing getting to "index.ucw"

However I got:
(defentry-point "index.ucw" (:application *shop-application*) ()
  (call 'foo-bar))




(defparameter *shop-application*
  (make-instance 'cookie-session-application
                 :url-prefix "/ucw/shop/"
                 :tal-generator (make-instance 'yaclml:file-system-generator
                                               :cachep t
                                               :root-directories (list *ucw-tal-root*))))


What am I doing wrong?


What I want is:

Getting an start page with an 
drop-down box containing numbers from 1-20 and 
second a short rendering of let's say the tag part of the product
class.

After that I probably want to do something and after that I want to
switch to asking for address details, payment details etc.

In short I want to use UCW for implementing a simply e-shop solution. 

If anyone has used UCW in that area please give me a hand. I'm getting
stuck too often..

Regards
Friedrich



More information about the bese-devel mailing list