diff --git a/demos/db/blog/src/blog.lpi b/demos/db/blog/src/blog.lpi
index b4d62dd..5fd7e5e 100644
--- a/demos/db/blog/src/blog.lpi
+++ b/demos/db/blog/src/blog.lpi
@@ -32,13 +32,16 @@
-
+
-
+
-
+
+
+
+
diff --git a/demos/db/blog/src/main.pas b/demos/db/blog/src/main.pas
index 222c972..904563e 100644
--- a/demos/db/blog/src/main.pas
+++ b/demos/db/blog/src/main.pas
@@ -7,7 +7,7 @@ interface
uses
BrookDBAction, BrookUtils, BrookDBUtils, BrookHTTPConsts, BrookTable,
BrookConsts, BrookActionHelper, Brokers, JTemplate, SysUtils, HTTPDefs, DB,
- FPJSON;
+ FPJSON, RUtils;
type
@@ -19,6 +19,7 @@ TActionView = class(TBrookDBAction)
public
constructor Create; override;
destructor Destroy; override;
+ procedure FillFields(ARequest: TRequest); override;
procedure DoRequest(ARequest: TRequest; AResponse: TResponse); override;
procedure LoadHtml(const AHtml: string);
property Template: TJTemplate read FTemplate;
@@ -74,6 +75,15 @@ destructor TActionView.Destroy;
inherited Destroy;
end;
+procedure TActionView.FillFields(ARequest: TRequest);
+var
+ I: Integer;
+begin
+ for I := 0 to Pred(ARequest.ContentFields.Count) do
+ Fields.Add(ARequest.ContentFields.Names[I],
+ StripHTMLMarkup(ARequest.ContentFields.ValueFromIndex[I]));
+end;
+
procedure TActionView.DoRequest(ARequest: TRequest; AResponse: TResponse);
begin
inherited DoRequest(ARequest, AResponse);
diff --git a/demos/db/crud/src/brook/complex/cgi1.lpi b/demos/db/crud/src/brook/complex/cgi1.lpi
index 7440257..e4998fb 100644
--- a/demos/db/crud/src/brook/complex/cgi1.lpi
+++ b/demos/db/crud/src/brook/complex/cgi1.lpi
@@ -33,13 +33,16 @@
-
+
-
+
-
+
+
+
+
diff --git a/demos/db/crud/src/brook/complex/mydbaction.pas b/demos/db/crud/src/brook/complex/mydbaction.pas
index 65c6c7c..c37a7ee 100644
--- a/demos/db/crud/src/brook/complex/mydbaction.pas
+++ b/demos/db/crud/src/brook/complex/mydbaction.pas
@@ -5,7 +5,8 @@
interface
uses
- BrookAction, BrookDBAction, BrookDBUtils, JTemplate, DB, FPJSON, SysUtils;
+ BrookAction, BrookDBAction, BrookDBUtils, JTemplate, RUtils, DB, FPJSON,
+ HTTPDefs, SysUtils;
type
@@ -22,6 +23,7 @@ TMyAction = class(TBrookDBAction)
public
constructor Create; override;
destructor Destroy; override;
+ procedure FillFields(ARequest: TRequest); override;
procedure Load(const AFileName: TFileName);
procedure Display;
function Add(const AName: TJSONStringType; AValue: TJSONData): Integer; overload;
@@ -53,6 +55,15 @@ destructor TMyAction.Destroy;
inherited Destroy;
end;
+procedure TMyAction.FillFields(ARequest: TRequest);
+var
+ I: Integer;
+begin
+ for I := 0 to Pred(ARequest.ContentFields.Count) do
+ Fields.Add(ARequest.ContentFields.Names[I],
+ StripHTMLMarkup(ARequest.ContentFields.ValueFromIndex[I]));
+end;
+
function TMyAction.GridCallback(ADataSet: TDataSet;
const AWritingType: TBrookHTMLTableWritingState;
const APosition, AMax: Integer; var AData: string): string;