Changeset 46 for trunk/Application/UWebObjects.pas
- Timestamp:
- Jan 30, 2011, 11:06:37 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UWebObjects.pas
r45 r46 44 44 TQueryForm = class(THtmlForm) 45 45 private 46 function GetAsXmlElement: TXmlElement; override;47 46 public 48 47 Title: string; 49 48 Groups: TListObject; 50 49 Actions: TListObject; // TListObject<THtmlInput> 50 function GetAsXmlElement: TXmlElement; override; 51 51 constructor Create; 52 52 destructor Destroy; override; … … 88 88 function TQueryForm.GetAsXmlElement: TXmlElement; 89 89 var 90 NewItem: TXmlElement;91 90 I: Integer; 92 91 G: Integer; 93 NewHtml: THtmlElement;94 92 begin 95 93 Result := inherited GetAsXmlElement; 96 for G := 0 to Groups.Count - 1 do 97 with TQueryFormGroup(Groups[G]) do 98 begin 99 NewItem := TXmlString.Create; 100 TXmlString(NewItem).Text := Title; 101 TXmlTag(Result).SubElements.Add(NewItem); 102 NewHtml := THtmlLineBreak.Create; 103 TXmlTag(Result).SubElements.Add(NewHtml.AsXmlElement); 104 for I := 0 to Rows.Count - 1 do 105 with TQueryFormItem(Rows[I]) do begin 106 NewItem := TXmlString.Create; 107 TXmlString(NewItem).Text := Caption + ': '; 108 TXmlTag(Result).SubElements.Add(NewItem); 109 TXmlTag(Result).SubElements.Add(Value.AsXmlElement); 110 NewHtml := THtmlLineBreak.Create; 111 TXmlTag(Result).SubElements.Add(NewHtml.AsXmlElement); 94 with TXmlTag(Result).SubElements do begin 95 for G := 0 to Groups.Count - 1 do 96 with TQueryFormGroup(Groups[G]) do 97 begin 98 with TXmlString(Items[Add(TXmlString.Create)]) do begin 99 Text := Title; 100 end; 101 with THtmlLineBreak.Create do begin 102 Add(AsXmlElement); 103 end; 104 for I := 0 to Rows.Count - 1 do 105 with TQueryFormItem(Rows[I]) do begin 106 with TXmlString(Items[Add(TXmlString.Create)]) do begin 107 Text := Caption + ': '; 108 end; 109 Add(Value.AsXmlElement); 110 with THtmlLineBreak.Create do begin 111 Add(AsXmlElement); 112 end; 113 end; 114 end; 115 with THtmlInput.Create do begin 116 Value := 'Přihlásit'; 117 InputType := itSubmit; 118 Add(AsXmlElement); 112 119 end; 113 120 end; 114 NewHtml := THtmlInput.Create;115 THtmlInput(NewHtml).Value := 'Přihlásit';116 THtmlInput(NewHtml).InputType := itSubmit;117 TXmlTag(Result).SubElements.Add(NewHtml.AsXmlElement);118 121 end; 119 122
Note:
See TracChangeset
for help on using the changeset viewer.