Hello.
I'm investigating weblocks now and just figured out such a thing:

(defun make-about-page ()
  (make-instance 'widget :children
                 (list
                       (make-instance 'string-widget :content
                                    "About page"))))

(defun make-test-page ()
  (make-instance 'widget :children
                 (list
                   (make-instance 'string-widget :content
                                  "test")
                   (make-instance 'string-widget :content
                        (with-html (str (render-link (lambda (&rest
args)
                                (declare (ignore args))
                                (do-page #'make-test-page))
                              "test page"
                              :ajaxp nil))))
                   (make-instance 'string-widget :content
                                  "test2"))))

(defun/cc make-other-page (k)
                   (make-instance 'string-widget :content
                    (with-html (:p "Other Page")
                        (:p (render-link (lambda (&rest args)
                                (declare (ignorable args))
                                (answer k))
                              "Go Back")))))

(defun make-main-page ()
  (make-instance 'widget :children
                 (list
                    (make-navigation "Main Menu"
                        (list "About" (make-about-page) "about")
                        (list "Companies" (make-test-page) "test")))))

(defun init-user-session (root)
  (with-flow root
            (yield (make-main-page))))

And "test page" link just doesn't appear.
Running results into

<div class='widget string-widget' id='dom2'>
<p>test</p>
</div>
<div class='widget string-widget' id='dom3'>
<p></p>
</div>
<div class='widget string-widget' id='dom4'>
<p>test2</p>
</div>

The only strange  thing is  the output when I load the file:

* (load "/home/ray/projects/localsite/src/layout.lisp")
<a href='/about?action=4027%3A9A51E3C66D4DB032E3C3ABE5145C46AD'>test
page</a>
T
* (reset-sessions)
*

That looks like render-page has wrong output stream. Could I do
something with it?

-- 
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en.

Reply via email to