DataBook events

Documents for the development of and with JVx.

DataBook events

Postby Development@SIB » Thu Nov 25, 2010 5:01 pm

The IDataBook Iinterface defines the possible events that can occur while using DataBooks. These events are triggered on different occasions. The following instructions show the possible event triggers and the exact event sequence.

Event triggers


Event examples


Saving Records

saveSelectedRow.png
saveSelectedRow.png (22.93 KiB) Viewed 2964 times


Discarding Changes

restoreSelectedRow.png
restoreSelectedRow.png (16.36 KiB) Viewed 2964 times


Inserting records

insert.png
insert.png (16.59 KiB) Viewed 2964 times


Editing records

update.png
update.png (12.92 KiB) Viewed 2964 times

setValue.png
setValue.png (8.26 KiB) Viewed 2964 times


Deleting records

delete.png
delete.png (19.02 KiB) Viewed 2964 times


Row change

setSelectedRow.png
setSelectedRow.png (23.49 KiB) Viewed 2964 times


Column change

setSelectedColumn.png
setSelectedColumn.png (9.45 KiB) Viewed 2964 times


Updating data

reload.png
reload.png (6.25 KiB) Viewed 2964 times


Row change in Master

masterchanged.png
masterchanged.png (6.17 KiB) Viewed 2869 times



Examples

BEFORE INSERTING
  • Change current selection, e.g. to always insert in the first or last row
  • Throw exception to prevent insertion
AFTER INSERTINGSet default values
BEFORE INSERTED
  • Input-independent change of values
  • If writeback is deactivated, a server action can be called to perform the insertion
AFTER INSERTEDProcess server-tier data

BEFORE UPDATINGManual locking
AFTER UPDATINGControl visibility or en-/disable components, when, for example, editing is not permitted
BEFORE UPDATED
  • Calculate dynamic columns and copy values into writeback columns
  • If writeback is deactivated, a server action can be called to perform the update
AFTER UPDATEDProcess server-tier data

BEFORE DELETING
  • Throw exception to prevent deletion
  • Delete prompt. For this purpose, the Isolation Level is set to DATA_SOURCE and a dialogue is displayed. Upon confirmation, saveSelectedRow() is called and the Isolation Level is reset. If cancelled, restoreSelectedRow() is called and the Isolation Level is reset.
AFTER DELETINGCall saveSelectedRow() at the DATA_SOURCE Isolation Level
BEFORE DELETEDIf writeback is deactivated, a server action can be called to perform the deletion
AFTER DELETEDCalculate sums

BEFORE RESTOREThrow exception to NOT discard changes
AFTER RESTOREUpdate GUI/status

VALUE CHANGED
  • Change dependent values
  • Reset the changed value
  • Save row after each value change

BEFORE ROW SELECTEDThrow exception to prevent leaving the row
AFTER ROW SELECTEDControl visibility or en-/disable components after a row change

BEFORE COLUMN SELECTEDThrow exception to prevent leaving the column
AFTER COLUMN SELECTEDControl visibility or en-/disable components after a column change
User avatar
Development@SIB
 
Posts: 311
Joined: Mon Sep 28, 2009 1:54 pm

Return to Documentation