Alpha Video Training
Results 1 to 3 of 3

Thread: V11 Dialog - Automatically save and restore state information best practice question.

  1. #1
    Member
    Real Name
    Dion McCormick
    Join Date
    Jun 2011
    Location
    Austin Texas
    Posts
    124

    Default V11 Dialog - Automatically save and restore state information best practice question.

    I have a simple application. Two A5W pages with a dialog component in each of them. I fill out some data on the first page and then move to the second page. I use a session object to transfer elements to the second page. When I hit the back button on the browser, it goes to the first page, but the dialog component is refreshed to the default state (vs have the last state when the user was on that page.). I have thought of a couple of ways to handle it, but I wanted to get feedback from the group on the best practices.

    1) I could have two pages with a dialog on each one. Then I would put the code in the initialize event to restore the state from a session dialog.
    2) I could have both dialogs on the same page and then have some glue code that hides/displays the dialog depending on the status. I would have to write some code in the dialogs to call the page which would then control visibility.
    3) I could have a single dialog with two containers for the two "pages". And use the logic in the dialog to hide/display containers. (Simplest of the bunch...but I have concerns)

    NOTE: Both pages are fairly complex so one of my key concerns is download/load time for each of the pages. And....with a ton of components on a single page (from dual dialogs on a single page) I don't want to trigger strange problems with the browsers.

    So.....

    1) Is there a simple way to store and then restore the state of a dialog component without having to right a lot of logic (i.e. I don't have to get a session variable and then update all of the controls on the dialog to set them to the original state.)
    2) If I go the two dialogs on one page, do I run the risk of long load times and/or performance issues because of the large set of components on a single page? Also, how would I structure the code to trigger the
    3) Ditto for two big containers in one dialog, long load times/performance issues?

    I know this one is a bit long...but will help me establish best practices for coding my web applications going forward. Thanks in advance.

  2. #2
    Member MichaelCarroll's Avatar
    Real Name
    Michael Carroll
    Join Date
    Feb 2008
    Posts
    467

    Default Re: V11 Dialog - Automatically save and restore state information best practice quest

    What are you trying to achieve -- i.e. what is the business logic?

    Michael Carroll

  3. #3
    Member
    Real Name
    Dion McCormick
    Join Date
    Jun 2011
    Location
    Austin Texas
    Posts
    124

    Default Re: V11 Dialog - Automatically save and restore state information best practice quest

    Thanks Michael.

    The first page collects a bunch of data from the user. It then stores that data in a class, does some internal calculations and then puts that into a session variable. The second page then takes the object from the session variable, updates some online controls and then lets the user continue to do some other data collection activites that update the object.

    The key question is do I need to write the update/initialization code on the first page if the user uses the browser back button to navigate back to that page it looks the same as when they left it, or is there a simpler/better way where the dialog re-initializes the controls. The less code I write the better!

Similar Threads

  1. Replies: 1
    Last Post: 09-14-2011, 10:40 AM
  2. New in v11 Dialog component
    By Richard Rabins in forum Announcements
    Replies: 1
    Last Post: 09-02-2011, 04:26 PM
  3. Any information about when v11 wil become available?
    By frankbicknell in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 06-22-2011, 07:54 PM
  4. Bug in Restore Database Dialog Box?
    By Mike Vance in forum Alpha Five Version 7
    Replies: 2
    Last Post: 02-02-2006, 03:39 AM
  5. Can't restore Zip files automatically
    By gwesley2000 in forum Alpha Five Version 5
    Replies: 9
    Last Post: 12-14-2002, 02:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •