Client-side objects

The main object on the client side is optimajet and ojControls. It is a set of functions - tools to simlify interaction with ExtJS objects, server controllers and client objects. The following is a description of the main functions.

optimajet object

optimajet.container - provide access to all used ExtJS.Store objects. You can access store (or other registered object) using following call:

var store = optimajet.container.<storename>;

optimajet.containerOnAvailable (name, callback) - callback will be raised when store (or other registered object) with specified name will be registerd in container.

optimajet.containerOnAvailable ("storename", function (objectfomcontainer) {...});

optimajet.containerStoreOnLoad (name, callback) - callback will be raised when store load event occurs.

optimajet.containerOnAvailable ("storename", function (storeloadeventargs) {...});  

optimajet.registerInContainer (name, value) - use this function to register your own objects in optimajet.container.

optimajet.registerInContainer ("objectname", {...}); 

optimajet.StoresSave (mainStore, stores, visibility, isReload, resFunc, validationFunc, nothingchangesignore) - use this function to send Bulk save to the server. Typical usage:

var stores = [
optimajet.StoresSave(optimajet.container.form_Invoice_Edit_store, stores, '@visibility', false, callback, FormFinishValidate, true);

optimajet.localization.get (name) - use this function to get localized value of string constant.

var localizedvalue = optimajet.localization.get ("constantname");

optimajet.WaitSaveDialogShow (text) - show wait dialog with specified text.

optimajet.WaitSaveDialogShow("Command execution");

optimajet.WaitSaveDialogHide () - hide wait dialog.

optimajet.CorrectUr (url) - convert specified url to the full form.


ojControls object

Provides utility functions to add typical controls on the form.

GenerateErrorBlock (message) - generate error styled

with message inside.

GenerateSuccessBlock (message) - generate success styled

with message inside.

GenerateInfoBlock (message) - generate info styled

with message inside.

InitGridWithToolbar (prefix, viewname, config) - add a standard toolbar above a grid