Saturday, February 20, 2010

Cubi new openbiz.js

In previous openbiz baseapp, clientUtil.js is the main js library to support openbiz browser end logic. It handles Ajax call, form behavior, popup, dialog, richeditor, auto suggestion ... When more functions are inserted in the js file, the code get more messy. Cubi replaces clientUtil.js with openbiz.js in order to get the browser code more organized.

The code structure in openbiz.js
  • Openbiz - main Openbiz namespace. It manages the form objects and provide entry of openbiz ajax call
  • Openbiz.ActionType. It defines the action types of openbiz ajax call.
  • Openbiz.Form. Each openbiz form instance will have a javascript Openbiz.Form instance
  • Openbiz.TableForm. This is the js instance of openbiz List/grid form.
  • Openbiz.Net. It provides network related functions like ajax call.
  • Openbiz.Window. It manages popup, dialog logic.
  • Openbiz.Util. It has some utility functions.
  • Openbiz.Menu. It has functions to show and hide context menu
  • Openbiz.CKEditor. It has functions that integrate CKEditor with ajax call.
  • Openbiz.AutoSuggest. It has functions that initiates autosuggestion control
  • Openbiz.Validator. It has functions that validate user entries on client side only.
With the replacement of clientUtil.js to openbiz.js, there will be some change needed on the existing template, code that worked with clientUtil.js. For example.
  • Replace CallFunction with Openbiz.CallFunction in the list template file
Most changes are done in the openbiz code already to work with the new openbiz.js.

Openbiz.js introduce another importance changes.
  • User JSON in all ajax call.

No comments:

Post a Comment