In the child form, make a method named updateCaller and invoke it when you want to notify the parent:
void updateCaller() { Common common; Object dataSource; Object caller; ; //----------------------------------- //We are notifying using the dataSource common = element.args().record(); if (common && common.isFormDataSource() && formDataSourceHasMethod(common.dataSource(), identifierstr(SomethingWasHappend))) { dataSource = common.dataSource(); dataSource.SomethingWasHappend(); } //----------------------------------- //----------------------------------- //We are notifying using the form caller = element.args().caller(); if (caller && classidget(caller) == classnum(SysSetupFormRun) && formHasMethod(caller, identifierstr(SomethingWasHappend))) { caller.SomethingWasHappend(); } //----------------------------------- }
Implement the handling method in the parent form:
void SomethingWasHappend() { ; info("Something was happend (Form)"); }
Or if you prefer, in the DataSource:
void SomethingWasHappend() { ; info("Something was happend (DataSource)"); }
Invoking it from a simple button inside the child form:
void clicked()
{
super();
element.updateCaller();
}See a pratical sample in the form MarkupTrans (DataSource -> method write).
4 comments:
Very interesting! Thanks for sharing... :-)
I want to update the parent form field from the child form data source,please suggest me what to do.
オナニー
逆援助
SEX
フェラチオ
ソープ
逆援助
出張ホスト
手コキ
おっぱい
フェラチオ
中出し
セックス
デリヘル
包茎
逆援
性欲
Post a Comment