Changes for page ERPrototaculous
Last modified by Ravi Mendis on 2010/11/18 05:07
From version 258.1
edited by Ravi Mendis
on 2009/07/16 09:08
on 2009/07/16 09:08
Change comment:
Add note on Ajax.Updater elements
To version 262.1
edited by Ravi Mendis
on 2009/07/16 09:52
on 2009/07/16 09:52
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,10 +7,10 @@ 7 7 Features include: 8 8 9 9 * 'Organic' support for Prototype and Scriptaculous in WebObjects. 10 +* Use of [[Unobtrusive Javascript>>http://en.wikipedia.org/wiki/Unobtrusive_JavaScript]]. 11 +* Pseudo-stateless ajax responses 10 10 * No custom Prototype extensions 11 11 * A set of widgets in the Prototype + Scriptaculous family. 12 -* Use of [[Unobtrusive Javascript>>http://en.wikipedia.org/wiki/Unobtrusive_JavaScript]]. 13 -* Virtually stateless ajax responses 14 14 15 15 ==== Unobtrusive Javascript in ERPrototaculous ==== 16 16 ... ... @@ -19,16 +19,29 @@ 19 19 20 20 The result is **faster** and more **reliable** ajax in WebObjects applications. 21 21 22 -==== Prototype Elements ==== 22 +==== Prototype WebObjects Elements ==== 23 23 24 +##Ajax.Updater## and ##Ajax.Request## have been implemented as WebObjects dynamic elements. 25 + 24 24 ===== Ajax.Updater ===== 25 25 26 26 Support for Prototype's [[Ajax.Updater>>http://www.prototypejs.org/api/ajax/updater]] is in the form of three components: 27 27 28 - 1.AjaxUpdaterLink29 - 1.AjaxUpdaterButton30 - 1.AjaxUpdaterForm (with ##onsubmit## for ajax form submission)30 +* AjaxUpdaterLink 31 +* AjaxUpdaterButton 32 +* AjaxUpdaterForm (with ##onsubmit## for ajax form submission) 31 31 34 +These components will update a **container** on the page. 35 + 36 +===== Ajax.Request ===== 37 + 38 +Prototype's [[Ajax.Request>>http://www.prototypejs.org/api/ajax/request]] is in the form of: 39 + 40 +* AjaxRequestLink 41 +* AjaxRequestButton 42 + 43 +These are used for strictly **background** ajax communication. 44 + 32 32 ==== Prototype + Scriptaculous Widgets ==== 33 33 34 34 * Accordion ... ... @@ -41,11 +41,23 @@ 41 41 42 42 Differences from using forms in WebObjects. i.e ##WOForm##: 43 43 44 - *All form controls must be named. This includes text fields, selects and buttons.57 +1. All form controls must be named. This includes text fields, selects and buttons. 45 45 (WebObjects dynamically assigned names are not compatible with ERPrototaculous). 46 -* All forms in an ERPrototaculous app are instances of ##AjaxUpdaterForm##. 47 -* Form submits can be the form of a: 59 +1. All forms in an ERPrototaculous app are instances of ##AjaxUpdaterForm##. 60 +1. Form submits can be the form of a: 61 + 62 +* 48 48 ** Static ##<button>## 49 49 ** WOSubmitButton (if the result is to update whole page/app. 50 50 ** AjaxUpdaterButton (to update a **container**). Or 51 51 ** AjaxRequestButton (for a background ajax request) 67 + 68 +== Ajax Page Caching in ERPrototaculous == 69 + 70 +One notable difference in the ERPrototaculous and Ajax.framework is in the ajax responses. 71 +ERPrototaculous updates and actions break with "The WebObjects Way" by being pseudo-stateless. 72 + 73 +Instead of returning a new context, an ajax update or action is in fact the same instance. 74 + 75 +The reason returning a new context is not necessary is because a client never travels back or forwards through an ajax application unlike in a typical WebObjects app. 76 +Here the current state (or context) of the update or action is all that is necessary.