[Bese-devel] [PATCH] Fix `set-action-parameter' in ucw_dev/src/yaclml/ucw-tags.lisp

Vladimir Sekissov svg at surnet.ru
Thu Sep 15 08:27:21 UTC 2005


Good day,

a_bakic> > It doesn't work in nested forms at least on Mozilla&Co because nested
a_bakic> > forms break Mozilla DOM model.
a_bakic> 
a_bakic> Could you please provide a reference or explain briefly what exactly breaks? I
a_bakic> am using Firefox (1.01 and 1.5beta), and nested forms (at least those in the
a_bakic> examples) are rendered correctly and even submit buttons correctly work when
a_bakic> duplicate s/f/a input elements and neighboring script elements are removed.
a_bakic> (Without duplicate s/f/a input elements and duplicate SetActionParameter
a_bakic> function definitions in neighboring script elements, it is not necessary to
a_bakic> generate unique names for the functions.)

I've upgraded FireFox under my Gentoo to 1.06 version and now it
works with nested forms, sorry for malinformation.

Probably the problem was only in my "hand-made" FireFox and Mozilla
versions. JS couldn't find function by name in nested form.

I've also fixed my own typo so if you want to use this patch use the
one in attachment.

Best Regards,
Vladimir Sekissov


-------------- next part --------------

New patches:

[Fix set-action-parameter JS function
svg at surnet.ru**20050914204726] {
hunk ./src/yaclml/ucw-tags.lisp 9
+(defparameter +set-action-parameter-suffix+
+  '-set-action-parameter)
+
+(defparameter +js-set-action-parameter-suffix+
+  (js::symbol-to-js +set-action-parameter-suffix+))
+
+(defun %set-action-parameter-name (form-id)
+  (intern (format nil "~a~a" form-id +set-action-parameter-suffix+)))
+
+(js::defjsmacro set-action-parameter (action)
+  `(let ((sap (+ this.form.id ,+js-set-action-parameter-suffix+)))
+     (setf sap (aref self sap))
+     (sap ,action)))
+
hunk ./src/yaclml/ucw-tags.lisp 55
-                          (,set-action-parameter
+                          (set-action-parameter
hunk ./src/yaclml/ucw-tags.lisp 68
-    (let ((form-id (js::symbol-to-js (js:gen-js-name :prefix "ucw-form")))
+    (let ((form-id (js:gen-js-name :prefix "ucw-form"))
hunk ./src/yaclml/ucw-tags.lisp 73
-             (set-action-parameter (js:gen-js-name :prefix "ucw-form-set-action-parameter-")))
+             (set-action-parameter (%set-action-parameter-name ,form-id)))
hunk ./src/yaclml/ucw-tags.lisp 75
-                 :id ,form-id
+                 :id ,(js::symbol-to-js form-id)
hunk ./src/yaclml/ucw-tags.lisp 124
-                                       (,set-action-parameter ,(register-action
+                                       (set-action-parameter ,(register-action
hunk ./src/yaclml/ucw-tags.lisp 188
-                           (,set-action-parameter ,(make-new-action (context.current-frame *context*)
+                           (set-action-parameter ,(make-new-action (context.current-frame *context*)
}

[Typo fix
svg at surnet.ru**20050915081215] {
hunk ./src/yaclml/ucw-tags.lisp 68
-    (let ((form-id (js:gen-js-name :prefix "ucw-form"))
+    (let ((form-id (symbol-name (js:gen-js-name :prefix "ucw-form")))
}

Context:

[Fix thinko in the timestamp-slot presentation
Marco Baringer <mb at bese.it>**20050914150239] 
[parse-integer fixes (Patch by: Aleksandar Bakic <a_bakic at yahoo.com>)
Marco Baringer <mb at bese.it>**20050913072452] 
[Make the method (debug-on-error null) use an internal variable *debug-on-error* to hold the default value. 
Marco Baringer <mb at bese.it>**20050912073413
 
 This new *debug-on-error* is differente from the old *debug-on-error*
 in that it sholud not be accessed directly and is not part of ucw's
 public api.
] 
[MAke printing of admin-repl's return values robust in the face of print errors
Marco Baringer <mb at bese.it>**20050910141831] 
[Each <UCW:FORM form needs its own set-action-parameter method
Marco Baringer <mb at bese.it>**20050910141720] 
[Added print-object method for standard-application
Marco Baringer <mb at bese.it>**20050910141610] 
[Export DEBUG-ON-ERORR and not *DEBUG-ON-ERROR*
Marco Baringer <mb at bese.it>**20050910112959] 
[Minor docstring fix
Marco Baringer <mb at bese.it>**20050910112948] 
[Removed the global variable *debug-on-error*
Marco Baringer <mb at bese.it>**20050910112229] 
[Make debug-on-error be a method and not a global variable.
Marco Baringer <mb at bese.it>**20050910111732
 
 This change allows to control the value of *debug-on-error* based on
 the current app and not force one value on all the apps in the server.
] 
[Add in ensure-system-for-ucw whcih had been removed in a previous patch but is still neccessary
Marco Baringer <mb at bese.it>**20050910104436] 
[Change the default port back to 8080
Marco Baringer <mb at bese.it>**20050910104407] 
[Load the applications with map
Nathan Bird <nathan at acceleration.net>**20050908234136] 
[Attempt to guess the location of detachtty and attachtty (Patch by: Jamie Border <jamie at jborder.com>)
Marco Baringer <mb at bese.it>**20050909224843] 
[Default host should be 127.0.0.1.
Marco Baringer <mb at bese.it>**20050909080513] 
[Indentation and whitespace fixs to previous patches (no tabs in lisp code)
Marco Baringer <mb at bese.it>**20050909080102] 
[Merge the use-XYZ-backend functions from bin/utils.lisp into src/control.lisp
Marco Baringer <mb at bese.it>**20050909075356] 
[remove duplicate symbol export *ucw-tal-root*
Nathan Bird <nathan at acceleration.net>**20050908231752] 
['Simplify' start.lisp mostly by taking advantage of create-server
Nathan Bird <nathan at acceleration.net>**20050908221901] 
[Remove lispworks note about ASDF. We must eb able to assume that basic setup of ASDF is done before loading UCW.
Marco Baringer <mb at bese.it>**20050909072739] 
[Revert to using the --eval argument to attachtty
Marco Baringer <mb at bese.it>**20050908175755] 
[Fix conflicts in previous patch
Marco Baringer <mb at bese.it>**20050908175308] 
[Small changes to make-image.lisp and control.lisp for Lispworks
asbjxrn at bjxrnstad.net**20050908165654] 
[bin/ucwctl fixes
Craig McDaniel <craigmcd at gmail.com>**20050907190904] 
[THREADED-LISP-P for lispworks (Patch by: Asbj??rn Bj??rnstad <asbjxrn at bjxrnstad.net>)
Marco Baringer <mb at bese.it>**20050908162753] 
[Added the hello and bye-bye functions
Marco Baringer <mb at bese.it>**20050907212148
 
 these are actually really bady names, but i can't of anything better
 (and for some reason start/stop just doesn't appeal to me now).
 
] 
[Keep list of applications in a server sorted by the length of the url-prefix. This allows applications to 'shadow' other applications' url space.
Marco Baringer <mb at bese.it>**20050907004819] 
[Export the symbols for status-bar
Jan Rychter <jan at rychter.com>**20050906140902] 
[Added status-bar component (Patch by: Vladimir Sekissov <svg at surnet.ru>)
Marco Baringer <mb at bese.it>**20050906091035] 
[Removed "ignore" declaration for two variables which are used.
Peter Scott <sketerpot at gmail.com>**20050904194151] 
[Remove notes regarding tla from the README
Marco Baringer <mb at bese.it>**20050901062836] 
[Added maxlength slot to text-field (Patch by: Friedrich Dominicus <frido at q-software-solutions.de>)
Marco Baringer <mb at bese.it>**20050901062356] 
[added a bunch of docstrings
Marco Baringer <mb at bese.it>**20050831114350] 
[We need to use defmethod/cc, not just defmethod, in the presentations
Marco Baringer <mb at bese.it>**20050831110507] 
[Change the <ucw:form tag to use document.getElementById and not form[element-name] 
Marco Baringer <mb at bese.it>**20050831103142] 
[Change the example app to use initargs and not shared-initialize
Marco Baringer <mb at bese.it>**20050831103127] 
[Fixed typo in CSS mime-type code for httpd backend.
drewc at tech.coop**20050827231400] 
[Fix a lisp-mode typo.
Jan Rychter <jan at rychter.com>**20050829094417] 
[Rework sum example to use loop and backtracking
Marco Baringer <mb at bese.it>**20050828082311] 
[Argument for ucw.backend.dribble was missing
binarin at gmail.com**20050827135018] 
[Add precise control of external format used for url unescaping, slime and http intercommunication
binarin at gmail.com**20050827134632] 
[Fix typo <ucw:form tag. (Patch by: Aleksandar Bakic <a_bakic at yahoo.com>)
Marco Baringer <mb at bese.it>**20050827193931] 
[cmucl fixs. (Patch by: Mac Chan <emailmac at gmail.com>)
Marco Baringer <mb at bese.it>**20050827112915] 
[Rewrite the sum examples to act as we expect it to in the presence of back tracking
Marco Baringer <mb at bese.it>**20050824170029] 
[Use parenscript instead of (concatenate 'string ...
Marco Baringer <mb at bese.it>**20050824125546] 
[Adde convenience functions to change ucw's logging levels
Marco Baringer <mb at bese.it>**20050824125459] 
[Refactoring in httpd backend
Marco Baringer <mb at bese.it>**20050824125423] 
[Added a logging statement in httpd backend
Marco Baringer <mb at bese.it>**20050824125337] 
[minor updates to TODO
Marco Baringer <mb at bese.it>**20050824125306] 
[Removed have-threads-p from bin/start.lisp. Use the threaded-lisp-p function from control.lisp instead.
Marco Baringer <mb at bese.it>**20050824125007] 
[Fix shutdown-backend method for araneida. (Patch by: Friedrich Dominicus <frido at q-software-solutions.de>) (only two months late...)
Marco Baringer <mb at bese.it>**20050819082155] 
[Use prin1 (instead of the default princ) for printing the admin-repl's values. (Reported by: Pascal Bourguignon <pjb at informatimago.com>)
Marco Baringer <mb at bese.it>**20050818145347] 
[The macro SHOW was being defined in standard-action.lisp, it' already defined with the template component. removed it.
Marco Baringer <mb at bese.it>**20050817100830] 
[Use swank-backend:close-socket to close the httpd backend's socket, not cl:close.
Marco Baringer <mb at bese.it>**20050814163132] 
[Use parenscript. New tag <ucw:script.
Marco Baringer <mb at bese.it>**20050814141501] 
[Added dependency on parenscript
Marco Baringer <mb at bese.it>**20050814135145] 
[Fix typos in README
Marco Baringer <mb at bese.it>**20050814135114] 
[Make the transaction-example component a task-component
Marco Baringer <mb at bese.it>**20050814111842] 
[standard-session-frame depends on macros defined in request-loop-error
Marco Baringer <mb at bese.it>**20050814111809] 
[Wrap calls to transaction continuations in with-call/cc, used kall and not funcall to continue a continuation.
Marco Baringer <mb at bese.it>**20050814111715] 
[The class is not called arnesi::cps-closure anymore, it's closure/cc
Marco Baringer <mb at bese.it>**20050812174701] 
[Added the Status header to the mod_lisp backend
Marco Baringer <mb at bese.it>**20050812122805] 
[Use arnesi:+cr-lf+ to get a CR-LF string
Marco Baringer <mb at bese.it>**20050812122742] 
[Change the logging statements so they're clearer and so that +info+ gives decent information
Marco Baringer <mb at bese.it>**20050812122701] 
[indentation fixup
Marco Baringer <mb at bese.it>**20050812114933] 
[form-component's submit action needs to use defaction, not just defmethod
Marco Baringer <mb at bese.it>**20050812114907] 
[Deal with method qualifiers in defaction forms
Marco Baringer <mb at bese.it>**20050812114752] 
[When serving files we try to infer the file type from the file's extension
Marco Baringer <mb at bese.it>**20050812114718] 
[Added a few debugging statements to the httpd backend
Marco Baringer <mb at bese.it>**20050812114647] 
[The Status header isn't really a header and the httpd backend needs to deal with it differently
Marco Baringer <mb at bese.it>**20050812113758] 
[Implement publish-directory for the httpd backend. Changed how handlers work in this backend.
Marco Baringer <mb at bese.it>**20050812090052] 
[The www-root for the damin app is "/ucw/admin/", not "/ucw/examples/" :(
Marco Baringer <mb at bese.it>**20050812071421] 
[Fix hint text for when yaclml is missing a required feature
Marco Baringer <mb at bese.it>**20050810053746] 
[Fix bug in DEFCOMPONENT's handling of :metaclass option (Reported by: Friedrich Dominicus <frido at q-software-solutions.de>)
Marco Baringer <mb at bese.it>**20050809130342] 
[fix bug in ensure-system-has-feature
Marco Baringer <mb at bese.it>**20050809122624] 
[Added hint parameter to ensure-system-has-feature
Marco Baringer <mb at bese.it>**20050809112951] 
[Fix bug in log messages in araneida backend (Reported by: Friedrich Dominicus <frido at q-software-solutions.de>)
Marco Baringer <mb at bese.it>**20050809064728] 
[When a component-slot is passed the :component keyword we need to setup the slot for backtracking
Marco Baringer <mb at bese.it>**20050809055756] 
[Minor refactoring in initialize-backtracking
Marco Baringer <mb at bese.it>**20050809054005] 
[Minor formatting touchup in generate-backtrace-for-emacs
Marco Baringer <mb at bese.it>**20050807140906] 
[Setup *current-condition* and *current-backtrace* in the server's handler-bind (the one which takes care of internal ucw errors)
Marco Baringer <mb at bese.it>**20050807135042] 
[Added the generate-backtrace-for-emacs restart
Marco Baringer <mb at bese.it>**20050807134832
 
 This new restart requires some really hacky stuff that we'll probably
 need to redo later on (we pass the condition and the backtrace from
 the handler to the restart via two special variables).
 
] 
[Rework error handling methods
Marco Baringer <mb at bese.it>**20050807122844
 
 We've changed the API of handle-request-error and handle-action-error
 from (condition request response) to (conndition backtrace). we now
 collect the backtrace as soon as the error handler kicks, this removes
 some useless frames whcih were previously being inserted.
 
 we've also introduced the with-action-error-handler macro and a
 defgeneric form for handle-action-error.
 
 the methods on handle-request-error have been rewritten to use the new
 with-error-page macro.
 
] 
[Use DEFCOMPONENT's new options in the examples
Marco Baringer <mb at bese.it>**20050807122639] 
[Extend and refactor the DEFCOMPONENT macro. (see new docstring for details)
Marco Baringer <mb at bese.it>**20050807121844] 
[Added a few logging statements 
Marco Baringer <mb at bese.it>**20050807091151] 
[Don't use ITERATE around <ucw:input tags.
Marco Baringer <mb at bese.it>**20050807075849] 
[Don't copy backtrack values in save-backtrack (this isn't neccessary for proper backtracking)
Marco Baringer <mb at bese.it>**20050806093402] 
[Fix backtracking on non immediate objects
Marco Baringer <mb at bese.it>**20050806090550
 
 This changes the times when values are copied in the backtracking
 stuff. Previously we'd copy when saving the bt list and when cloning
 it, we now copy when saving, when restoring, but not when cloning. The
 previous implementation caused already stored backtracked values to be
 modified, when they'd later be restorted they'd have values which
 didn't reflect what the user (and the developer) expects (this is
 bad).
 
] 
[Added, and initialized, the generating-frame slot to standard-session-frame.
Marco Baringer <mb at bese.it>**20050806090059] 
[removed standard-application's service :after method
Marco Baringer <mb at bese.it>**20050806085933
 
 The method was just calling save-backtracked, standard-session-frame
 already does that and is the 'proper' place for thaht stuff.
 
] 
[Fix various typos/thinkos on control.lisp
Marco Baringer <mb at bese.it>**20050806082907] 
[Make the inspector output more readable (Patch by: William Halliburton <whalliburton at gmail.com>)
Marco Baringer <mb at bese.it>**20050806054207] 
[Fix slot options for deleteablep in list-presentation (Reported by: Pascal Bourguignon <pjb at informatimago.com>)
Marco Baringer <mb at bese.it>**20050805073024] 
[Properly deal with the backtracking of unbound slots
Marco Baringer <mb at bese.it>**20050803095347] 
[Remove the update.sh script
Marco Baringer <mb at bese.it>**20050802161726] 
[Change API of MAKE-BACKEND
Marco Baringer <mb at bese.it>**20050802111231] 
[Another type in the defgeneric form for make-backend
Marco Baringer <mb at bese.it>**20050802110327] 
[Fix typo and change error message in the default method for MAKE-BACKEND
Marco Baringer <mb at bese.it>**20050802110151] 
[Need to wrap the form passed on <:select :on-change in a with-call/cc 
Marco Baringer <mb at bese.it>**20050729105241] 
[Since call-inspector is a /cc method we need to call it within a with-call/cc form
Marco Baringer <mb at bese.it>**20050726095455] 
[Since the getter/setter of a PLACE object can be cps-closure objects we need to treat them explicitly
Marco Baringer <mb at bese.it>**20050726095425] 
[Even window components must use KALL and not FUNCALL for their continutation :)
Marco Baringer <mb at bese.it>**20050726095333] 
[Removed call to arnesi:assert-cc
Marco Baringer <mb at bese.it>**20050725121348] 
[Wrap call to the cc method START in a with-call/cc
Marco Baringer <mb at bese.it>**20050723133329] 
[Continuations are now called using ARNESI:KALL, not FUNCALL
Marco Baringer <mb at bese.it>**20050723133311] 
[Actions need to be wrapped in with-call/cc
Marco Baringer <mb at bese.it>**20050723113039] 
[Rename GET-BACKEND to MAKE-BACKEND
Marco Baringer <mb at bese.it>**20050801143643] 
[Edit CREATE-SERVER so that it properly updates *debug-on-error* and *inspect-components*
Marco Baringer <mb at bese.it>**20050801143254] 
[Remove spurious double lines between method definitions
Marco Baringer <mb at bese.it>**20050801142440] 
[Minor doc string fixups to GET-BACKEND
Marco Baringer <mb at bese.it>**20050801142247] 
[Added copyright notice to src/control.lisp
Marco Baringer <mb at bese.it>**20050801134638] 
[Lisp startable UCW
Robert Marlow <bobstopper at bobturf.org>**20050801050720
 
 This should allow UCW to be easily startable from within lisp rather than 
 from loading lisp start.lisp. The function for doing this is named
 create-server. ucwctl has been changed to make use of the new functionality
 but should work as it did before.
 
 defentry-point can now be used before its application has been attached 
 to a server - when the application is attached to a server its entry 
 points will then automatically be added. This makes it possible to load 
 up system definitions containing defentry-points without having a running 
 server beforehand. Thus lisp images can then be dumped containing full
 applications rather than just UCW.
 
 A get-backend method has been defined which creates a backend according
 to its arguments. It is also able to automatically choose a sensible
 default from currently loaded backends. It can also accept an existing,
 running server as a backend in which case it simply wraps it with a
 sensible UCW backend and returns it. This allows UCW applications to be
 attached to already running HTTP servers rather than requiring fresh
 servers be started by UCW. So far it's only been implemented for Araneida.
 
 I've only really tested the araneida and (briefly) HTTPD backends but the 
 method of starting the backends should be similar to how start.lisp worked
 so I'm hoping I haven't broken anything. 
 
] 
[bash -> sh
Julian Stecklina <der_julian at web.de>**20050731145119] 
[Use defcomponent instead of defclass for simple-template-component
Marco Baringer <mb at bese.it>**20050726095406] 
[When creating the string for request paramteers use the same element-type as the raw-uri array
Marco Baringer <mb at bese.it>**20050730114429] 
[Instead of looking for a property named VERSIONS we now call it :FEATURES. Updated the error message accordingly
Marco Baringer <mb at bese.it>**20050729103158] 
[Renamed 'version' to 'feature' in asdf property check. added check for cps-interpreter
Marco Baringer <mb at bese.it>**20050728120322] 
[Changes to the stylesheet
Marco Baringer <mb at bese.it>**20050728120129] 
[Added the "top-level" retry render-on restart
Marco Baringer <mb at bese.it>**20050726122803] 
[When printing the 'retry rendering' restart added the component object which caused the error
Marco Baringer <mb at bese.it>**20050726122740] 
[template-component-environment methods must always return a fresh list
Marco Baringer <mb at bese.it>**20050725121551] 
[Make the wiki example use the show-window macro
Marco Baringer <mb at bese.it>**20050725121447] 
[Added SHOW and SHOW-WINDOW macros
Marco Baringer <mb at bese.it>**20050725121421] 
[Post method for login component
matley at innerloop.it**20050724142609] 
[Added initarg to client-value (form-component)
matley at innerloop.it**20050723142419] 
[Little typo bugfix
matley at innerloop.it**20050722200835] 
[Change the CALL macro to check for window-component'ness when used in entry-points
Marco Baringer <mb at bese.it>**20050723102841] 
[Fix the upload example
Marco Baringer <mb at bese.it>**20050721155417] 
[Only create a mime-part object for those mime-parts which have headers other than just "name"
Marco Baringer <mb at bese.it>**20050721155338] 
[Only use copy-seq on the request parameters if thay are strings (as opposed to mime-part objects)
Marco Baringer <mb at bese.it>**20050721154259] 
[Export the mime-part accessors
Marco Baringer <mb at bese.it>**20050721154124] 
[Update component slots and backtrack slots when reinitializing component classes
Marco Baringer <mb at bese.it>**20050718172834] 
[Allow defcomponent slot forms to be symbols (some effect as with defclass)
Marco Baringer <mb at bese.it>**20050718171831] 
[More accurate information regarding versions and how to get the software.
Jos?? Pablo Ezequiel Fern??ndez <pupeno at pupeno.com>**20050718033950] 
[More changes regarding dependencies.
Jos?? Pablo Ezequiel Fern??ndez <pupeno at pupeno.com>**20050717214720] 
[Some clear statements about the dependencies (more is still neede).
Jos?? Pablo Ezequiel Fern??ndez <pupeno at pupeno.com>**20050717213407] 
[Make ucw's installation directory an explicit configuration variable in make-image.lisp
Marco Baringer <mb at bese.it>**20050717191936] 
[Remove useless debugging code from ucw-tags.lisp
Marco Baringer <mb at bese.it>**20050717191301] 
[Fix handling of HTTR response status codes in aserve backend (Patch by: Antonio Menezes Leitao <aml at gia.ist.utl.pt>)
Marco Baringer <mb at bese.it>**20050717190254] 
[Fix handling of HTTP request/respons headers in aserve backend. (Patch by: Antonio Menezes Leitao <aml at gia.ist.utl.pt>)
Marco Baringer <mb at bese.it>**20050717185826] 
[Initial Import from arch
Marco Baringer <mb at bese.it>**20050706133829
 This patch is exactly equal to ucw-2004 at common-lisp.net/ucw--dev--0.3--patch-426 it simply
 represents the move over to darcs.
] 
[Added boring file
Marco Baringer <mb at bese.it>**20050706132641] 
Patch bundle hash:
873c587153dff15306992e27fac24a10be871070


More information about the bese-devel mailing list