Hi to all!
I have created an UIBuilder for a contract class.
In the postBuild method, I've decleared a new FormBuildGroupControl (I want to add a button to my dialog):
Dialog dialogLocal; Form form; DialogGroup dialogGroup; FormBuildGroupControl groupBuildControl; super(); dialogLocal = this.dialog(); contract = this.dataContractObject() as MyContractClass; form = this.dialog().form();
usePrintManagement = this.addDialogField(methodStr(MyContractClass, parmMyFlag), contract);
dialogGroup = this.dialog().addGroup(#ButtonName);
groupBuildControl = this.dialog().formBuildDesign().control(dialogGroup.formBuildGroup().id());
buttonBuildControl = groupBuildControl.addControl(FormControlType::Button, #ButtonName);
myFlag = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(myContractClass, parmMyFlag)); myFlag.registerOverrideMethod(methodStr(FormChecKBoxControl, modified), methodStr(myContractClass, myMethodOnModifiedFlag), this);
When I click on "myFlag" I want to activate/deactivate my buttonBuildControl.
Here the code of "myMethodOnModifiedFlag"
public boolean myMethodOnModifiedFlag(FormCheckBoxControl _checkBoxControl) { buttonBuildControl.enabled(any2enum(!_checkBoxControl.checked())); return true; }
But it does not work...any ideas?
*This post is locked for comments