Changes for page ERPrototaculous

Last modified by Ravi Mendis on 2010/11/18 05:07

From version 203.1
edited by Ravi Mendis
on 2009/07/22 05:29
Change comment: There is no comment for this version
To version 198.1
edited by Ravi Mendis
on 2009/07/17 06:30
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -24,21 +24,21 @@
24 24  
25 25  ==== Prototype WebObjects Elements ====
26 26  
27 -##Ajax.Updater## and ##Ajax.Request## have been implemented as WebObjects elements.
27 +##Ajax.Updater## and ##Ajax.Request## have been implemented as WebObjects dynamic elements.
28 28  
29 29  ===== Ajax.Updater =====
30 30  
31 -Support for Prototype's [[Ajax.Updater>>http://www.prototypejs.org/api/ajax/updater]] is in the form of three elements:
31 +Support for Prototype's [[Ajax.Updater>>http://www.prototypejs.org/api/ajax/updater]] is in the form of three components:
32 32  
33 33  * AjaxUpdaterLink
34 34  * AjaxUpdaterButton
35 35  * AjaxUpdaterForm (with ##onsubmit## for ajax form submission)
36 36  
37 -These components will update //any// **container** on the page:
37 +These components will update a **container** on the page:
38 38  
39 39  {{code value="javascript"}}
40 40  
41 -new Ajax.Updater('container', url, {options});
41 + new Ajax.Updater('container', url, {options});
42 42  
43 43  {{/code}}
44 44  
... ... @@ -53,7 +53,7 @@
53 53  
54 54  {{code value="javascript"}}
55 55  
56 -new Ajax.Request(url, {options});
56 + new Ajax.Request(url, {options});
57 57  
58 58  {{/code}}
59 59  
... ... @@ -75,26 +75,22 @@
75 75  (WebObjects dynamically assigned names are not compatible with ERPrototaculous).
76 76  1. All ajax forms in an ERPrototaculous app need to be instances of ##AjaxUpdaterForm##.
77 77  1. Ajax form submit buttons can be a:
78 -1*. Static ##<button>##.
79 -1*. WOSubmitButton (if the result is to update whole page/app).
80 -1*. AjaxUpdaterButton (to update a **container**). Or
81 -1*. AjaxRequestButton (for a **background** ajax request).
82 82  
79 +*
80 +** Static ##<button>##.
81 +** WOSubmitButton (if the result is to update whole page/app).
82 +** AjaxUpdaterButton (to update a **container**). Or
83 +** AjaxRequestButton (for a **background** ajax request).
84 +
83 83  So forms are different in Ajax.framework and ERPrototaculous.
84 84  
85 85  In ERPrototaculous you may still have typical WebObjects forms (i.e WOForm) as well as use ajax forms (i.e **AjaxUpdaterForm**).
86 86  They behave differently in that an AjaxUpdaterForm will update the contents of a container as opposed to the entire page.
87 87  
88 -{{warning title="Warning"}}
89 -
90 -You must *name your form controls*, otherwise under certain circumstances Prototype (ajax) form submission will break.
91 -
92 -{{/warning}}
93 -
94 94  == Ajax Response Handling in ERPrototaculous ==
95 95  
96 96  One notable difference between the ERPrototaculous and Ajax frameworks is in the way they handle ajax responses.
97 -In ERPrototaculous, updates and actions break with //The WebObjects Way// by being pseudo-stateless.
93 +In ERPrototaculous, updates and actions break with "The WebObjects Way" by being pseudo-stateless.
98 98  
99 99  WebObjects typically vends a fresh response for each and every action. With ajax, this is not necessary.
100 100  
... ... @@ -104,21 +104,15 @@
104 104  
105 105  So for ajax, the current state of the page fragment component is all that is necessary.
106 106  
107 -{{info title="No More"}}
108 -
109 -A 100% ajax WO-app (like an [ERDivaLook|ERDivaLook] app) is no longer be plagued by the well known _limitation_ of WebObjects - the browser *backtrack problem*.
110 -
111 -{{/info}}
112 -
113 113  == Ajax Actions in ERPrototaculous ==
114 114  
115 115  Typically, in a WebObjects application, an action would return the contents of the entire page.
116 116  
117 117  Ajax responses are mostly page fragments or just part of a page.
118 -So you should make sure the actions in ERPrototaculous (or AjaxUpdaterButton and AjaxRequestButton) return the proper page fragment as opposed to the entire page.
108 +So you should make sure the actions in ERPrototaculous (or AjaxUpdaterButton and AjaxRequestButton) return the proper page fragment as opposed to the entire page.
119 119  This breaks with WO-tradition, so this is where you need to be careful.
120 120  
121 -{{note title="Note"}}
111 +{{note title="Actions"}}
122 122  
123 123  ERPrototaculous actions *differ* from Ajax.framework actions - _They must return only the page fragment_.
124 124  
... ... @@ -133,4 +133,3 @@
133 133  It is similar to an AjaxUpdateContainer when it has the binding ##ajax = true##, otherwise it's pretty much like **WOGenericContainer**.
134 134  
135 135  It has been implemented as a utility or //convenience// for Prototype's ##Ajax.Updater##.
136 -That is it can be used to update from a popup //onchange//, or from a Prototype //callback// like //onComplete//, etc.