[claw-cvs] r70 - in trunk/main/claw-html.dojo: . src src/js

achiumenti at common-lisp.net achiumenti at common-lisp.net
Tue Aug 26 10:49:31 UTC 2008


Author: achiumenti
Date: Tue Aug 26 06:49:29 2008
New Revision: 70

Added:
   trunk/main/claw-html.dojo/
   trunk/main/claw-html.dojo/README
   trunk/main/claw-html.dojo/claw-html.dojo.asd
   trunk/main/claw-html.dojo/src/
   trunk/main/claw-html.dojo/src/dijit.lisp
   trunk/main/claw-html.dojo/src/djbody.lisp
   trunk/main/claw-html.dojo/src/djbutton.lisp
   trunk/main/claw-html.dojo/src/djclaw.lisp
   trunk/main/claw-html.dojo/src/djcolorpalette.lisp
   trunk/main/claw-html.dojo/src/djcontainers.lisp
   trunk/main/claw-html.dojo/src/djcontent-pane.lisp
   trunk/main/claw-html.dojo/src/djdialog.lisp
   trunk/main/claw-html.dojo/src/djform.lisp
   trunk/main/claw-html.dojo/src/djlayout.lisp
   trunk/main/claw-html.dojo/src/djlink.lisp
   trunk/main/claw-html.dojo/src/djmenu.lisp
   trunk/main/claw-html.dojo/src/djprogressbar.lisp
   trunk/main/claw-html.dojo/src/djtitlepane.lisp
   trunk/main/claw-html.dojo/src/djtoolbar.fasl   (contents, props changed)
   trunk/main/claw-html.dojo/src/djtoolbar.lisp
   trunk/main/claw-html.dojo/src/djtooltip.lisp
   trunk/main/claw-html.dojo/src/djtree.lisp
   trunk/main/claw-html.dojo/src/djwidget.lisp
   trunk/main/claw-html.dojo/src/js/
   trunk/main/claw-html.dojo/src/js/ActionLink.js
   trunk/main/claw-html.dojo/src/js/Dialog.js
   trunk/main/claw-html.dojo/src/js/Editor.js
   trunk/main/claw-html.dojo/src/js/Editor2.js
   trunk/main/claw-html.dojo/src/js/FloatingContent.js
   trunk/main/claw-html.dojo/src/js/Form.js
   trunk/main/claw-html.dojo/src/js/HardLink.js
   trunk/main/claw-html.dojo/src/js/Rounded.js
   trunk/main/claw-html.dojo/src/js/claw.js
   trunk/main/claw-html.dojo/src/misc.lisp
   trunk/main/claw-html.dojo/src/packages.lisp
Log:
CLAW dojo integration

Added: trunk/main/claw-html.dojo/README
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/README	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,6 @@
+to use claw-dojo library download dojo at 
+
+http://download.dojotoolkit.org/release-1.1.1/dojo-release-1.1.1.tar.gz
+
+Then unpack it into the src directory and rename the extacted directory
+"dojo-release-1.1.1" from to "dojotoolkit"
\ No newline at end of file

Added: trunk/main/claw-html.dojo/claw-html.dojo.asd
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/claw-html.dojo.asd	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,54 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/claw-dojo.asd $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(asdf:defsystem :claw-html.dojo
+  :name "claw-html.dojo"
+  :author "Andrea Chiumenti"
+  :description "claw dojo-1.1.0 integration"
+  :depends-on (:claw :claw-html :parenscript)
+  :components ((:module src
+                        :components ((:file "packages")
+                                     (:file "misc" :depends-on ("packages"))
+                                     (:file "djlink" :depends-on ("misc"))
+                                     (:file "djwidget" :depends-on ("misc"))
+                                     (:file "djcontent-pane" :depends-on ("misc"))
+                                     (:file "djbody" :depends-on ("djcontent-pane"))
+                                     (:file "dijit" :depends-on ("djwidget"))
+                                     (:file "djclaw" :depends-on ("djwidget"))
+                                     (:file "djform" :depends-on ("djwidget"))
+                                     (:file "djbutton" :depends-on ("djwidget"))
+                                     (:file "djmenu" :depends-on ("djwidget"))
+                                     (:file "djdialog" :depends-on ("djwidget"))
+                                     (:file "djcolorpalette" :depends-on ("djwidget"))
+                                     (:file "djprogressbar" :depends-on ("djwidget"))
+                                     (:file "djtitlepane" :depends-on ("djwidget"))
+                                     (:file "djtree" :depends-on ("djwidget"))
+                                     (:file "djlayout" :depends-on ("djwidget"))
+                                     (:file "djtooltip" :depends-on ("djwidget"))
+                                     (:file "djtoolbar" :depends-on ("djwidget"))))))

Added: trunk/main/claw-html.dojo/src/dijit.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/dijit.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,35 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/dijit.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djbackground-iframe (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.BackgroundIframe component. More info at http://api.dojotoolkit.org/"))

Added: trunk/main/claw-html.dojo/src/djbody.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djbody.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,121 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djbody.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defgeneric scripts-content-pane> (&rest rest))
+
+(defclass djbody (wcomponent)
+  ((class :initarg :class
+          :reader djbody-class
+          :documentation "The css class of the <body> tag element")
+   (theme :initarg :theme
+          :reader djbody-theme
+          :documentation "The theme name. See http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/themes-and-design for more details")
+   (themes-url :initarg :themes-url
+               :reader djbody-themes-url
+               :documentation "The url that contains dojo themes")
+   (parse-on-load-p :initarg :parse-on-load
+                    :reader djbody-parse-on-load-p
+                    :documentation "Shoul always be true")
+   (debugp :initarg :is-debug
+           :reader djbody-debugp
+           :documentation "Set to true if you want to debug dojo calls")
+   (load-dojo-js :initarg :load-dojo-js
+                 :reader load-dojo-js
+                 :documentation "When not nil it loads the dojo.js file with a <script> tag")
+   (djconfig :initarg :djconfig
+             :reader djbody-djconfig
+             :documentation "Additional dojo configurations"))
+  (:metaclass metacomponent)
+  (:default-initargs :class "" :theme "tundra"
+                     :themes-url (format nil "~a/dojotoolkit/dijit/themes/" (clawserver-base-path *clawserver*))
+                     :parse-on-load "true"
+                     :load-dojo-js t
+                     :is-debug nil
+                     :djconfig nil)
+  (:documentation "This class provide a <body> tag that is enabled for dojo."))
+
+(let ((class (find-class 'djbody)))
+  (closer-mop:ensure-finalized class)
+  (setf (documentation (find-symbol (format nil "~a>" (class-name class))) 'function)
+        (format nil "Description: ~a~%Parameters:~%~a~a~%~%~a"
+                "Function that instantiates a DJBODY component and renders a html <body> tag enabled for dojo."
+                *id-and-static-id-description*
+                (describe-html-attributes-from-class-slot-initargs class)
+                (describe-component-behaviour class))))
+
+(defmethod htcomponent-script-files ((o djbody))
+  (let ((parse-on-load (djbody-parse-on-load-p o))
+        (is-debug (djbody-debugp o))
+        (djconfig (djbody-djconfig o)))
+    (when (load-dojo-js o)
+      (script> :type "text/javascript"
+               :src  (format nil "~a/dojotoolkit/dojo/dojo.js" (clawserver-base-path *clawserver*))
+               :djconfig (if (null djconfig)
+                             (format nil
+                                     "parseOnLoad:~a,usePlainJson:true,isDebug:~a"
+                                     parse-on-load is-debug)
+                             (format nil
+                                     "parseOnLoad:~a,usePlainJson:true,~a,isDebug:~a"
+                                     parse-on-load djconfig is-debug))))))
+
+
+(defmethod htcomponent-stylesheet-files ((o djbody))
+  (let ((theme (djbody-theme o)))
+    (list
+     (format nil "~a/dojotoolkit/dojo/resources/dojo.css" (clawserver-base-path *clawserver*))
+     (format nil "~a/dojotoolkit/dijit/themes/dijit.css" (clawserver-base-path *clawserver*))
+     (format nil "~a~a/~a.css" (djbody-themes-url o) theme theme))))
+
+
+(defmethod djbody-cssclass ((o djbody))
+  (format nil "~a ~a" (djbody-theme o) (djbody-class o)))
+
+(defmethod wcomponent-template ((obj djbody))
+  (let ((id "scripts-content-pane")
+        (pobj (htcomponent-page obj))
+        (attributes (append (list :class (djbody-cssclass obj))
+                            (wcomponent-informal-parameters obj))))
+    (build-tagf "body" 'tag nil
+                attributes
+                (htcomponent-body obj)
+                (djxcontent-pane> :static-id id
+                                  (script> :type "text/javascript"
+                                           (page-body-init-scripts pobj))))))
+
+
+(defmethod wcomponent-after-prerender ((obj djbody) (pobj page))
+  (let ((scripts (page-instance-initscripts pobj)))
+    ;;remember that scripts are in reverse order
+    (when scripts
+      (push "});" (page-instance-initscripts pobj))
+      (nconc scripts (list "dojo.addOnLoad\(function\() {")))))
+
+

Added: trunk/main/claw-html.dojo/src/djbutton.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djbutton.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,88 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djbutton.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djbutton (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.Button component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.Button"))
+
+(defclass djdrop-down-button (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.DropDownButton component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.DropDownButton" :dojo-require (list "dijit.form.Button")))
+
+
+(defclass djcombo-button (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.ComboButton component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.ComboButton" :dojo-require (list "dijit.form.Button")))
+
+
+(defclass djtoggle-button (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.ToggleButton component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.ToggleButton" :dojo-require (list "dijit.form.Button")))
+
+
+;;;--------------------------------------------------------
+(defclass djsubmit-button (csubmit)
+  ((form :initform nil
+         :accessor djsubmit-button-form))
+  (:metaclass metacomponent)
+  (:documentation "This class is used to render dijit.form.Button that incorporates the logic to be included inside a CFORM component."))
+
+(defmethod wcomponent-template ((obj djsubmit-button))
+  (let* ((id (htcomponent-client-id obj))
+	 (value (csubmit-value obj)))
+    (djbutton> :static-id id
+               (wcomponent-informal-parameters obj)
+               value)))
+
+(defmethod wcomponent-before-prerender ((obj djsubmit-button) (page page))
+  (setf (djsubmit-button-form obj) (page-current-form page)))
+
+(defmethod wcomponent-before-render ((obj djsubmit-button) (page page))
+  (setf (djsubmit-button-form obj) (page-current-form page)))
+
+(defmethod htcomponent-instance-initscript ((obj djsubmit-button))
+  (let ((id (htcomponent-client-id obj))
+        (form-id (htcomponent-client-id (djsubmit-button-form obj))))
+    (ps*
+     `(dojo.connect (dijit.by-id ,id)
+                    "onClick"
+                    (lambda (e) (let ((the-form (dijit.by-id ,form-id)))
+                                  (unless the-form
+                                    (setf the-form (dojo.by-id ,form-id)))
+                                  (.submit the-form)))))))

Added: trunk/main/claw-html.dojo/src/djclaw.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djclaw.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,61 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djclaw.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass _djfloating-content (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo claw.FloatingContent component.")
+  (:default-initargs :dojo-type "claw.FloatingContent"))
+
+(defclass djfloating-content (wcomponent)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.FloatingContent component."))
+
+(defmethod wcomponent-template ((obj djfloating-content))
+  (let ((id (htcomponent-client-id obj)))
+    (list
+     (djhard-link> :id id :ref-id id)
+     (_djfloating-content> :static-id id
+              (wcomponent-informal-parameters obj)
+              (htcomponent-body obj)))))
+
+(defclass djhard-link (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo claw.HardLink component.")
+  (:default-initargs :dojo-type "claw.HardLink"))
+
+(defclass djrounded (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo claw.Rounded component. Provide bgImg and bgImgAlt \(for msie <= 6)")
+  (:default-initargs :dojo-type "claw.Rounded"))
\ No newline at end of file

Added: trunk/main/claw-html.dojo/src/djcolorpalette.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djcolorpalette.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,37 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djcolorpalette.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djcolor-palette (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.ColorPalette. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.ColorPalette"))
+

Added: trunk/main/claw-html.dojo/src/djcontainers.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djcontainers.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,46 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djcontainers.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djaccordion-container (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.AccordionContainer component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.AccordionContainer"))
+
+(defclass djaccordion-pane (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.AccordionPane component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.AccordionPane":dojo-require (list "dijit.layout.AccordionContainer")))
+
+
+
+

Added: trunk/main/claw-html.dojo/src/djcontent-pane.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djcontent-pane.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,59 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djcontent-plane.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djxcontent-pane (djwidget) 
+  ((execute-scripts-p :initarg :execute-scripts-p
+		    :reader djcontent-pane-execute-scripts-p
+		    :documentation "When not nil permits to the content pane to evaluate javascript directives")
+   (render-styles-p :initarg :render-styles-p
+		  :reader djcontent-pane-render-styles-p
+		  :documentation "When not nil permits to the content pane to evaluate style sheet directives"))
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dojox.layout.ContentPane component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dojox.layout.ContentPane" :execute-scripts-p t 
+		     :render-styles-p t))
+
+
+(defmethod wcomponent-template ((obj djxcontent-pane))
+  (let ((id (htcomponent-client-id obj))
+	(dojo-type (djwidget-dojo-type obj))
+	(execute-scripts (if (djcontent-pane-execute-scripts-p obj)
+			     "true"
+			     "false"))
+	(render-styles (if (djcontent-pane-render-styles-p obj)
+			     "true"
+			     "false")))
+    (div> :dojoType dojo-type 
+	  :executeScripts execute-scripts
+	  :renderStyles render-styles
+	  :static-id id
+	  (wcomponent-informal-parameters obj)
+	  (htcomponent-body obj))))

Added: trunk/main/claw-html.dojo/src/djdialog.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djdialog.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,86 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djdialog.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass _djdialog (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Dialog component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.Dialog"))
+
+(defclass djdialog (wcomponent)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Dialog component. More info at http://api.dojotoolkit.org/. It adds a HardLink so that the Dialog, that is moved inside body, may be referenced where it war originally placed, and so can be deleted from there"))
+
+(defmethod wcomponent-template ((obj djdialog))
+  (let ((id (htcomponent-client-id obj)))
+    (list
+     (_djdialog> :static-id id
+              (wcomponent-informal-parameters obj)
+              (htcomponent-body obj))
+     (djhard-link> :id "hidden" :ref-id id))))
+
+(defclass _djdialog-underlay (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.DialogUnderlay component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.DialogUnderlay" :dojo-require (list "dijit.Dialog")))
+
+(defclass djdialog-underlay (wcomponent)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.DialogUnderlay component. More info at http://api.dojotoolkit.org/. It adds a HardLink so that the Dialog, that is moved inside body, may be referenced where it war originally placed, and so can be deleted from there"))
+
+(defmethod wcomponent-template ((obj djdialog-underlay))
+  (let ((id (htcomponent-client-id obj)))
+    (list
+     (djhard-link> :id id :ref-id id)
+     (_djdialog-underlay> :static-id id
+              (wcomponent-informal-parameters obj)
+              (htcomponent-body obj)))))
+
+
+(defclass _djtooltip-dialog (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.TooltipDialog component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.TooltipDialog" :dojo-require (list "dijit.Dialog")))
+
+(defclass djtooltip-dialog (wcomponent)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.TooltipDialog component. More info at http://api.dojotoolkit.org/. It adds a HardLink so that the Dialog, that is moved inside body, may be referenced where it war originally placed, and so can be deleted from there"))
+
+(defmethod wcomponent-template ((obj djtooltip-dialog))
+  (let ((id (htcomponent-client-id obj)))
+    (_djtooltip-dialog> :static-id id
+                        (wcomponent-informal-parameters obj)
+                        (htcomponent-body obj))))

Added: trunk/main/claw-html.dojo/src/djform.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djform.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,469 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djform.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djform (cform djwidget)
+  ((update-id :initarg :update-id
+              :reader update-id
+              :documentation "A list of the component id to update")
+   (ajax-form-p :initarg :ajax-form-p
+                :reader djform-ajax-form-p
+                :documentation "When not nil, requests are sent via XHR call."))
+  (:metaclass metacomponent)
+  (:documentation "Class to generate a <form> element that is capable of XHR requests. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "claw.Form" :update-id () :ajax-form-p t))
+
+(defmethod wcomponent-template((obj djform))
+  (let ((id (htcomponent-client-id obj))
+        (method (form-method obj))
+        (dojo-type (djwidget-dojo-type obj))
+        (update-id (update-id obj)))
+    (form> :static-id id
+           :xhr (djform-ajax-form-p obj)
+           :method method
+           :dojotype dojo-type
+           :update-id (when update-id
+                        (let ((js-array (ps* `(array ,update-id))))
+                          (subseq js-array 0 (1- (length js-array)))))
+           (wcomponent-informal-parameters obj)
+           (input> :name *rewind-parameter*
+                   :type "hidden"
+                   :value id)
+           (htcomponent-body obj))))
+
+
+(defmethod htcomponent-instance-initscript ((obj djform))
+  nil)
+
+(defclass djtext-box (cinput djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.TextBox")
+  (:default-initargs :dojo-type "dijit.form.TextBox" :type "text"))
+
+(defmethod wcomponent-template ((obj djtext-box))
+  (let ((client-id (htcomponent-client-id obj))
+        (type (input-type obj))
+        (dojo-type (djwidget-dojo-type obj))
+        (translator (translator obj))
+        (value "")
+        (class (css-class obj)))
+    (when (component-validation-errors obj)
+      (if (or (null class) (string= class ""))
+          (setf class "dijitError")
+          (setf class (format nil "~a dijitError" class))))
+    (setf value (translator-encode translator obj))
+    (input> :static-id client-id
+            :type type
+            :dojoType dojo-type
+            :name client-id
+            :class class
+            :value value
+            (wcomponent-informal-parameters obj))))
+
+(defclass djtextarea (ctextarea djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.Textarea")
+  (:default-initargs :dojo-type "dijit.form.Textarea" :tag-name "textarea"))
+
+(defmethod wcomponent-template ((obj djtextarea))
+  (let ((client-id (htcomponent-client-id obj))
+        (tag-name (djwidget-tag-name obj))
+        (dojo-type (djwidget-dojo-type obj))
+        (translator (translator obj))
+        (value "")
+        (class (css-class obj)))
+    (when (component-validation-errors obj)
+      (if (or (null class) (string= class ""))
+          (setf class "dijitError")
+          (setf class (format nil "~a dijitError" class))))
+    (setf value (translator-encode translator obj))
+    (if (string-equal tag-name "textarea")
+        (textarea> :static-id client-id
+                   :dojoType dojo-type
+                   :name (name-attr obj)
+                   :class class
+                   (wcomponent-informal-parameters obj)
+                   (or (when value ($raw> value)) (htcomponent-body obj)))
+        (let ((tag-name (djwidget-tag-name obj))
+              (parameters (nconc (list :static-id (htcomponent-client-id obj)
+                                       :dojo-type (djwidget-dojo-type obj)
+                                       :name (name-attr obj))
+                                 (djwidget-formal-parameters obj))))
+          (build-tagf tag-name
+                      'tag
+                      (not (null (find tag-name *empty-tags*)))
+                      (list
+                       parameters
+                       (wcomponent-informal-parameters obj)
+                       (or (when value ($raw> value))
+                           (htcomponent-body obj))))))))
+
+
+(defclass djsimple-textarea (djtextarea)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.SimpleTextarea")
+  (:default-initargs :dojo-type "dijit.form.SimpleTextarea" :type "text"))
+
+(defclass djvalidation-text-box (djtext-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.ValidationTextBox")
+  (:default-initargs :dojo-type "dijit.form.ValidationTextBox" :type "text"
+                     :dojo-require (list "dijit.form.ValidationTextBox")))
+
+(defclass djmapped-text-box (djvalidation-text-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a DJVALIDATION-TEXT-BOX, but is used to render a dojo dijit.form.MappedTextBox")
+  (:default-initargs :dojo-type "dijit.form.MappedTextBox"))
+
+(defclass djrange-bound-text-box (djvalidation-text-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a DJVALIDATION-TEXT-BOX, but is used to render a dojo dijit.form.RangeBoundTextBox")
+  (:default-initargs :dojo-type "dijit.form.RangeBoundTextBox"))
+
+(defclass djnumber-text-box (djtext-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.NumberTextBox")
+  (:default-initargs :dojo-type "dijit.form.NumberTextBox" :type "text"))
+
+(defclass djnumber-spinner (djtext-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.NumberSpinner")
+  (:default-initargs :dojo-type "dijit.form.NumberSpinner" :type "text"))
+
+(defclass djcheck-box (ccheckbox djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CCHECKBOX, but is used to render a dojo dijit.form.CheckBox")
+  (:default-initargs :dojo-type "dijit.form.CheckBox"))
+
+(defmethod wcomponent-template ((cinput djcheck-box))
+  (let* ((client-id (htcomponent-client-id cinput))
+         (dojo-type (djwidget-dojo-type cinput))
+         (translator (translator cinput))
+         (type (input-type cinput))
+         (value (translator-value-type-to-string translator (ccheckbox-value cinput)))
+         (current-value (translator-type-to-string translator cinput))
+         (class (css-class cinput)))
+    (when (component-validation-errors cinput)
+      (if (or (null class) (string= class ""))
+          (setf class "error")
+          (setf class (format nil "~a error" class))))
+    (input> :static-id client-id
+            :type type
+            :dojoType dojo-type
+            :name (name-attr cinput)
+            :class class
+            :value value
+            :checked (when (and current-value (equal value current-value)) "checked")
+            (wcomponent-informal-parameters cinput))))
+
+(defclass djradio-button (cradio djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CRADIO, but is used to render a dojo dijit.form.CheckBox")
+  (:default-initargs :dojo-type "dijit.form.RadioButton" :dojo-require (list "dijit.form.CheckBox")))
+
+(defmethod wcomponent-template ((cinput djradio-button))
+  (let* ((client-id (htcomponent-client-id cinput))
+         (translator (translator cinput))
+         (type (input-type cinput))
+         (dojo-type (djwidget-dojo-type cinput))
+         (value (translator-value-type-to-string translator (ccheckbox-value cinput)))
+         (current-value (translator-type-to-string translator cinput))
+         (class (css-class cinput)))
+    (when (component-validation-errors cinput)
+      (if (or (null class) (string= class ""))
+          (setf class "error")
+          (setf class (format nil "~a error" class))))
+    (input> :static-id client-id
+            :type type
+            :dojoType dojo-type
+            :name (name-attr cinput)
+            :class class
+            :value value
+            :checked (when (and current-value (equal value current-value)) "checked")
+            (wcomponent-informal-parameters cinput))))
+
+(defclass djcombo-box (cinput djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CSELECT, but is used to render a dojo dijit.form.ComboBox")
+  (:default-initargs :dojo-type "dijit.form.ComboBox" :multiple nil))
+
+(defmethod wcomponent-template ((obj djcombo-box))
+  (let ((client-id (htcomponent-client-id obj))
+        (dojo-type (djwidget-dojo-type obj))
+        (translator (translator obj))
+        (value "")
+        (class (css-class obj)))
+    (when (component-validation-errors obj)
+      (if (or (null class) (string= class ""))
+          (setf class "dijitError")
+          (setf class (format nil "~a dijitError" class))))
+    (setf value (translator-encode translator obj))
+    (select> :static-id client-id
+             :dojoType dojo-type
+             :name client-id
+             :class class
+             :value value
+             :multiple (cinput-result-as-list-p obj)
+             (wcomponent-informal-parameters obj)
+             (htcomponent-body obj))))
+
+(defclass djmulti-select (djcombo-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a DJVALIDATION-TEXT-BOX, but is used to render a dojo dijit.form.MultiSelect")
+  (:default-initargs :dojo-type "dijit.form.MultiSelect" :multiple t))
+
+(defclass djfiltering-select (djcombo-box)
+  ((onchange :initarg :onchange))
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CSELECT, but is used to render a dojo dijit.form.FilteringSelect")
+  (:default-initargs :dojo-type "dijit.form.FilteringSelect"))
+
+(defclass djinline-edit-box (cinput djwidget)
+  ((autosavep :initarg :autosavep
+              :reader djinline-edit-box-autosavep
+              :documentation "Changing the value automatically saves it; don't have to push save button \(and save button isn't even displayed)")
+   (button-save :initarg :button-save
+                :reader djinline-edit-box-button-save
+                :documentation "Save button label")
+   (button-cancel :initarg :button-cancel
+                  :reader djinline-edit-box-button-cancel
+                  :documentation "Cancel button label")
+   (render-as-html :initarg :render-as-html
+                   :accessor djinline-edit-box-render-as-html
+                   :documentation "Set this to true if the specified Editor's value should be interpreted as HTML rather than plain text \(ie, dijit.Editor)")
+   (editor :initarg :editor
+           :reader djinline-edit-box-editor
+           :documentation "The widget used to edit the value"))
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.InLineEditBox. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :empty t :dojo-type "dijit.InlineEditBox"
+                     :tag-name "span"
+                     :autosavep t
+                     :button-save nil
+                     :button-cancel nil
+                     :render-as-html nil
+                     :editor "dijit.form.TextBox"))
+
+(defmethod wcomponent-template ((obj djinline-edit-box))
+  (let ((id (htcomponent-client-id obj))
+        (tag-name (djwidget-tag-name obj))
+        (auto-save (if (djinline-edit-box-autosavep obj) "true" "false"))
+        (button-save (djinline-edit-box-button-save obj))
+        (button-cancel (djinline-edit-box-button-cancel obj))
+        (render-as-html (if (djinline-edit-box-render-as-html obj) "true" "false"))
+        (editor (djinline-edit-box-editor obj))
+        (value ""))
+    (build-tagf tag-name
+                'tag nil
+                :static-id id
+                :value value
+                :autosave auto-save
+                :buttonsave button-save
+                :buttoncancel button-cancel
+                :renderashtml render-as-html
+                :editor editor
+                (wcomponent-informal-parameters obj))))
+
+(defmethod htcomponent-instance-initscript((obj djinline-edit-box))
+  (let ((id (htcomponent-client-id obj))
+        (page-url (claw-script-name)))
+    (ps* `(dojo.connect (dijit.by-id ,id)
+                        "onChange"
+                        (lambda (e) (dojo.xhrPost (create :url ,page-url
+                                                          :error (lambda (data) (console.error data))
+                                                          :timeout 2000
+                                                          :handle-as "json"
+                                                          :content (create :json (array)
+                                                                           ,*rewind-parameter* ,id))))))))
+
+(defclass djdate-text-box (djtext-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.DateTextBox")
+  (:default-initargs :dojo-type "dijit.form.DateTextBox" :type "text"
+                     :translator *date-translator-ymd*))
+
+
+(defclass djtime-text-box (djtext-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.DateTextBox")
+  (:default-initargs :dojo-type "dijit.form.TimeTextBox" :type "text"
+                     :translator *date-translator-time*))
+
+(defclass djcalendar (djtext-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit._Calendar")
+  (:default-initargs :dojo-type "dijit._Calendar" :dojo-require (list "dijit._Calendar" "dojo.date.locale")
+                     :type "text"
+                     :translator *date-translator-ymd*))
+
+
+(defclass djcurrency-text-box (djtext-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT, but is used to render a dojo dijit.form.CurrencyTextBox")
+  (:default-initargs :dojo-type "dijit.form.CurrencyTextBox" :type "text"))
+
+
+(defclass _djslider (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Base class to map dojo dijit.form.Slider. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-require (list "dijit.form.Slider")))
+
+(defclass _djslider-slider (cinput _djslider)
+  ()
+  (:metaclass metacomponent)
+  (:default-initargs :reserved-parameters (list :value :name) :translator *number-translator*)
+  (:documentation "Base class to map dojo dijit.form.HorizontalSlider and dijit.form.VerticalSlider. More info at http://api.dojotoolkit.org/"))
+
+(defmethod wcomponent-template ((_djslider-slider _djslider-slider))
+  (let ((client-id (htcomponent-client-id _djslider-slider))
+        (translator (translator _djslider-slider))
+        (value "")
+        (class (css-class _djslider-slider)))
+    (when (component-validation-errors _djslider-slider)
+      (if (or (null class) (string= class ""))
+	  (setf class "dijitError")
+	  (setf class (format nil "~a dijitError" class))))
+    (setf value (translator-encode translator _djslider-slider))
+    (div> :static-id client-id
+          :dojoType (djwidget-dojo-type _djslider-slider)
+          :value value
+          :class class
+          :name (name-attr _djslider-slider)
+          (wcomponent-informal-parameters _djslider-slider)
+          (htcomponent-body _djslider-slider))))
+
+(defclass djhorizontal-slider (_djslider-slider)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.HorizontalSlider. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.HorizontalSlider"))
+
+(defclass djhorizontal-rule (_djslider)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.HorizontalRule. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.HorizontalRule"))
+
+(defclass djhorizontal-rule-labels (_djslider)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.HorizontalRuleLabels. Renders like an <ol> tag element, so put
+<li> tag elements inside. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.HorizontalRuleLabels" :tag-name "ol"))
+
+(defclass djvertical-slider (_djslider-slider)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.VerticalSlider. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.VerticalSlider"))
+
+(defclass djvertical-rule (_djslider)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.VerticalRule. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.VerticalRule"))
+
+(defclass djvertical-rule-labels (_djslider)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.form.VerticalRuleLabels. Renders like an <ol> tag element, so put
+<li> tag elements inside. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.form.VerticalRuleLabels" :tag-name "ol"))
+
+(defclass djtext-box-file (djtext-box)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "This class inherits from a CINPUT of type \"file\", but is used to render a dojo dijit.form.DateTextBox")
+  (:default-initargs :dojo-type "dojox.widget.FileInput" :type nil
+                     :translator *file-translator*))
+
+(defmethod htcomponent-stylesheet-files((djtext-box-file djtext-box-file))
+  (list (format nil "~a/dojotoolkit/dojox/widget/FileInput/FileInput.css" (clawserver-base-path *clawserver*))))
+
+(defclass djeditor (djtextarea)
+  ((form :initform nil
+         :accessor djeditor-form))
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Editor. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "claw.Editor" :tag-name "div"))
+
+(defclass djeditor-plugins-always-show-toolbar (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Editor. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit._editor.plugins.AlwaysShowToolbar" :tag-name nil))
+
+(defclass djeditor-plugins-enter-key-handling (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Editor. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit._editor.plugins.EnterKeyHandling" :tag-name nil))
+
+(defclass djeditor-plugins-font-choice (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Editor. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit._editor.plugins.FontChoice" :tag-name nil))
+
+(defclass djeditor-plugins-link-dialog (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Editor. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit._editor.plugins.LinkDialog" :tag-name nil))
+
+(defclass djeditor-plugins-text-color (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Editor. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit._editor.plugins.TextColor" :tag-name nil))
+
+(defclass djeditor-plugins-toggle-dir (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Editor. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit._editor.plugins.ToggleDir" :tag-name nil))
+

Added: trunk/main/claw-html.dojo/src/djlayout.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djlayout.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,101 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djcontainers.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djaccordion-container (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.AccordionContainer component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.AccordionContainer"))
+
+(defclass djaccordion-pane (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.AccordionPane component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.AccordionPane":dojo-require (list "dijit.layout.AccordionContainer")))
+
+(defclass djborder-container (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.BorderContainer component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.BorderContainer"))
+
+(defclass djcontent-pane (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.ContentPane component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.ContentPane"))
+
+(defclass djlayout-container (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.LayoutContainer component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.LayoutContainer"))
+
+(defclass djlink-pane (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.LinkPane component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.LinkPane"))
+
+(defclass djsplit-container (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.SplitContainer component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.SplitContainer"))
+
+(defclass djstack-container (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.StackContainer component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.StackContainer"))
+
+(defclass djstack-controller (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.StackController component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.StackController" :dojo-require (list "dijit.layout.StackContainer")))
+
+(defclass djtab-container (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.TabContainer component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.TabContainer"))
+
+(defclass djtab-controller (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.layout.TabController component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.layout.TabController" :dojo-require (list "dijit.layout.TabContainer")))
+
+
+
+
+

Added: trunk/main/claw-html.dojo/src/djlink.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djlink.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,54 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djlink.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djaction-link (action-link djwidget) 
+  ((update-id :initarg :update-id
+	      :reader update-id
+	      :documentation "A list of the component id to update"))
+  (:metaclass metacomponent)
+  (:documentation "Class that extends ACTION-LINK to handle XHR requests.")
+  (:default-initargs :dojo-type "claw.ActionLink" :update-id ()))
+
+(defmethod wcomponent-template((o djaction-link))
+  (let ((client-id (htcomponent-client-id o))
+        (update-id (update-id o))
+        (dojo-type (djwidget-dojo-type o)))
+    (a> :static-id client-id
+	:href "#"
+        :hxr t
+        :dojotype dojo-type
+        :update-id (when update-id
+                     (let ((js-array (ps* `(array ,update-id))))
+                       (subseq js-array 0 (1- (length js-array)))))
+	(wcomponent-informal-parameters o)
+	(htcomponent-body o))))
+
+

Added: trunk/main/claw-html.dojo/src/djmenu.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djmenu.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,55 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djmenu.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+
+(defclass djmenu (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Menu. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.Menu"))
+
+(defclass djmenu-item (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.MenuItem. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.MenuItem" :dojo-require (list "dijit.Menu")))
+
+(defclass djmenu-separator (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.MenuSeparator. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.MenuSeparator" :dojo-require (list "dijit.Menu")))
+
+(defclass djpopup-menu-item (djwidget)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.PopupMenuItem. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.PopupMenuItem" :dojo-require (list "dijit.Menu")))

Added: trunk/main/claw-html.dojo/src/djprogressbar.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djprogressbar.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,39 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djprogressbar.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djprogress-bar (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.ProgressBar. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.ProgressBar"))
+
+
+

Added: trunk/main/claw-html.dojo/src/djtitlepane.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djtitlepane.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,37 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djtitlepane.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djtitle-pane (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.TitlePane. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.TitlePane"))
+

Added: trunk/main/claw-html.dojo/src/djtoolbar.fasl
==============================================================================
Binary file. No diff available.

Added: trunk/main/claw-html.dojo/src/djtoolbar.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djtoolbar.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,43 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djtoolbar.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djtoolbar (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Toolbar. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.Toolbar"))
+
+(defclass djtoolbar-separator (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.ToolbarSeparator. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.ToolbarSeparator"))
+

Added: trunk/main/claw-html.dojo/src/djtooltip.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djtooltip.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,49 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djtooltip.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass _djtooltip (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Tooltip component. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.Tooltip"))
+
+(defclass djtooltip (wcomponent)
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Tooltip component. More info at http://api.dojotoolkit.org/. It adds a HardLink so that the Dialog, that is moved inside body, may be referenced where it war originally placed, and so can be deleted from there"))
+
+(defmethod wcomponent-template ((obj djtooltip))
+  (let ((id (htcomponent-client-id obj)))    
+    (list
+     (djhard-link> :ref-id id)
+     (_djtooltip> :static-id id
+                  (wcomponent-informal-parameters obj)
+                  (htcomponent-body obj)))))

Added: trunk/main/claw-html.dojo/src/djtree.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djtree.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,39 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djtree.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djtree (djwidget) 
+  ()
+  (:metaclass metacomponent)
+  (:documentation "Class for dojo dijit.Toolbar. More info at http://api.dojotoolkit.org/")
+  (:default-initargs :dojo-type "dijit.Tree"))
+
+
+

Added: trunk/main/claw-html.dojo/src/djwidget.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djwidget.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,81 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djwidget.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defgeneric djwidget-formal-parameters (djwidget)
+  (:documentation "list of html attributes defined by widget slots"))
+
+(defclass djwidget (wcomponent)
+  ((tag-name :initarg :tag-name
+	     :reader djwidget-tag-name
+	     :documentation "The HTML tag element that will be rendered")
+   (dojo-type :initarg :dojo-type
+	      :reader djwidget-dojo-type
+	      :documentation "The type of the dojo element, it will be added as dojoType HTML custom tag attribute")
+   (dojo-rquire :initarg :dojo-require
+		:reader djwidget-dojo-require
+		:documentation "A list of addictional dojo reqirements"))
+  (:metaclass metacomponent)
+  (:default-initargs :tag-name "div" :dojo-require nil)
+  (:documentation "Base class to render dojo widgets"))
+
+(let ((class (find-class 'djwidget)))
+  (closer-mop:ensure-finalized class)
+  (setf (documentation (find-symbol (format nil "~a>" (class-name class))) 'function)
+	(format nil "Description: ~a~%Parameters:~%~a~a~%~%~a"
+		"Function that instantiates a DJWIDGET component and renders a html tag enabled for dojo whose name is provided by the :TAG-NAME keyword and the dojo widget by :DOJO-TYPE."
+		*id-and-static-id-description*
+		(describe-html-attributes-from-class-slot-initargs class)
+		(describe-component-behaviour class))))
+
+(defmethod djwidget-formal-parameters ((djwidget djwidget))())
+
+(defmethod htcomponent-class-initscripts ((obj djwidget))
+  (let ((dojo-type (djwidget-dojo-type obj))
+	(dojo-require (djwidget-dojo-require obj)))
+    (append
+     (list (ps* `(dojo.require "dojo.parser")))
+     (unless dojo-require
+       (list (ps* `(dojo.require ,dojo-type))))
+     (loop for require in dojo-require
+          collect (ps* `(dojo.require ,require))))))
+
+(defmethod wcomponent-template ((obj djwidget))
+  (let ((tag-name (djwidget-tag-name obj)))
+    (when tag-name
+      (let ((parameters (nconc (list :static-id (htcomponent-client-id obj) :dojo-type (djwidget-dojo-type obj))
+                               (djwidget-formal-parameters obj))))
+        (build-tagf tag-name
+                    'tag
+                    (not (null (find tag-name *empty-tags*)))
+                    (list
+                     parameters
+                     (wcomponent-informal-parameters obj)
+                     (htcomponent-body obj)))))))

Added: trunk/main/claw-html.dojo/src/js/ActionLink.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/ActionLink.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,130 @@
+/**
+;;; $Header: dojo/src/js/ActionLink.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+    if(!dojo._hasResource["claw.ActionLink"]){
+        dojo.provide("claw.ActionLink");
+
+        dojo.require("dijit._Widget");
+        dojo.require("dijit._Templated");
+        dojo.declare(
+            "claw.ActionLink",
+            [dijit._Widget, dijit._Templated],
+            {
+                xhrTimeout: "",//2000,
+                updateId: null,
+                enctype: "",
+                xhr: true,
+                templateString: "<a dojoAttachPoint='containerNode' dojoAttachEvent='onclick:_onClick' href='#'></a>",
+                jsonContent: {},
+	        _updateParts: function (reply) {
+                    for (var item in reply.components) {
+                        var element = dojo.byId(item);
+                        if ((element != null) && (reply.components[item] != null)) {
+                            var list = dojo.query('[widgetId]', element);
+                            dojo.forEach(list.map(dijit.byNode), function(widget){if (widget) widget.destroy(); });
+                            element.innerHTML = reply.components[item];
+                            dojo.parser.parse(element, true);
+                        }
+                    }
+                },
+
+                _evalReplClassScripts: function (reply) {
+                    dijit.byId('scripts-content-pane').setContent(reply.classInjections);
+                },
+
+                _evalReplInstanceScripts: function (reply) {
+                    dijit.byId('scripts-content-pane').setContent(reply.instanceInjections);
+                },
+
+                _updateAndEval: function (reply) {
+                    console.debug("Plain object as string is: ", reply);
+                    console.debug("Object as string is: ", dojo.toJson(reply, true));
+                    this._evalReplClassScripts(reply);
+                    this._updateParts(reply);
+                    this._evalReplInstanceScripts(reply);
+                },
+                click: function(){
+                    if(!(this.onClick() === false) && !this.xhr){
+                        this.containerNode.click();
+		    }
+                },
+	        _onClick: function(e){
+		    //	summary:
+		    //		Callback when user submits the form. This method is
+		    //		intended to be over-ridden, but by default it checks and
+		    //		returns the validity of form elements. When the `submit`
+		    //		method is called programmatically, the return value from
+		    //		`onSubmit` is used to compute whether or not submission
+		    //		should proceed
+
+                    if (this.xhr) {
+                        if (e) {
+                            e.preventDefault();
+                        }
+                        this.onBeforeClick(e);
+                        var thisLink = this;
+                        var jsonContent = dojo.mixin(this.jsonContent, { json : thisLink.updateId, rewindobject : thisLink.id });
+                        this.jsonContent = {};
+                        var linkId = this.id;
+                        dojo.xhrPost({
+                            url: '#',
+                            load : function (data) {
+                                try {
+                                    thisLink._updateAndEval(data);
+                                } finally {
+                                    thisLink.onXhrFinish(e);
+                                }
+                            },
+                            error : function (data) {console.error(data);thisLink.onXhrFinish(e);},
+                            timeout : thisLink.xhrTimeout,
+                            handleAs : 'json',
+                            content : jsonContent });
+                    }
+                    return true;
+	        },
+
+                onBeforeClick: function(/*Event?*/e){
+		    //	summary:
+		    //		Callback when user submits the form. This method is
+		    //		intended to be over-ridden. When the `submit` calls dojo.xhrPost
+		    //		this method is called before.
+	        },
+
+                onXhrFinish: function(/*Event?*/e){
+		    //	summary:
+		    //		Callback when user submits the form. This method is
+		    //		intended to be over-ridden. After the call to dojo.xhrPost
+		    //		thouches lload or error this event is fired
+	        }
+	    }
+        );
+
+    }
+

Added: trunk/main/claw-html.dojo/src/js/Dialog.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/Dialog.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,40 @@
+/**
+;;; $Header: dojo/src/js/HardLink.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+//if(!dojo._hasResource["claw.Dialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+    dojo.provide("claw.Dialog");
+
+    dojo.require("dijit.Dialog");
+
+    dojo.declare(
+        "claw.Dialog",
+        dijit.Dialog
+    );
+//}
\ No newline at end of file

Added: trunk/main/claw-html.dojo/src/js/Editor.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/Editor.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,63 @@
+/**
+;;; $Header: dojo/src/js/Editor.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+if(!dojo._hasResource["claw.Editor"]){
+    dojo.provide("claw.Editor");
+    dojo.require("dijit.Editor");
+    dojo.declare(
+                 "claw.Editor",
+                 dijit.Editor,
+                 {
+                     name: "",
+                     hidden: null,
+                     postCreate: function(){
+                         this.inherited(arguments);
+                         this.hidden = dojo.doc.createElement('input');
+                         var hidden = this.hidden;
+                         hidden.type = "hidden";
+                         hidden.name = this.name;
+                         this.domNode.parentNode.appendChild(this.hidden);
+                         var theEditor = this;
+                         if (this.hidden.form) {
+                             var theForm = dijit.byId(this.hidden.form.id);
+                             if (theForm) {
+                                 dojo.connect(theForm, 
+                                              "onBeforeSubmit", 
+                                              function(e) {hidden.value = theEditor.getValue();});
+                             }
+                         }
+                     },
+                     destroy: function(){
+                         this.domNode.parentNode.removeChild(this.hidden);
+                         this.inherited(arguments);
+                     }
+                 });
+}
\ No newline at end of file

Added: trunk/main/claw-html.dojo/src/js/Editor2.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/Editor2.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,63 @@
+/**
+;;; $Header: dojo/src/js/Editor.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+if(!dojo._hasResource["claw.Editor2"]){
+    dojo.provide("claw.Editor2");
+    dojo.require("dijit.Editor");
+    dojo.require("dojox.lang.aspect");
+    dojo.declare(
+                 "claw.Editor2",
+                 dijit.Editor,
+                 {
+                     name: "",
+                     hidden: null,
+                     postCreate: function(){
+                         this.inherited(arguments);
+                         this.hidden = dojo.doc.createElement('input');
+                         var hidden = this.hidden;
+                         hidden.type = "hidden";
+                         hidden.name = this.name;
+                         this.domNode.parentNode.appendChild(this.hidden);
+                         var aop = dojox.lang.aspect;
+                         var theEditor = this;
+                         if (this.hidden.form) {
+                             var theForm = dijit.byId(this.hidden.form.id);
+                             if (!theForm)
+                                 theForm = this.hidden.form;
+                             aop.advise(theForm, /submit/, { before: function(args) {hidden.value = theEditor.getValue();} });
+                         }
+                     },
+                     destroy: function(){
+                         this.domNode.parentNode.removeChild(this.hidden);
+                         this.inherited(arguments);
+                     }
+                 });
+}
\ No newline at end of file

Added: trunk/main/claw-html.dojo/src/js/FloatingContent.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/FloatingContent.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,47 @@
+/**
+;;; $Header: dojo/src/js/FloatingContent.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+if(!dojo._hasResource["claw.FloatingContent"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+    dojo._hasResource["claw.FloatingContent"] = true;
+    dojo.provide("claw.FloatingContent");
+    
+    dojo.require("dijit.Dialog");
+    
+    dojo.declare(
+        "claw.FloatingContent",
+        dijit.Dialog,
+        {
+            
+            templateString:"<div class=\"dijitDialog\" style=\"border:0;\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\n\t<div dojoAttachPoint=\"containerNode\"></div>\n</div>",
+            _getFocusItems: function (domNode) {}
+                                  
+        }
+    );
+}
\ No newline at end of file

Added: trunk/main/claw-html.dojo/src/js/Form.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/Form.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,157 @@
+y/**
+;;; $Header: dojo/src/js/Form.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+if(!dojo._hasResource["claw.Form"]){
+dojo.provide("claw.Form");
+
+dojo.require("dojo.io.iframe");
+dojo.require("dijit.form.Form");
+
+dojo.declare(
+	"claw.Form",
+	[dijit.form.Form],
+	{
+		// summary:
+		// Adds conveniences to regular HTML form
+
+		// HTML <FORM> attributes
+            xhrTimeout: "",//2000,
+                updateId: null,
+                enctype: "",
+                xhr: null,
+                jsonContent: {},
+		_updateParts: function (reply) {
+                       for (var item in reply.components) {
+                           var element = dojo.byId(item);
+                           if ((element != null) && (reply.components[item] != null)) {
+                               var list = dojo.query('[widgetId]', element);
+                               dojo.forEach(list.map(dijit.byNode), function(widget){if (widget) widget.destroy(); });
+                               element.innerHTML = reply.components[item];
+                               dojo.parser.parse(element, true);
+                           }
+                       }
+                 },
+
+                _evalReplClassScripts: function (reply) {
+                       dijit.byId('scripts-content-pane').setContent(reply.classInjections);
+                },
+
+                _evalReplInstanceScripts: function (reply) {
+                       dijit.byId('scripts-content-pane').setContent(reply.instanceInjections);
+                },
+
+                _updateAndEval: function (reply) {
+                       console.debug("Plain object as string is: ", reply);
+                       console.debug("Object as string is: ", dojo.toJson(reply, true));
+                       this._evalReplClassScripts(reply);
+                       this._updateParts(reply);
+                       this._evalReplInstanceScripts(reply);
+                },
+                submit: function(){
+                       if(!(this.onSubmit() === false) && !this.xhr){
+                           this.containerNode.submit();
+			}
+                },
+		onSubmit: function(e){
+			//	summary:
+			//		Callback when user submits the form. This method is
+			//		intended to be over-ridden, but by default it checks and
+			//		returns the validity of form elements. When the `submit`
+			//		method is called programmatically, the return value from
+			//		`onSubmit` is used to compute whether or not submission
+			//		should proceed
+
+			var valid = this.validate(); // Boolean
+
+                        if (valid && this.xhr) {
+                            if (e) {
+                                e.preventDefault();
+                            }
+                            this.onBeforeSubmit(e);
+                            var thisForm = this;
+                            var jsonContent = dojo.mixin(this.jsonContent, { json : thisForm.updateId });
+                            this.jsonContent = {};
+                            var formId = this.id;
+                            if (this.enctype != 'multipart/form-data') {
+                                dojo.xhrPost({
+                                        url: '#',
+                                        load : function (data) {
+                                            try {
+                                                thisForm._updateAndEval(data);
+                                            } finally {
+                                                thisForm.onXhrFinish(e);
+                                            }
+                                        },
+                                        error : function (data) {console.error(data);thisForm.onXhrFinish(e);},
+                                        timeout : thisForm.xhrTimeout,
+                                        handleAs : 'json',
+                                        form : formId,
+                                        content : jsonContent });
+                            } else {
+                                jsonContent = dojo.mixin(jsonContent, { jsonPrefix: '<textarea>', jsonSuffix: '</textarea>' });
+                                dojo.io.iframe.send({
+                                        load : function (data) {
+                                            try {
+                                                thisForm._updateAndEval(data);
+                                            } finally {
+                                                thisForm.onXhrFinish(e);
+                                            }
+                                        },
+                                        error : function (data) {
+                                            console.error(data);
+                                            thisForm.onXhrFinish(e);
+                                        },
+                                        timeout : thisForm.xhrTimeout,
+                                        handleAs : 'json',
+                                        form: formId,
+                                        content : jsonContent });
+                            }
+                        }
+                        return valid;
+		},
+
+                onBeforeSubmit: function(/*Event?*/e){
+			//	summary:
+			//		Callback when user submits the form. This method is
+			//		intended to be over-ridden. When the `submit` calls dojo.xhrPost
+			//		this method is called before.
+		},
+
+                onXhrFinish: function(/*Event?*/e){
+			//	summary:
+			//		Callback when user submits the form. This method is
+			//		intended to be over-ridden. After the call to dojo.xhrPost
+			//		thouches lload or error this event is fired
+		}
+	}
+);
+
+}
+

Added: trunk/main/claw-html.dojo/src/js/HardLink.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/HardLink.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,64 @@
+/**
+;;; $Header: dojo/src/js/HardLink.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+if(!dojo._hasResource["claw.HardLink"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+    dojo._hasResource["claw.HardLink"] = true;
+    dojo.provide("claw.HardLink");
+
+    dojo.require("dijit._Widget");
+
+    dojo.declare(
+        "claw.HardLink",
+        dijit._Widget,
+        {
+
+            // connectId: String
+            // Id of domNode to attach the hard link to.
+
+            refId: "",
+
+            style: "display:none;",
+
+            destroy: function () {
+                if (this.refId) {
+                    var widget = dijit.byId(this.refId);
+                    if (widget) {
+                        var domNode = widget.domNode;
+                        var list = dojo.query('[widgetId]', domNode);
+                        dojo.forEach(list.map(dijit.byNode), function(widget){if (widget) widget.destroy(); });
+                        widget.destroy();
+                    }
+                }
+                this.inherited(arguments);
+            }
+
+        }
+    );
+}
\ No newline at end of file

Added: trunk/main/claw-html.dojo/src/js/Rounded.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/Rounded.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,58 @@
+/**
+;;; $Header: dojo/src/js/LoadingSpinner.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+if(!dojo._hasResource["claw.Rounded"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+    dojo._hasResource["claw.Rounded"] = true;
+    dojo.provide("claw.Rounded");
+    
+    dojo.require("dijit._Widget");
+    dojo.require("dijit._Templated");
+    
+    
+    dojo.declare(                 
+        "claw.Rounded",
+        [dijit._Widget, dijit._Templated],
+        {
+        templateString:"<div class=\"Rounded\" dojoAttachPoint=\"outerNode\">\n\t<div class=\"RoundedContent\" dojoAttachPoint=\"roundedContent\">\n\t\t<div class=\"RoundedTop\" dojoAttachPoint=\"roundedTop\"></div>\n\t\t<div dojoAttachPoint=\"contentNode\">\n\t\t\t<div dojoAttachPoint=\"containerNode\"></div>\n\t\t</div>\n\t</div>\n\t<div class=\"RoundedBottom\" dojoAttachPoint=\"roundedBottom\">\n\t\t<div dojoAttachPoint=\"roundedBottomDiv\"></div>\n\t</div>\n</div>",
+        bgImg: "",              // standard background image (png)
+        bgImgAlt: "",   // background image for ie6
+ 
+        postCreate: function() {
+                dojo.style(this.contentNode, "height", dojo.style(this.outerNode, "height")-10+'px'); // TODO: Calculate correct height                
+                var alt = (this.bgImgAlt.length && dojo.isIE < 7 && dojo.isIE > 0);
+                dojo.forEach(["roundedContent","roundedTop","roundedBottom","roundedBottomDiv"],
+                        function(elName){
+                                dojo.style(this[elName],"backgroundImage", "url(" + (alt ? this.bgImgAlt : this.bgImg)  + ")");
+                        },
+                this);
+        }
+    });
+       
+}
\ No newline at end of file

Added: trunk/main/claw-html.dojo/src/js/claw.js
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/js/claw.js	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,59 @@
+/**
+;;; $Header: dojo/src/js/claw.js $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+//dojo.require('dijit.Tooltip');
+
+var claw = {
+    _updateParts: function (reply) {	
+        for (var item in reply.components) {
+            var element = dojo.byId(item);                
+            if ((element != null) && (reply.components[item] != null)) {
+                var list = dojo.query('[widgetId]', element);
+                dojo.forEach(list.map(dijit.byNode), function(widget){if (widget) widget.destroy(); });
+                element.innerHTML = reply.components[item];
+                dojo.parser.parse(element, true);
+            }
+        }
+    },
+    _evalReplClassScripts: function (reply) {	
+	dijit.byId('scripts-content-pane').setContent(reply.classInjections);
+    },
+    _evalReplInstanceScripts: function (reply) {	
+	dijit.byId('scripts-content-pane').setContent(reply.instanceInjections);
+    },
+    updateAndEval: function (reply) {	       
+        console.debug("Plain object as string is: ", reply);
+	console.debug("Object as string is: ", dojo.toJson(reply, true));        
+        this._evalReplClassScripts(reply);
+        this._updateParts(reply);	
+        this._evalReplInstanceScripts(reply);        
+        
+    }
+};
\ No newline at end of file

Added: trunk/main/claw-html.dojo/src/misc.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/misc.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,44 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/misc.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defvar  *dojo-misc-file* (load-time-value
+                     (or #.*compile-file-pathname* *load-pathname*)))
+
+(defun djuser-locale ()
+  (substitute #\- #\_ (string-downcase (user-locale))))
+
+(register-library-resource "dojotoolkit/"  (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("dojotoolkit"))))
+(register-library-resource "dojotoolkit/claw/HardLink.js"  (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "HardLink" :type "js"))
+(register-library-resource "dojotoolkit/claw/FloatingContent.js"  (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "FloatingContent" :type "js"))
+(register-library-resource "dojotoolkit/claw/Rounded.js"  (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Rounded" :type "js"))
+(register-library-resource "dojotoolkit/claw/Form.js"  (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Form" :type "js"))
+(register-library-resource "dojotoolkit/claw/Editor.js"  (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Editor" :type "js"))
+(register-library-resource "dojotoolkit/claw/ActionLink.js"  (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "ActionLink" :type "js"))

Added: trunk/main/claw-html.dojo/src/packages.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/packages.lisp	Tue Aug 26 06:49:29 2008
@@ -0,0 +1,185 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/packages.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti.  All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :cl-user)
+
+(defpackage :claw-html.dojo
+  (:nicknames :dojo)
+  (:use :cl :claw :claw-html :parenscript)
+  (:export :*dojo-directory-name*
+           :djuser-locale
+           :djwidget-dojo-type
+           :djwidget-dojo-require
+           :djwidget
+           :djwidget>
+           :djwidget-formal-parameters
+           :djxcontent-pane
+           :djxcontent-pane>
+           :djbody
+           :djbody>
+           ;;dijit namespace
+           :djbackground-iframe
+           :djbackground-iframe>
+           :djcolor-palette
+           :djcolor-palette>
+           :djdialog
+           :djdialog>
+           :djdialog-underlay
+           :djdialog-underlay>
+           :djeditor
+           :djeditor>
+           :djeditor-plugins-always-show-toolbar
+           :djeditor-plugins-always-show-toolbar>
+           :djeditor-plugins-enter-key-handling
+           :djeditor-plugins-enter-key-handling>
+           :djeditor-plugins-font-choice
+           :djeditor-plugins-font-choice>
+           :djeditor-plugins-link-dialog
+           :djeditor-plugins-link-dialog>
+           :djeditor-plugins-text-color
+           :djeditor-plugins-text-color>
+           :djeditor-plugins-toggle-dir
+           :djeditor-plugins-toggle-dir>
+           :djinline-edit-box
+           :djinline-edit-box>
+           :djmenu
+           :djmenu>
+           :djmenu-item
+           :djmenu-item>
+           :djmenu-separator
+           :djmenu-separator>
+           :djpopup-menu-item
+           :djpopup-menu-item>
+           :djprogress-bar
+           :djprogress-bar>
+           :djtitle-pane
+           :djtitle-pane>
+           :djtoolbar
+           :djtoolbar>
+           :djtoolbar-separator
+           :djtoolbar-separator>
+           :djtooltip
+           :djtooltip>
+           :djtooltip-dialog
+           :djtooltip-dialog>
+           :djtree
+           :djtree>
+           ;;dijit.form namespace
+           :djbutton
+           :djbutton>
+           :djsubmit-button
+           :djsubmit-button>
+           :djcheck-box
+           :djcheck-box>
+           :djcombo-box
+           :djcombo-box>
+           :djcombo-button
+           :djcombo-button>
+           :djcurrency-text-box
+           :djcurrency-text-box>
+           :djdate-text-box
+           :djdate-text-box>
+           :djcalendar
+           :djcalendar>
+           :djdrop-down-button
+           :djdrop-down-button>
+           :djfiltering-select
+           :djfiltering-select>
+           :djform
+           :djform>
+           :djhorizontal-rule
+           :djhorizontal-rule>
+           :djhorizontal-rule-labels
+           :djhorizontal-rule-labels>
+           :djhorizontal-slider
+           :djhorizontal-slider>
+           :djmapped-text-box
+           :djmapped-text-box>
+           :djmulti-select
+           :djmulti-select>
+           :djnumber-spinner
+           :djnumber-spinner>
+           :djnumber-text-box
+           :djnumber-text-box>
+           :djradio-button
+           :djradio-button>
+           :djrange-bound-text-box
+           :djrange-bound-text-box>
+           :djsimple-textarea
+           :djsimple-textarea>
+           :djtextarea
+           :djtextarea>
+           :djtext-box
+           :djtext-box>
+           :djtime-text-box
+           :djtime-text-box>
+           :djtoggle-button
+           :djtoggle-button>
+           :djvalidation-text-box
+           :djvalidation-text-box>
+           :djvertical-rule
+           :djvertical-rule>
+           :djvertical-rule-labels
+           :djvertical-rule-labels>
+           :djvertical-slider
+           :djvertical-slider>
+           :djaction-link
+           :djaction-link>
+           :djtext-box-file
+           :djtext-box-file>
+           ;;dijit.layout namespace
+           :djaccordion-container
+           :djaccordion-container>
+           :djaccordion-pane
+           :djaccordion-pane>
+           :djborder-container
+           :djborder-container>
+           :djcontent-pane
+           :djcontent-pane>
+           :djlayout-container
+           :djlayout-container>
+           :djlink-pane
+           :djlink-pane>
+           :djsplit-container
+           :djsplit-container>
+           :djstack-container
+           :djstack-container>
+           :djstack-controller
+           :djstack-controller>
+           :djtab-container
+           :djtab-container>
+           :djtab-controller
+           :djtab-controller>
+           ;;claw namespace
+           :djfloating-content
+           :djfloating-content>
+           :djhard-link
+           :djhard-link>
+           :djrounded
+           :djrounded>))



More information about the Claw-cvs mailing list