The purpose of this unbound control is, when i close the dialog, I will pass it's value to class1 to do things.
But if i go to another field in the dialog i lose the value of the unbound control.
[ExtensionOf(FormControlStr(From1, control1))]
final class Form1Control1_Extension
{
public boolean modified()
{
boolean ret = next modified();
if (ret)
{
if (certain logic)
{
element.setUnboundControl()
}
}
return ret;
}
}
[ExtensionOf(formStr(Form1))]
final class Form1_Extension
{
private NoYesId unboundControlValue;
public void setUnboundControl()
{
//logic
FormCheckBoxControl unboundControl = formDesign.controlName(formControlStr(From1, UnboundControl)) as FormCheckBoxControl;
if (unboundControl && xControl && yControl)
{
suppressChargesControl.value(xControl.value() || yControl.value()); //assume xControl and yControl are defined
this.parmUnboundControlValue(unboundControl.value());
}
}
public NoYesId parmUnboundControlValue(NoYesId _annsSuppressChargesValue = unboundControlValue)
{
unboundControlValue = _unboundControlValue;
return unboundControlValue;
}
public boolean closedOk()
{
boolean ret;
ret = next closedOk();
if (unboundControlValue &&
unboundControlValue != UnboundControl.value())
{
UnboundControl.value(unboundControlValue);
}
class1.parmUnboundControl(UnboundControl.value());
}
}

Report
All responses (
Answers (