logo

Flex: Using A SharedObject to Remember User Settings

Try this:

  1. Open the Contact Manager app.
  2. Change the columns that are visible by using the "column chooser" button, as below:
     image
  3. Quit the browser.
  4. Re-open the browser and visit the app again.
  5. Notice how the visible columns are the same ones as before you closed the browser!

The View component I've been developing recently now uses the Flex equivalent to the cookie - the SharedObject - to remember your choice of columns across sessions.

Note that the same column preferences are shared across all browsers on your PC as the SharedObject is per Flash player install rather than per browser.

For now it won't remember your preferred order of columns (did you know you can drag and drop columns to change the order!?). I'll work on that. The updated demo now remembers the order of your columns! Nor does it remember the width of them. I'll work on that too.

In the mean time here's the updated source code for both the Domino database and the Flex source code. Enjoy. More to come...

...can anybody think of anything else this View component is lacking before I can consider it a universal solution for all your Notes-to-Flex migration tasks?

Comments

    • avatar
    • Patrick L
    • Wed 10 Mar 2010 04:25 AM

    I guess one thing Notes views can do is add up values to give totals and document counts...

  1. Where do I start ;-)

    Paging is a big one - though working on a solution I will share once done.

    Security - both on documents and columns.

    Yes Readers fields will block the actual document appearing but what about the ability to delete / edit? Would rather enable / disable in the Flex app before the server returns the not authorised error.

    Pass the double click event on the datagrid out to Javascript in the holding HTML page - for a hybrid Flex / Domino App the actual form may stay as a Domino page. This means the Grid becomes a component within a Domino application to replace the view(s) but the rest remains the same initially.

    Features which would be nice to have:

    Multi row select / select all, Hyperlink column type (e.g. http & mailto), Thumbnail column type, trashcan to delete (if authorised), individual columns editable.

      • avatar
      • Jake Howlett
      • Wed 10 Mar 2010 05:12 AM

      Wishing I'd never asked now ;-)

      Show the rest of this thread

    • avatar
    • Erik Brooks
    • Wed 10 Mar 2010 06:39 AM

    Cool. Does the Shared Object persist on the browser if the app gets recompiled?

    If it does, I guess you could add a "version" attribute to know whether or not to discard it if it's out of date.

      • avatar
      • Jake Howlett
      • Wed 10 Mar 2010 07:07 AM

      Yes, a re-compiled newer version of the app would still use the same SO.

      Not sure it needs discarding though if it's out of data. Still applies to new versions in this case.

      Show the rest of this thread

    • avatar
    • Frank Westmoreland
    • Wed 10 Mar 2010 06:41 AM

    Hi Jake good stuff... at some point will you be doing a flex address book name picker? That functionality appears to be missing in this app.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Wed 10 Mar 2010

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content