Anguilla - Updating a field's value from a popup?

北慕城南 提交于 2019-12-05 06:46:47

Your code runs in a popup, so any references you make to global variables will be taken from the popup window.

So when you get the fieldBuilder:

var fieldBuilder = $display.getView().properties.controls.fieldBuilder;

$display is a reference to a global variable. So this actually looks for the FieldBuilder in the popup window (which doesn't have one).

To get the FieldBuilder of the Component window, you can get it from the opener:

var fieldBuilder = opener.$display.getView().properties.controls.fieldBuilder;

You might want to consider actually passing the updated value to either a callback function or with a (custom) event though, since that makes your popup less dependent on opener. trick.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!