Jump to content

diego@grv.com.br

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by diego@grv.com.br

  1. Actually by ServerModule's "UniGUIServerModuleHTTPCommand" event I was able to provide static content. But dynamic, which is the case I need I did not get. It's a little tricky to explain, but in my case, the data I'm going to provide is not in the database where my server application are installed. My application is a kind of "bridge" to where the data really is. The data is on my clients' servers (where I use authkey to know who to get the data from). And I do not access the data using a common database connection. I use a messaging traffic component, developed by my company. From what I understand (please correct me if i am wrong) the ServerModule instance is unique to the whole application right? And everything I implement in it I must be aware that it will be shared in every session and I should always perform concurrency validations, right? Anyway, I also could not use "UniGUIServerModuleHTTPCommand" event either. Inside the "UniGUIMainModuleBeforeLogin" container of MainModule, I already have all the necessary validation to establish the connection with the data of the respective user, including the connection component that I use is already available, I do not need to create it and establish the connection in every request (which requires a significant cost). And because the MainModule is per session, it's easy to manage the objects I use to access the data. Since I have no competition between sessions of several different users.
  2. Sorry for the inconvenience, I just settled my account. Thanks for the tip!
  3. Edition of UniGUI? My UniGUI version is "FMSoft uniGUI Complete Professional 1.0.0.1423".
  4. Hello, Can anyone help me? I have a simple application with a login and a main menu form, very usually, but with a particular parameters in the URL, I need to provide a simple, unformatted text content to the respective user's web browser (that text can be a JSon, XML, OData, etc). This URL contains authentication parameters (something like "127.0.0.1:8077/?authkey=700UB7BN3FM1ZMN"). I need to use the "UniGUIMainModuleBeforeLogin" event of the "UniMainModule", to validate this authentication key, determine which user is accessing the data and only if that key/user is validated, select their respective data and generate the plain text in the format that need. What I need is simple: When this URL with parameters are acessed, after the validation on the "UniGUIMainModuleBeforeLogin" event, instead of showing the Main Menu screen, I need that this simple text (which can be a text in the OData, JSon, XML, etc.) return that plain string back to the user's web browser. Attached is an image that shows what I need. My UniGUI version is "FMSoft uniGUI Complete Professional 1.0.0.1423". I have tried the following approach: procedure TUniMainModule.UniGUIMainModuleBeforeLogin(Sender: TObject; var Handled: Boolean); var xAuthKey, xUserInfo, xStrData : string; begin Handled := False; //Try to get authentication info xAuthKey := (Sender as TUniGUISession).UniApplication.Parameters.Values['odata']; if not xAuthKey.IsEmpty then begin //Validate authentication info and gets the user info xUserInfo := GetUserInfo(xAuthKey); if not xUserInfo.IsEmpty then begin //GetStrData returns information of database based on user info //It can be a JSon, a XML or OData, or even, a simple text xStrData := GetStrData(xUserInfo); { Down here i got troubles } TUniGuiSession(Sender).AResponse.ContentType := 'text/plain'; //tried: 'text/plain', 'text/xml', 'application/json', and others TUniGuiSession(Sender).AResponse.ContentText := xStrData; TUniGuiSession(Sender).AResponse.WriteContent; { Up here i got troubles } //Don't show de login form Handled := True; end; end; end; I tried other approach too, but still nothing: procedure TUniMainModule.UniGUIMainModuleBeforeLogin(Sender: TObject; var Handled: Boolean); var xAuthKey, xUserInfo, xStrData : string; begin Handled := False; //Try to get authentication info xAuthKey := (Sender as TUniGUISession).UniApplication.Parameters.Values['odata']; if not xAuthKey.IsEmpty then begin //Validate authentication info and gets de user info xUserInfo := GetUserInfo(xAuthKey); if not xUserInfo.IsEmpty then begin //GetStrData returns information of database based on user data //It can be a JSon, a XML or OData, or even, a simple text xStrData := GetStrData(xUserInfo); { Down here i got troubles } //Here I got a ajax erro message dialog, with the content of xStrData (Even with the ExecCode param True) TUniGuiSession(Sender).SendResponse(xStrData, False); { Up here i got troubles } //Don't show de login form Handled := True; end; end; end; It must be something simple, but I can not do it. I searched a lot in the forums and did not find anything like what I want to do. Thank you in advance.
  5. Hello, I searched all examples, and there are a lot of cool stuff, and there are some that have the creation of components at runtime, this makes me much more comfortable deciding to use uniGUI. But on the issue of graphics, which are essential for my business, I still have not found anything about the dynamic creation of series. In all examples the series are created at development time. If you can kindly put a snippet of code showing me how to create the series in runtime, I would be very grateful. Looking more calmly, another question arose that I could not explain through the examples: Can I differentiate the number of series of a chart through a single column of my table? For example, I have a column named "Status", where the values ​​can be only 3 types: "Started", "Waiting" and "Finished". Following the example, would I be able to make the graph recognize these values ​​and create the series automatically according to the status field available in my query? I put an attached image to make it easier to understand my question (in summary, I have a table with records and would like to display this table in a unigui chart, as in the chart shown in the image). I thank you for your attention.
  6. Hello, Thanks for the quick response I'm just researching, I have not downloaded or installed any version of UniGUI yet. But from what I've seen in the forum topics, creating series in the graphics at runtime seems to be a problem, and this is a prerequisite for me to decide which web-development tool I'm going to use. From what I have seen in the examples so far, all that is missing is the dynamic creation of components. Other than that the uniGUI seems to meet 100% my expectations.
  7. Hello, I would like to know how to create "series" within the "TUniChart" component at run-time. I searched and found several links related to the subject: http://forums.unigui.com/index.php?/topic/9065-create-cahrt-series-at-runtime/?hl=chart http://forums.unigui.com/index.php?/topic/7578-chart-dynamic-series/?hl=chart http://forums.unigui.com/index.php?/topic/3567-dynamic-series-in-tunichart/?hl=chart&do=findComment&comment=38665 http://forums.unigui.com/index.php?/topic/6180-add-dynamic-series-to-unichart/?hl=chart http://forums.unigui.com/index.php?/topic/3567-dynamic-series-in-tunichart/ http://forums.unigui.com/index.php?/topic/9377-pie-chart-2-series-created-at-runtime-with-same-datasource-help/?hl=chart But none of them has a definitive answer. Is it possible to create series within a graphic at runtime or not? If so, how is it done, in a way that works? Please, post a sample. Thanks
×
×
  • Create New...