Jump to content

zilav

uniGUI Subscriber
  • Posts

    573
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by zilav

  1. First, don't use direct queries especially in SQL Server. Create stored procedure with filtering parameters, your Delphi client will be calling it exec sp_proc1 :PRO_RAZAO_SOCIAL, :LOG_UF, :LOG_CIDADE Test in Manager Studio with some parameters and make sure it returns data, then pass the same params from Delphi. Your issue is probably caused by wrong parameters you are trying to filter with, not because of UniGui. Since you are using LIKE, maybe you forgot to prepend or append % depeding on how you want to match the data.
  2. Start UniTimer after opening dataset with 10ms delay which will do Locate. But yes, it is an ungly workaround. Would like UniGui to work properly with Locate in grouped grids too.
  3. zilav

    Design question

    Always do fullscreen in mfPage mode. World is moving to 4k resolutions and your 2/3 design makes no sense, on 4k display your grid will become large anyway.
  4. 1. That's my exact approach. All logic is performed in stored procedures on server including verification of input parameters (user's input), UniGUI app is just an empty UI shell calling stored procs and catching returned exceptions to show error messages to the users, it doesn't have a single SQL request. Since UniGUI is stateful and you can't update your code without restarting it and thus interrupting work of all currently connected users, this is the best approach as it allows a lot of flexibility and seemless updating just by working with DB server. 2. "Client memory" doesn't exist in UniGUI, all sessions and data are stored in the server's memory and web browser is simply a canvas to display the current state like RDP. MainModule is per session (user), dynamically created when each user connects and destroyed when disconnects. ServerModule is a single instance created when you launch UniGUI app. Never put your data on ServerModule or you'll have concurrency issues.
  5. It all depends on the architecture of your application. If you can restore state using URL parameters on start, then the delphidude's method is preferable since it doesn't keep Uni session open and frees server resources.
  6. This will create a new session which is undesirable I think in this case. I guess the best approach is to get the current SessionID, forge an URL with it and start external web serivce in UniURLFrame passing URL as a parameter I guess (not mentioned how URL is supposed to be passed). At that point put your app in a waiting state and start UniTimer to check some variable in MainModule of the current session. Meanwhile in ServerModule.OnHTTPCommand process the incoming requests, iterate over the sessions list and find your session by provided SessionID in URL, and set variable your UniTimer is waiting for.
  7. You must use UniHTMLFrame instead, then you can call ajaxRequest() to access UniGUI app.
  8. You can from HTMLFrame since it exists per session, but which session you are trying to access from within URLFrame which is essentially an external web page not connected to uniGui at all?
  9. Sessions are stored on the server in memory including UniGUI's data and data of your application, so yes, it will disconnect all users.
  10. Why do you SetLength(HighlightDates, 0) in destroy event? Aren't arrays are ref counted in Delphi or I'm missing something?
  11. Implement checks on server of what is being uploaded. If someone wants to hack you, they'll find out parameters and URIs one way or the other.
  12. zilav

    ISAPI hot update

    Sessions are stored in the RAM, you can't preserve them.
  13. Call "ajaxRequest()" in onclick event of href and handle passed event <a href='#' onclick="ajaxRequest(MainForm.form, 'linkclick', ['param=value']);">Click me!</a> This code should be located inside TUniHTMLFrame to work.
  14. zilav

    browser lang

    Pass selected language as URL parameter.
  15. I use this simple approach for custom events In JS code MainForm.form.showMask('Loading...'); ajaxRequest(...); In ajax event try ... finally UniSession.AddJS('MainForm.form.hideMask();'); end;
  16. Drop TUniHTMLFrame with <img> html tag inside pointing to your image. Honestly I don't see any point in TUniImage component at all. It was probably added for easier migration of existing Delphi projects I guess. For new projects just use ordinary html, much fore flexibility.
  17. The generic usage of 3rd party js libs is following: 1) Add js file(s) into ServerModule.CustomFiles 2) Use UniSession.AddJS() to execute javascript code from within uni events I don't see any reason why whis particular lib won't work this way.
  18. UniGUI is stateful where state is stored and managed on server, you can't work in offline mode.
  19. Enable mask in UnIEdit, set UniEdit.CharEOL to #13, use OnKeyPress event
  20. zilav

    long process

    Check this one for example http://forums.unigui.com/index.php?/topic/1479-progressbar-multithreading-demo/
  21. zilav

    long process

    1) Increare AjaxTimeout in ServerModule 2) Run in thread and poll progress updates with UniTimer
  22. I just base64 encode/decode all string values in cookies unless they are numbers.
×
×
  • Create New...