Wiki source code of ERPrototaculous

Version 255.1 by Ravi Mendis on 2009/07/16 09:17

Hide last authors
Ravi Mendis 100.1 1 == Introduction ==
2
Ravi Mendis 209.1 3 ERPrototaculous was developed to provide the ajax functionality in ERDivaLook.
4
5 === What is ERPrototaculous? ===
6
Ravi Mendis 233.1 7 Features include:
Ravi Mendis 209.1 8
Ravi Mendis 233.1 9 * 'Organic' support for Prototype and Scriptaculous in WebObjects.
Ravi Mendis 245.1 10 * No custom Prototype extensions
11 * A set of widgets in the Prototype + Scriptaculous family.
Ravi Mendis 241.1 12 * Use of [[Unobtrusive Javascript>>http://en.wikipedia.org/wiki/Unobtrusive_JavaScript]].
Ravi Mendis 249.1 13 * Virtually stateless ajax responses
Ravi Mendis 233.1 14
15 ==== Unobtrusive Javascript in ERPrototaculous ====
16
17 Unobtrusive javascript is used in contrast to on-demand style of ajax programming.
18 By including Javascript as well as CSS globally in the page wrapper, CSS and/or Javascript doesn't have to load inside ajax requests.
19
20 The result is **faster** and more **reliable** ajax in WebObjects applications.
21
Ravi Mendis 253.1 22 ==== Prototype WebObjects Elements ====
23
24 ##Ajax.Updater## and ##Ajax.Request## have been implemented as WebObjects dynamic elements.
25
26 ===== Ajax.Updater =====
27
28 Support for Prototype's [[Ajax.Updater>>http://www.prototypejs.org/api/ajax/updater]] is in the form of three components:
29
Ravi Mendis 255.1 30 * AjaxUpdaterLink
31 * AjaxUpdaterButton
32 * AjaxUpdaterForm (with ##onsubmit## for ajax form submission)
Ravi Mendis 253.1 33
34 ===== Ajax.Request =====
35
36 Prototype's [[Ajax.Request>>http://www.prototypejs.org/api/ajax/request]] is in the form of:
37
Ravi Mendis 255.1 38 * AjaxRequestLink
39 * AjaxRequestButton
Ravi Mendis 253.1 40
Ravi Mendis 229.1 41 ==== Prototype + Scriptaculous Widgets ====
Ravi Mendis 211.1 42
Ravi Mendis 209.1 43 * Accordion
44 * LightWindow
45 * ModalBox
46 * CalendarDateSelect
47 * FileUpload
Ravi Mendis 233.1 48
49 == Forms in ERPrototaculous ==
50
51 Differences from using forms in WebObjects. i.e ##WOForm##:
52
Ravi Mendis 255.1 53 1. All form controls must be named. This includes text fields, selects and buttons.
Ravi Mendis 233.1 54 (WebObjects dynamically assigned names are not compatible with ERPrototaculous).
Ravi Mendis 255.1 55 1. All forms in an ERPrototaculous app are instances of ##AjaxUpdaterForm##.
56 1. Form submits can be the form of a:
57
58 *
Ravi Mendis 233.1 59 ** Static ##<button>##
60 ** WOSubmitButton (if the result is to update whole page/app.
61 ** AjaxUpdaterButton (to update a **container**). Or
62 ** AjaxRequestButton (for a background ajax request)