Flex: Using A SharedObject to Remember User Settings
Try this:
- Open the Contact Manager app.
- Change the columns that are visible by using the "column chooser" button, as below:
- Quit the browser.
- Re-open the browser and visit the app again.
- 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?
I guess one thing Notes views can do is add up values to give totals and document counts...
Reply
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.
Reply
Wishing I'd never asked now ;-)
Reply
Show the rest of this thread
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.
Reply
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.
Reply
Show the rest of this thread
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.
Reply