Jump to content

Search the Community

Showing results for tags 'Plain Text'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Hi all, In database is stored html content, which is possible to show Unidbgrid. Fastreports has very limited html support, and is not usable. I have checked also UniGridHtmlExporter, but also not get expected result. Idea is to convert html to plain text and use FR to crete PDF file. Any idea how to get plain text from html? Br, Marko
  2. 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.
×
×
  • Create New...