Changes for page ERPrototaculous

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

From version 205.1
edited by Ravi Mendis
on 2009/07/21 03:55
Change comment: There is no comment for this version
To version 195.1
edited by Ravi Mendis
on 2009/07/17 06:29
Change comment: Change heading name

Summary

Details

Page properties
Content
... ... @@ -24,17 +24,17 @@
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  
... ... @@ -67,14 +67,14 @@
67 67  
68 68  Support for these widgets have been similarly implemented as **button** and **link** variants, depending whether it is used inside a form or not.
69 69  
70 -== Ajax Forms in ERPrototaculous ==
70 +== Forms in ERPrototaculous ==
71 71  
72 72  Differences from using forms in WebObjects. i.e ##WOForm##:
73 73  
74 -1. All ajax form controls must be named. This includes text fields, selects and buttons.
74 +1. All form controls must be named. This includes text fields, selects and buttons.
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 -1. Ajax form submit buttons can be a:
77 +1. Form submit buttons can be a:
78 78  
79 79  *
80 80  ** Static ##<button>##.
... ... @@ -87,16 +87,10 @@
87 87  In ERPrototaculous you may still have typical WebObjects forms (i.e WOForm) as well as use ajax forms (i.e **AjaxUpdaterForm**).
88 88  They behave differently in that an AjaxUpdaterForm will update the contents of a container as opposed to the entire page.
89 89  
90 -{{warning title="Warning"}}
91 -
92 -You must *name your form controls*, otherwise under certain circumstances Prototype (ajax) form submission will break.
93 -
94 -{{/warning}}
95 -
96 96  == Ajax Response Handling in ERPrototaculous ==
97 97  
98 98  One notable difference between the ERPrototaculous and Ajax frameworks is in the way they handle ajax responses.
99 -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.
100 100  
101 101  WebObjects typically vends a fresh response for each and every action. With ajax, this is not necessary.
102 102  
... ... @@ -106,14 +106,8 @@
106 106  
107 107  So for ajax, the current state of the page fragment component is all that is necessary.
108 108  
109 -{{info title="No More"}}
103 +== Actions in ERPrototaculous ==
110 110  
111 -A 100% ajax WO-app (like an [ERDivaLook|ERDivaLook] app) will no longer be plagued by the well known _limitation_ of WebObjects - the browser *backtrack problem*.
112 -
113 -{{/info}}
114 -
115 -== Ajax Actions in ERPrototaculous ==
116 -
117 117  Typically, in a WebObjects application, an action would return the contents of the entire page.
118 118  
119 119  Ajax responses are mostly page fragments or just part of a page.
... ... @@ -120,7 +120,7 @@
120 120  So you should make sure the actions in ERPrototaculous (or AjaxUpdaterButton and AjaxRequestButton) return the proper page fragment as opposed to the entire page.
121 121  This breaks with WO-tradition, so this is where you need to be careful.
122 122  
123 -{{note title="Note"}}
111 +{{note title="Actions"}}
124 124  
125 125  ERPrototaculous actions *differ* from Ajax.framework actions - _They must return only the page fragment_.
126 126  
... ... @@ -135,4 +135,3 @@
135 135  It is similar to an AjaxUpdateContainer when it has the binding ##ajax = true##, otherwise it's pretty much like **WOGenericContainer**.
136 136  
137 137  It has been implemented as a utility or //convenience// for Prototype's ##Ajax.Updater##.
138 -That is it can be used to update from a popup //onchange//, or from a Prototype //callback// like //onComplete//, etc.