Introducing – with Flexicious 2.9 – the most requested feature yet – ability to create, manage, and persist multiple preferences. Many of you use the Flexicious product in a reporting capacity. The built in preference persistence mechanism allows you to store a particular “view” of the grid for later retrieval. For instance, the grid currently allows you to store filter criteria, column widths, visibilities, order, footer visibility, and even scroll positions! All of this, now multiplied. Just set the newly added “enableMultiplePreferences” flag to true, and you can allow your users to store as many preferences as they wish. Just a small caveat: make sure you set the useCompactPreferences to true, because with the older XML based approach the strings to persist tend to get rather large.

  • The first thing you will see when you turn this feature on by setting enableMultiplePreferences=true is an additional button as shown below

 

  • The other change will be the Save Preferences Dialog will now allow you to specify a name for this saved preference:

 

  • Third, you will see that when you click the open preferences button, where you can open and apply any of your previously saved preferences, you will see the following UI:


This popup is newly introduces in 2.9, since there is now a need to name the saved preferences, delete them, rename them, etc. As always you can fully customize the UI to manage preferences. Attached are the default dialogs.

SaveSettingsPopup.mxml (4.56 kb)  ||  OpenSettingsPopup.mxml (3.95 kb)


There are new properties added to Ultimate to specify which dialog is to be used for each of these operations:

popupFactoryOpenSettingsPopup : IFactory

  • The renderer that shows up when the user clicks on the Open Settings button - currently only supported in Ultimate

popupFactorySaveSettingsPopup : IFactory

  • The renderer that shows up when the user clicks on the Save Settings button - currently only supported in Ultimate

popupFactorySettingsPopup : IFactory

  • The renderer that shows up when the user clicks on the Settings button - currently only supported in Ultimate

While we are at it, new properties for customizing the print and export popups as well, but those are not related to these changes.

popupFactoryExportOptions : IFactory

  • The renderer that shows up when the user clicks on the Word or Excel button - currently only supported in Ultimate

popupFactoryPrintOptions : IFactory

  • The renderer that shows up when the user clicks on the Print or PDF button - currently only supported in Ultimate

Also, since for Classic Customers, the pager bar is not built into the library (unlike for Ultimate where it is), the Custom Pager Control that you can use for your projects is below:

CustomPagerControl.mxml (8.62 kb)


A couple additional properties were added to combat a few very common issues. First – currently, the grid will load the preferences on creation complete. Many times, these preferences include filter criteria. Often times, this filter criteria is selected values within multi select comboboxes. Most times, these comboboxes are built dynamically from the data provider, buy leveraging the filterComboBoxBuildFromDataProvider property. What happens in this case, is that the load preferences loads up the preferences and attempts to set the selected values on these comboboxes, while the dataprovider has not yet loaded. So the filter comboboxes do not have any data. Consequently, the values are discarded as invalid, because they don’t match anything in the dataprovider. To combat this scenario, there is a new flag, that instructs the grid to not load the preferences on creation complete, rather, we will call the load preferences method manually when we know that the dataprovider has been set. This gives client code an opportunity to populate the dataprovider, thereby populating the filter comboboxes, and then load preferences. The code will look like this:

<grid:FlexDataGrid autoLoadPreferences=”false” …/>

And then, when you set the dataprovider:

dgReport.dataProvider=groupedByDept;

                        if(!dgReport.preferencesLoaded){

                              dgReport.loadPreferences();

                         }