-
Posts
929 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Posts posted by pro_imaj
-
-
1 hour ago, irigsoft said:
Maybe You have problem with TNetEncoding.Base64.Encode and decoding , i am not sure.
Can you try send request from RESTDebugger to Exe compiled by me.
and see in Right memo, what result will show.
Send request by this way direct in Browser: http://yourserver:port/JSON=EncodedBase64 (JSONdata).
all must be in URL.
Try to encode data with this: https://www.base64encode.org/
I think you are using an old unigui version, so I cannot view it with your exe.
I don't want to write a URL this is a solution that won't be right for the other party
RestFull logic is fixed all over the world. -
22 minutes ago, irigsoft said:
Hi, Thanks.
I was able to compile the project. But I can not get any results, what I'm doing wrong, I added the project sample. -
On 3/4/2023 at 2:50 PM, irigsoft said:
Hello, I use some kind of REST server.
here is how to send data from Client:
http://YOURSERVER:PORT/JSON=' + EncodeBase64 ('ALL_JSONDATA_LIKE_STRING');
here is how to read data REST server :
procedure TUniServerModule.UniGUIServerModuleHTTPCommand(
ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo;
var Handled: Boolean);
begin//Check if is JSON
if (POS ('/JSON',ARequestInfo.URI) > 0)
then begin
AResponseInfo.ResponseNo := 200;
AResponseInfo.ContentEncoding := '1251';ARequestInfo.Document := mmReadDocument (1,Copy (ARequestInfo.Document,Length ('/JSON=')+1,Length (ARequestInfo.Document))); //// DO YOUR REST STUFF
AResponseInfo.ContentText := ARequestInfo.Document;
AResponseInfo.WriteContent;
Handled := True;
AResponseInfo.CloseSession;
end;
end;How to process readded data REST server:
unit MainModule;
function mmReadDocument (iType: Integer; sDocument: String): String;
var
sDataList : TStringLIst;
begin
TRY
sDataList := TStringLIst.Create;
sDataList.DelimitedText := DecodeBase64 (sDocument);
FINALLY
sDataList.Clear;
sDataList.Free;
END;
end;
Hello,
Thank you for the answer.
I implemented your answer, but rest debugger does not return the correct result. I added the code you wrote into a small project, you can find the example in the attachment.
While sending the data, I want to send it as below with rest debugger.
URL : http://localhost:8077/JSON
Conten Type : { "Username": "test01", "Password": "test01"} -
11 hours ago, andyhill said:
This is how I return a PDF document
AResponseInfo.ContentType:= 'application/pdf'; AResponseInfo.ContentStream:= TFileStream.Create(FullyQualifiedPDF, fmOpenRead or fmShareCompat); AResponseInfo.ContentLength:= AResponseInfo.ContentStream.Size; AResponseInfo.WriteHeader; AResponseInfo.WriteContent; AResponseInfo.ContentStream.Free; AResponseInfo.ContentStream:= nil; AResponseInfo.ResponseNo:= 200; AResponseInfo.CloseConnection:= True; AResponseInfo.CloseSession; Handled:= True;
I can do this myself. What I can't do is read the incoming JSON value. I can't see the incoming Json value.
-
16 minutes ago, pro_imaj said:
Hi,
Can I use it as Unigui Rest Full.
So like this;
I will send the following 1.json format as Post method to http://localhost:8077/user link.2. I will send it as a response in json format, can this be done?
1. Json
{
"username": "a",
"Password": "123"
}2.Json
{
"Name": "bbbb",
"Mission": "pppppp"
}
*I tried to do a lot of reasoning and examples but as a general problem. When I type http://localhost:8077/user I see the following error on the screen.Invalid session or session Timeout. (Invalid URI: /user )
Is there a solution
ThanksI have prevented the error from occurring as follows, but I cannot see the JSON value sent with CustomBody in ARequestInfo. How can I get the incoming CustomBody value.
procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); begin if ARequestInfo.URI = '/user' then begin AResponseInfo.ContentText := '{"Name": "bbbb","Mission": "pppppp" }' ; AResponseInfo.ResponseNo := 200; AResponseInfo.WriteContent; Handled := True; end; end;
-
Hi,
Can I use it as Unigui Rest Full.
So like this;
I will send the following 1.json format as Post method to http://localhost:8077/user link.2. I will send it as a response in json format, can this be done?
1. Json
{
"username": "a",
"Password": "123"
}2.Json
{
"Name": "bbbb",
"Mission": "pppppp"
}
*I tried to do a lot of reasoning and examples but as a general problem. When I type http://localhost:8077/user I see the following error on the screen.Invalid session or session Timeout. (Invalid URI: /user )
Is there a solution
Thanks -
On 2/5/2023 at 12:46 AM, pro_imaj said:
Attached is your Kendo example, when you compile please open the pie chart because there is a problem there.
I want to show the "Isler" field and "Amount" field information when the mouse is hovered over the chart in the pie chart.The data structure is as follows.
with ClientDataSet1 do begin CreateDataSet; // Works, Quantity AppendRecord(['a ISI',1 ]); AppendRecord(['b ISI',3 ]); AppendRecord(['c ISI',5 ]); AppendRecord(['d ISI',7 ]); AppendRecord(['e ISI',9 ]); end;
For example, I want to see the following result when Pie is hovered over the chart with the mouse. "a HEAT :1 "
It should be with the code below, but "{0} field returns "Amount" information, while {1} field does not return "Works" information.
Do you have a suggestion about this?
Chart.ChartProperties.Values['tooltip'] := '{visible: true, format: "{0} :{1} "}';
@Marlon Nardi
Greetings Marlon,
Are you able to look into this matter?
Thanks. -
Attached is your Kendo example, when you compile please open the pie chart because there is a problem there.
I want to show the "Isler" field and "Amount" field information when the mouse is hovered over the chart in the pie chart.The data structure is as follows.
with ClientDataSet1 do begin CreateDataSet; // Works, Quantity AppendRecord(['a ISI',1 ]); AppendRecord(['b ISI',3 ]); AppendRecord(['c ISI',5 ]); AppendRecord(['d ISI',7 ]); AppendRecord(['e ISI',9 ]); end;
For example, I want to see the following result when Pie is hovered over the chart with the mouse. "a HEAT :1 "
It should be with the code below, but "{0} field returns "Amount" information, while {1} field does not return "Works" information.
Do you have a suggestion about this?
Chart.ChartProperties.Values['tooltip'] := '{visible: true, format: "{0} :{1} "}';
-
3 hours ago, Sherzod said:
Hello,
Which one?
UniGridsPivotGrid or UniGridsPivotGrid2
*all of the pivot grid examples in the demo -
Hi,
PivotGrid gives the following error even when I compile the Unigui demo. This error existed in the past, then it was fixed, now it still persists.
Could not set cell position: row: [0], column:[0] :Cannot read properties of undefined (reading 'style')
Unigui v1.90.0.1564
-
4 hours ago, Sherzod said:
Another solution:
1.
procedure TMainForm.edtTeklifYuzdeChangeValue(Sender: TObject); begin //UniNumberEdit1.Value := edtTeklifYuzde.Value; //if edtTeklifYuzde.Value < 0 then // UniNumberEdit1.Value := 0 //else // UniNumberEdit1.Value := edtTeklifYuzde.Value; end;
2.
procedure TMainForm.edtTeklifYuzdeChange(Sender: TObject); begin UniNumberEdit1.Value := edtTeklifYuzde.Value; end;
3.
procedure TMainForm.UniFormCreate(Sender: TObject); begin FDMemTable1.Append; FDMemTable1.Edit; with TUniNumberEdit(edtTeklifYuzde) do begin BlankValue := 0; AllowBlank := True; end; end;
Hi @Sherzod
I solved the problem with item 3. Thank you very much.
This error occurred because I couldn't make edtOfferYuzde.BlankValue := 0; These standards should be added to the component specifications. @Farshad Mohajeri
-
-
On 7/6/2018 at 1:24 PM, Sherzod said:
Also you can try this:
procedure TMainForm.UniFormCreate(Sender: TObject); begin UniNumberEdit1.JSInterface.JSAddListener('blur', 'function(me){if (Ext.isEmpty(me.value)) {me.setValue(0)}}'); end;
I am sending you an example.
When you delete all the values in the above component, you will see the value of -1.* If the onchange feature is -1, do not say 0, after all, the user can give a value of -1.
-
-
3 minutes ago, Sherzod said:
Hello,
Sorry, how can we reproduce this?
@Sherzod Hi
Add 1 TUniDBFormattedNumberEdit to the screen and connect any datasource.
The default value is 0. When you delete the 0 value, it becomes -1, so if there is no data on the screen, it becomes -1, I have to make it 0.
-
Is there a way to set the TUniDBFormattedNumberEdit blankvalue?
-
Hi,
The TUniDBFormattedNumberEdit component does not have a property where I can change the blankvalue.
Calculations are wrong because it returns -1 if there is no value in the field.
How do I make the value 0, which is -1 in case of blankvalue, when there is no data?
When there is a blankvalue in the TUniDBFormattedNumberEdit component, it solves this problem by setting it to 0. What is the solution in DB component?
-
1 hour ago, Marlon Nardi said:
Hi @pro_imaj
I was unable to reproduce this problem with UniFSKendoUI version 1.1.2.95.
Can you send me a simple example project? and check this problem for you.
Thank you very much for your attention, I discovered that the problem is in the database structure. This error occurs when decimal in MSSQL. It gets fixed when you make the field type float. This is very interesting.
Since there is a database problem, I cannot send it directly, but this is how I solved the problem for now.
- 1
-
Hello,
I'm not sure this is the exact place of the question, so I apologize for that.
When I send decimal value to UniFSKendoUI object, I get the following error. What is the way to fix this?
Error message: 512.86 is not a valid BCD value.
-
Hi,
There is a UniDBLookupCombobox object inside the Hidden panel on Unigui Grid. I cannot access the information of the selected record with this object. I have been struggling for 3 hours.Methods I have tried.
When I try to get data with UniDBLookupCombobox =>Onselected it shows wrong data.When I try to get data with Unigrid=>SetCellValue, the value that comes with valu does not work for me.
What I want to do.
Being able to get the ID of the selected record with the UniDBLookupCombobox I am not able to do that. -
Merhaba,
Unigui ile veri tabanı yazılımları geliştirmiş (MSSQL). Delphi konusunda deneyimli. Zaman sorunu olmayan, proje bazlı çalışacak arkadaş varsa özelden yazmasını rica ederim.
- 1
-
5 minutes ago, pro_imaj said:
@Hayri ASLAN It worked fine when I used it, thanks.
@Hayri ASLAN When I translate the field type as text, it gets fixed, but when the field type is date on the mssql side, the following error occurs.
QuoteConversion failed when converting date and/or time from character string.
-
7 hours ago, Hayri ASLAN said:
@Hayri ASLAN It worked fine when I used it, thanks.
-
I can't conclude this issue, what is the solution? @Farshad Mohajeri
Using Unigui Rest Full Server
in General
Posted
@Farshad MohajeriCan't unigui be used as the world's standard RestFull server?