The issue is shown on your video
When you press OK button, the dialog should close because the validation succeeds (it can be noticeable by the green frame around the edit).
But when we test IsValid property on the server side, it will contain false, so we don't close the dialog. See the code:
- Code: Select all
procedure TfrDia.IWFrameRegionJQDialogOptionsButtons0Click(Sender: TObject;
AParams: TStringList);
var C: TComponent;
JQValidateOpt: TIWCGJQValidateOptions;
begin
for C in IWFrameRegion do begin
if IsPublishedProp(C, 'JQValidateOptions') then begin
JQValidateOpt := TIWCGJQValidateOptions(GetObjectProp(C, 'JQValidateOptions'));
if JQValidateOpt.Enable then begin
JQValidateOpt.Validate;
if not JQValidateOpt.IsValid then begin
Exit;
end;
end;
end;
end;
IWFrameRegion.JQDialogOptions.Close();
end;
The dialog will be closed if we press OK button for the second time.