mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-06 03:37:46 +02:00
45 lines
643 B
ObjectPascal
45 lines
643 B
ObjectPascal
unit hfIndex;
|
|
|
|
{$mode ObjFPC}
|
|
|
|
interface
|
|
|
|
uses
|
|
JS, SysUtils, Classes, htmlfragment, bootstraptablewidget, jsondataset,
|
|
localjsondataset, DB;
|
|
|
|
type
|
|
|
|
{ TfrmIndex }
|
|
|
|
TfrmIndex = class(THTMLFragment)
|
|
tbCountries: TDBBootstrapTableWidget;
|
|
dsCountries: TDataSource;
|
|
jdsCountries: TLocalJSONDataset;
|
|
procedure DataModuleCreate(Sender: TObject);
|
|
private
|
|
public
|
|
|
|
end;
|
|
|
|
var
|
|
frmIndex: TfrmIndex;
|
|
|
|
implementation
|
|
|
|
Var
|
|
Countries : TJSArray; external name 'countries';
|
|
|
|
{$R *.lfm}
|
|
|
|
{ TfrmIndex }
|
|
|
|
procedure TfrmIndex.DataModuleCreate(Sender: TObject);
|
|
begin
|
|
jdsCountries.Rows:=Countries;
|
|
jdsCountries.Open;
|
|
end;
|
|
|
|
end.
|
|
|