[tbnl-devel] Re: Suggestion for a possible TBNL improvement

Well, suppose you have a purchase order entry form where you have to add/delete/save different line items. Tipically you'll have an ADD/DELETE/SAVE submit buttons with the same name (e.g. FORM-BUTTON) but with three different values (e.g. ADD, DELETE, SAVE) to be handled by three different LISP functions. Something like : (create-input-form-dispatcher FORM-BUTTON ADD ADD-ITEM-HANDLER) (create-input-form-dispatcher FORM-BUTTON DELETE DELETE-ITEM-HANDLER) (create-input-form-dispatcher FORM-BUTTON SAVE SAVE-ITEM-HANDLER) would return three dispatchers for these three events. -- ING. MASSIMILIANO CAMPAGNOLI PAOLO ASTORI SRL VIA MIRABELLA, 9 28013 - GATTICO ITALY

I let the handler function dispatch to the specialized functions for processing a form. Most forms are more complex than just "if value is set run function ...". E. g. submit/preview can be set even when all the other form fields are not (not filled, or a crack attempt without browser). I have a form which runs the edit function when a preview is wanted and all the fields are empty. Regards, Stefan
participants (2)
-
Massimiliano Campagnoli
-
Stefan Scholl