Jump to content

Frega

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Frega's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. I'm much apreciated with your help ASLAN! 1. Some frames I'm experimenting with third party components to test compatibility, So this "InvoiceDetail" is a case where I'm trying to load a 3rdparty datagrid using a UniHTMLFrame inside of the InvoiceDetail Frame... all the client JS script and grid calls are in a html file. procedure TInvoiceDetail.UniFrameCreate(Sender: TObject); begin HTMLFrame1.HTML.Loadfromfile('something.html'); end; procedure TConsultaPedido.HTMLFrame1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName='LoadInvoiceGrid' then LoadInvoiceGrid; //In this procedure I load the Invoice Itens from database and then loop it with TJsonObject to write a JSON and then send to back via unisession.response(json); end; something.html: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <body class="dx-viewport"> <div id="gridContainer"></div> </body> <script> $(function(){ var GetInvoice = function() { result=ajaxRequest(InvoiceDetail.HTMLFrame1,'LoadInvoiceGrid',[],false); //ajaxRequest return JSON.parse(result.responseText); //parse to json to send to the dxDataGrid. } $("#gridContainer").dxDataGrid({ dataSource: GetInvoice(); //This GetInvoice function return a JSON with the grid data that is feed into the grid. ... //rest of the grid config. }); </script> hope you understand the whole context Am I doing it "wrong"? do you have a better way?
  2. Hello! first topic in here, I'm an IT guy on a small business and I have the need to build up a Intranet for our ~10 man team to communicate and load some data from our ERP software, so I'm testing some options, unigui is one of them because Unigui and delphi seems to be extremly productive in comparison to asp.net / php frameworks So let's cut the crap, I've download downloaded the trial and did some homework, here's some of my doubts by now: 1st: I pretend to use Unigui with the UniPageControl/Frames to do some tabs inside the page but some of the frames like let's say "InvoiceDetail" I'll need to open one two or more instances at once, one for each different Invoice. for that test I did this way: procedure NewTab(AFrame : TFrame;ATitle:string;Aid:integer); ... //creation of the TabSheet and other stuffs FCurrentFrame:= TUniFrameClass(AFrame).Create(Self); with FCurrentFrame do begin Name := Name+IntToStr(Aid); Tag := ATag; Align := alClient; Parent := TabSheet; end; end; I Create the FRAME and then I renamed it because I CAN'T have two frames with the same name, so, to overcome this issue I inserted the Invoice ID on the end of the InvoiceDetail, now InvoiceDetail became InvoiceDetail400 InvoiceDetail500 InvoiceDetailN and so on... The problem is that those Frames will need some ajaxRequest to be sent to the sever and on the client side on JS I can't find the correct name of the Frame to send like ajaxRequest(InvoiceDetail400,'EventName',[params]); how do I retrieve the correct frame name? 2nd: I already bought the FontAwesome 5 and it seems that uniGUI uses the free by default. Is there a way to remove the embbeded FA Free so the page won't load this two css's files? (5.0 and 4.7 free). I don't like this kind of mess and waste of resources. 3rd: Is there a complete documentation? (Example: I don't understand, what is UniHTMLFrame.AfterScript , when it runs? after the page is loaded? Is there a documentation about that?) Regards, Frega W.
×
×
  • Create New...