Jump to content

New user questions.


Recommended Posts

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
          Name                := Name+IntToStr(Aid);
          Tag                 := ATag;
          Align               := alClient;
          Parent              := TabSheet;


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?)




Frega W.

Link to comment
Share on other sites

9 hours ago, Hayri ASLAN said:

1- How you adding client side events? 

2- We need to add this functionality. For now you can delete font-awesome folder in "C:\Program Files (x86)\FMSoft\Framework\uniGUI\ext-6.7.0\build\packages"


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);

procedure TConsultaPedido.HTMLFrame1AjaxEvent(Sender: TComponent;
  EventName: string; Params: TUniStrings);
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);



<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <body class="dx-viewport">
   <div id="gridContainer"></div>
   var GetInvoice = function() {
      result=ajaxRequest(InvoiceDetail.HTMLFrame1,'LoadInvoiceGrid',[],false);  //ajaxRequest
      return JSON.parse(result.responseText);    //parse to json to send to the dxDataGrid.
        dataSource: GetInvoice();  //This GetInvoice function return a JSON with the grid data that is feed into the grid.
    //rest of the grid config.

hope you understand the whole context

Am I doing it "wrong"? do you have a better way?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...