Sfoglia il codice sorgente

* Added transcode event

git-svn-id: trunk@17571 -
michael 14 anni fa
parent
commit
954293f30b
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      packages/fcl-web/src/webdata/fpwebdata.pp

+ 5 - 0
packages/fcl-web/src/webdata/fpwebdata.pp

@@ -17,10 +17,12 @@ type
   TWebDataAction = (wdaUnknown,wdaRead,wdaUpdate,wdaInsert,wdaDelete);
 
   { TCustomWebdataInputAdaptor }
+  TTransCodeEvent = Procedure (Sender : TObject; Var S : String);
 
   TCustomWebdataInputAdaptor = class(TComponent)
   private
     FAction: TWebDataAction;
+    FOntransCode: TTransCodeEvent;
     FRequest: TRequest;
     FBatchCount : Integer;
     FRequestPathInfo : String;
@@ -39,6 +41,7 @@ type
     Function GetFieldValue(Const AFieldName : String) : String;
     Property Request : TRequest Read FRequest Write SetRequest;
     Property Action : TWebDataAction Read GetAction Write FAction;
+    Property OnTransCode : TTransCodeEvent Read FOntransCode Write FOnTransCode;
   end;
   TCustomWebdataInputAdaptorClass = Class of TCustomWebdataInputAdaptor;
 
@@ -605,6 +608,8 @@ begin
   Result:=(I<>-1);
   If Result then
     L.GetNameValue(I,N,AValue);
+  If (AValue<>'') and Assigned(FOnTranscode) then
+    FOnTransCode(Self,Avalue);
 end;
 
 function TCustomWebdataInputAdaptor.TryFieldValue(const AFieldName: String;