(defmethod render-widget (obj &rest args &key inlinep &allow-other-keys)
   (declare (special *page-dependencies*))
   (if (ajax-request-p)
     (dolist (dep (dependencies obj))
       (send-script
        (ps* `(,(typecase dep
                   (stylesheet-dependency 'include_css)
                   (script-dependency 'include_dom))
                ,(puri:render-uri (dependency-url dep) nil)))
         :before-load))
     (setf *page-dependencies*
          (append *page-dependencies* (dependencies obj))))

    ;; <changed>
    ;; Here is a test, where I added the prefix functions.
    ;; It's ugly, because safe-apply apears on the if and else part.

   (cond (inlinep (safe-apply (widget-prefix-fn obj) obj args)
                  (apply #'render-widget-body obj args)
                 (safe-apply (widget-suffix-fn obj) obj args))
         (t (apply #'with-widget-header obj #'render-widget-body
             (append
              (when (widget-prefix-fn obj)
                (list :widget-prefix-fn (widget-prefix-fn obj)))
              (when (widget-suffix-fn obj)
                (list :widget-suffix-fn (widget-suffix-fn obj)))
               args))))
     ;; </changed>

   (setf (widget-rendered-p obj) t))

Helmut

--~--~---------~--~----~------------~-------~--~----~
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