|
|
|
Re: How to register a listener to datachange on Form or Page [message #1842363 is a reply to message #1842347] |
Thu, 17 June 2021 07:35 |
|
Hi,
to check, whether a table is dirty, you can use the method isSaveNeeded of ITableField.
If you want to listen for changes, you can add a table listener to the table using ITable.addTableListener. You are probably interested in TableEvent.TYPE_ROWS_INSERTED, TableEvent.TYPE_ROWS_UPDATED, TableEvent.TYPE_ROWS_DELETED.
If you need to be notified when a form is closed, add a form listener to the form using IForm.addFormListener with the type FormEvent.TYPE_CLOSED. With the IForm.getCloseSystemType() you can determine whether the user pressed Ok or Cancel, or just use IForm.isFormStored().
If you want, you can then trigger a DataChangeEvent, as described in the linked post, to inform other widgets that your data changed, but I don't think this is necessary for your use case.
If you want to get informed when another user changes the data displayed on your form, then you should use client notifications.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02647 seconds