浏览代码

* The value of a Checkbox or Rabiobutton should contain the value it should return if the control is checked. Not the value of the field itself.
* Fixed setting the Checked property

git-svn-id: trunk@8647 -

joost 18 年之前
父节点
当前提交
80eb344eef
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      packages/fcl-web/src/fpdatasetform.pp

+ 5 - 2
packages/fcl-web/src/fpdatasetform.pp

@@ -481,7 +481,10 @@ end;
 
 function TFormFieldItem.getValue: String;
 begin
-  Result := FField.asstring;
+  if inputType in [fitcheckbox,fitradio] then
+    Result := 'T'
+  else
+    Result := FField.asstring;
   if assigned (FOnGetValue) then
     onGetValue(self,Result);
 end;
@@ -919,7 +922,7 @@ procedure THTMLDatasetFormEditProducer.ControlToTableDef (aControldef : TFormFie
           if aControlDef.inputType in [fitcheckbox,fitradio] then
             begin
             with aControlDef.Field do
-              Checked := asBoolean;
+              Check := asBoolean;
             if assigned (FOnFieldChecked) then
               FOnFieldChecked (aControlDef.Field, check);
             Checked := check;