Just FYI - Issues with wizard generated Login form for Xdata Client

I admit, it took me while of head scratching before I figured out. The Login form generated by the Client Xdata didnt work for me.

In particular the Messages passed in the Display method was not being shown.

    class procedure Display(AElementId: string; LoginProc: TSuccessProc;
      AMsg: string); overload;

The form has these two "events"

class procedure TFViewLogin.Display(AElementId: string; LoginProc: TSuccessProc;
  AMsg: string);

  procedure AfterCreate(AForm: TObject);
  begin
    TFViewLogin(AForm).FMessage := AMsg;
    TFViewLogin(AForm).FLoginProc := LoginProc;
  end;

begin
  if Assigned(FViewLogin) then
    FViewLogin.Free;
  FViewLogin := TFViewLogin.CreateNew(AElementId, @AfterCreate);
end;

and

procedure TFViewLogin.WebFormCreate(Sender: TObject);
begin
  if FMessage <> '' then
    ShowNotification(FMessage)
  else
    HiddenNotification;
end;

The reason it didnt work was that WebFormCreate gets called before AfterCreate.

I can fix that for myself for my use case. Just letting you know in case you want to adjust the template.

Thanks, we will fix the wizard template.