Topic
7 replies Latest Post - ‏2012-05-16T18:42:19Z by dan_darnell
JBASkeen
JBASkeen
129 Posts
ACCEPTED ANSWER

Pinned topic Moving from one RUI handler to another

‏2012-05-07T13:18:08Z |
RBD v8.0.1.2
EGL RUI

I am trying to figure out how to move from one RUI handler to another. I have to RUIhandler files with handlers defined in each.
ruiHandler1.egl -> ruiHandler2.egl

When I hit a certain point in my logic in ruiHandler1.egl I want to transfer/open ruiHandler2.egl. Is this possible? I don't need to pass data between them, I just want to display the next RUI "page." I have seen that infobus handles communications between handlers, but how do I start in one handler and then display another? Is InfoBus the only way to do this?

Any help or advice is greatly appreciated.

Thanks,

James
Updated on 2012-05-16T18:42:19Z at 2012-05-16T18:42:19Z by dan_darnell
  • clogs
    clogs
    186 Posts
    ACCEPTED ANSWER

    Re: Moving from one RUI handler to another

    ‏2012-05-07T13:31:14Z  in response to JBASkeen
    James,

    There is no such thing as moving from one page to another (like with JSF). What you need to do is change the children of the page you are on (and which you are "leaving"), by the children of the second page (the page you are "moving" to). You may also want to look at EGL's Dynamic Loader feature. With this feature you can load handlers as needed, limiting the size of the original HTML file which forms your RUI application.

    Also, consider upgrading to 8.0.1.3. There are loads of bug fixes in that release.

    Regards,
    Willem.
  • clogs
    clogs
    186 Posts
    ACCEPTED ANSWER

    Re: Moving from one RUI handler to another

    ‏2012-05-07T14:02:04Z  in response to JBASkeen
    James,

    Here is a tiny test project that shows what I mean (PageOne and PageTwo are implemented as RUIwidget, rather than as handler).
    This project has been constructed using RBD 8.0.1.3.
    Just run MainPage (which is a handler) and click the button.

    Regards,
    Willem.
  • JBASkeen
    JBASkeen
    129 Posts
    ACCEPTED ANSWER

    Re: Moving from one RUI handler to another

    ‏2012-05-08T14:42:18Z  in response to JBASkeen
    Willem,

    Thanks a lot for your response and effort to show me an example of what you mentioned, it was extremely helpful. I am currently trying to piece this all together, I also thought that it was interesting that the additional pages can be declared as widgets, pretty cool. There is so much capability built into EGL/RBD, I wish I could be aware of it all. :)

    Thanks again,

    James
    • clogs
      clogs
      186 Posts
      ACCEPTED ANSWER

      Re: Moving from one RUI handler to another

      ‏2012-05-08T18:45:30Z  in response to JBASkeen
      Hi James,

      You're most welcome. The forum is always a good place for looking at new insights into the product's capabilities. If you have more questions, just post them, everyone is here to help.

      Good luck,
      Willem.
      • SystemAdmin
        SystemAdmin
        6195 Posts
        ACCEPTED ANSWER

        Re: Moving from one RUI handler to another

        ‏2012-05-16T07:10:43Z  in response to clogs
        Hi Willem,

        I have a question that's semi-related to this topic. I made a login screen (that could be a Page 1 from your example) and a work screen that's used for performing certain tasks (this one would be Page 2).
        So user authenticates her/himself on Page 1 and is successful Page 1 is removed from the Main Page and Page 2 is added. Problem occurs if user tries to refresh the browser session while on Page 2. This causes the session to reset and users gets logged out and sent back to the login screen.
        The closest thing to a solution is using history and onBeforeUnload to warn user that if the page is refreshed log out will occur. So I wanted to ask if there is a way to remain on the same page after refreshing the browser session.

        Thank you
        • dan_darnell
          dan_darnell
          917 Posts
          ACCEPTED ANSWER

          Re: Moving from one RUI handler to another

          ‏2012-05-16T18:42:19Z  in response to SystemAdmin
          Hi Petar,

          With a rich client interface, when the user hits the browser refresh button it reloads the JavaScript that makes up the client. You could probably push some information into a cookie or something and then look for that information when the application starts. You could use this information to determine the login status of the user and where they were before they hit refresh. If you look at a rich client app such as Google Mail -- it appears to do something like that.

          That said, I think you are spot on with the notion of just warning the user of the consequences of their "refresh" action. Ultimately, it's a matter of how much time/effort/money you want/need to put into this particular application and your goals for the user experience.

          --Dan