ERPrototaculous

Version 260.1 by Ravi Mendis on 2009/07/16 09:10

Introduction

ERPrototaculous was developed to provide the ajax functionality in ERDivaLook.

What is ERPrototaculous?

Features include:

  • 'Organic' support for Prototype and Scriptaculous in WebObjects.
  • No custom Prototype extensions
  • A set of widgets in the Prototype + Scriptaculous family.
  • Use of Unobtrusive Javascript.
  • Virtually stateless ajax responses

Unobtrusive Javascript in ERPrototaculous

Unobtrusive javascript is used in contrast to on-demand style of ajax programming.
By including Javascript as well as CSS globally in the page wrapper, CSS and/or Javascript doesn't have to load inside ajax requests.

The result is faster and more reliable ajax in WebObjects applications.

Prototype WebObjects Elements

Ajax.Updater and Ajax.Request have been implemented as WebObjects dynamic elements.

Ajax.Updater

Support for Prototype's Ajax.Updater is in the form of three components:

  1. AjaxUpdaterLink
  2. AjaxUpdaterButton
  3. AjaxUpdaterForm (with onsubmit for ajax form submission)

Prototype + Scriptaculous Widgets

  • Accordion
  • LightWindow
  • ModalBox
  • CalendarDateSelect
  • FileUpload

Forms in ERPrototaculous

Differences from using forms in WebObjects. i.e WOForm:

  • All form controls must be named. This includes text fields, selects and buttons.
    (WebObjects dynamically assigned names are not compatible with ERPrototaculous).
  • All forms in an ERPrototaculous app are instances of AjaxUpdaterForm.
  • Form submits can be the form of a:
    • Static <button>
    • WOSubmitButton (if the result is to update whole page/app.
    • AjaxUpdaterButton (to update a container). Or
    • AjaxRequestButton (for a background ajax request)