Flexicious-29-Released!!

clock November 10, 2012 05:13 by author Administrator

For those of you who’ve been watching our blog, you’d probably realize that we’ve been rather quiet over the past couple months. That almost always means that we’re in heads down coding mode. And 2.9 will show it. First and foremost, this is the first of a series of blog posts that describe what is included in 2.9. Since there is a lot to cover, we’ve decided to break down the major pieces of functionality into their own respective blog posts. In addition to a number of newly added features, there are as usual, the bug fixes, enhancements to existing features, as well as newly added features other than the ones that we’ve dedicated individual blog posts to.

We’re making a request. If you are an existing customer who has let their subscription lapse, PLEASE renew it. All our work is of no use if we are not able to get it to you. We have very reasonable renewal fees, and the value you get in terms of updates, bug fixes, new features, performance improvements, as well as personalized support is immense. There have been a number of instances where customers have come to us with support requests that are time critical, and we are not able to assist because the subscription to support and updates has expired, because they chose not to or delayed renewal. We want your experience with our products and our service to be nothing short of spectacular, and we need your commitment to be able to do that.

That said, please find below, the usual list of enhancements, bug fixes and new features:

  • New Feature, All Grids, Multiple Preferences:  This feature is covered in detail in this blog post: . The following properties were added to enable this:
    • enableMultiplePreferences : A Flag that will enable multiple named versions of preferences to be persisted. This is new functionality introduced in v2.9.
    • New method: get/setGridPreferencesInfo :When enableMultiplePreferences = true, this represents a list of all preferences saved for this grid.
    • autoLoadPreferences : By default, when the grid's creation complete event is dispatched, the grid will go in and load the saved preference. This works well in most cases, but in some cases, where the data needed to build seleciton comboboxes (for filters) is built from the dataprovider, it makes sense to wait until the dataprovider is loaded to parse and set the preferences, otherwise the grid will end up ignoring saved preferences for filters that have dropdown based UI. In this case set autoLoadPreferences to true, and manually call loadPreferences when the data is recevied from the server and the dataprovider is set.
    • New Class, GridPreferencesInfo : Class added in 2.9 to support multiple preferences. Each IPersistable has a gridpreferences object, that contains an array of PreferenceInfo objects
    • New Class, PreferenceInfo : Class added in 2.9 to support multiple preferences. Store information about the name of the preference, whether or not it is a system preference (which cannot be deleted), and the preference string associated with this name.
  • New Feature, All Grids, Asynchronous Printing: This feature is covered in detail in this blog post. The following properties were added to enable this:
    • pdfPrinter : A class that pulls in a PDF library (like AlivePDF) and spits out the PDF bytes to it. We purposely do not include a concrete implementation in the core library code so that there are no dependencies on a specific PDF library and you can plug in your own. The sample project includes an example of using AlivePDF. A class that takes the PDF Pages as they are generated. This functionality was introduced in 2.9 to provide a responsive UI during the generation of the PDF. Previously, the print controller created image snapshots in memory, and handed them all to the pdf engine, which processed them individually by adding them to the display tree in one go. Instead, now, the step of the snapshot itself adds the image to the pdf doc and this whole thing runs inside a timer so the UI has an opportunity to update itself. First, you specify a class that implements IPDFPrinter as the pdfPrinter property. The AlivePdfPrinter is a sample implementation of IPDFPrinter. This class should expose the methods defined in the IPDFPrinter which are used as such: The beginDocument method is called when the Print controller is ready to send out the pages. For each page generated by the Print Controller, the addPage method is called. Once all pages are added to the doc, the endDocument method is called.
    • PrintOptions, asynch : Flag to enable asynchronous processing of the print results. If you set this to true, the pages are processed in timer events, giving the application an opportunity to show progress and prevent timeouts. Asynch can only work if you specify the preview flag, because the print then shows the progress in the preview window, and uses the preview window as a parent container.
    • PrintOptions, asynchDelayCapture : Flag to wait for the grid to completely render prior to capturing a snapshot for printing. The way the print works, is that it renders each page of the grid takes a snapshot and adds it to the print object to be spooled to the printer. Same concept applies to pdf where instead of adding to the print object the snapshot is converted to an image and added to the pdf bytestream. This does not work well in scenarios where you have external images that are loaded by url as opposed to using embedded assets. In scenarios like these you may need to add a delay to the printing mechanism to ensure that enough time is available for the external images to load. This flag, in combination with the asynchTimeInterval lets you control the amount of time that the print mechanism will wait after the grid is rendered to capture the snapshot.
    • PrintOptions, asynchTimeInterval : The time interval, in milliseconds, used by the timer of the execute() method to iteratively process pages. You can set it to a higher value if you want to wait for longer before the next page is processed. This is used in cases where you are loading external images in your item renderers. Please make sure you also set asynchDelayCapture to true in this scenario. The default value is 1, which allows enough time for the UI to update itself to show the end user a progress bar and also prevents timeouts while printing or exporting to pdf a large number of pages.
  • Enhancement/Bug Fix, All products:  Module support within popup windows. More details about this are included in this blog post The following properties were added to support this:
    • useModuleFactory : Flag that indicates to use the module factory of the grid to show popups. Use this when you are using modules and your parent application is not under your control. Please note, you will still need to ensure that the parent application imports PopupManager. http://bugs.adobe.com/jira/browse/SDK-873
  • Enhancement, All Products:  Ability to associate custom data with preference persistence. The PreferencePersistenceEvent now has a “customData” property that will piggy back along with the default persistence properties for preference persistence.
  • Enhancement, All Grids:  Added the new useExcelExporter flag along with the new ExcelExporter which provide HTML based excel export. Not only does this create a .xls document as opposed to .csv document, but also it handles non ASCII characters better than the stock CsvExporter. Example here: HTMLExcelExporter.mxml (2.45 kb)
  • Enhancement, All Grids:  Added two new events beforeExport and afterExport which let you fully customize the exported output.
  • Enhancement, All Grids:  Ability to define the behavior of hidden columns when you do print or export. The following new properties were added to PrintExportOptions support this functionality:
    • hideHiddenColumns : A flag that will hide any columns that are not visible from being printed or exported by default. User can still go into column picker and include these columns. To disable the user from printing or exporting invisible columns altogether, please use the excludeHiddenColumns instead. Please note, when you set this flag, the columnsToPrint will get overwritten, so any changes you make to that array will be ignored.
    • excludeHiddenColumns : A flag that will disable the user from printing or exporting invisible columns altogether . User cannot go into column picker and include these columns. To hide any columns that are not visible from being printed or exported by default, please use the hideHiddenColumns instead.
    • For Ultimate, the following properties were added:
        • printOptions : The Print options object that is used to configure the print behavior - currently only supported in Ultimate.
        • pdfOptions: The Print options object that is used to configure the pdf behavior - currently only supported in Ultimate.
        • wordOptions: The Export options object that is used to configure the word export behavior - currently only supported in Ultimate.
        • excelOptions: The Export options object that is used to configure the excel export behavior - currently only supported in Ultimate.
    • For all the above properties, you can set the defaults for the hideHiddenColumns and the excludeHiddenColumns on basis of your needs. For example:

public class YourDataGrid extends FlexDataGrid

          {

                   public function YourDataGrid()

                   {

                             super();

                   addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplate);                                 

                   }

 

                   protected function onCreationComplate(event:FlexEvent):void

                   {

                             printOptions.hideHiddenColumns=true;

                             pdfOptions.hideHiddenColumns=true;

                             excelOptions.hideHiddenColumns=true;

                             wordOptions.hideHiddenColumns=true;

                             pdfPrinter = new AlivePdfPrinter;

                   }

}

OR

                             <nestedtreedatagrid:FlexDataGrid id="grid"  creationComplete="grid.printOptions.hideHiddenColumns=true; grid.pdfOptions.hideHiddenColumns=true;"


  • Enhancement/BugFix, MultiSelectCombobox:  Added the useModuleFactory style property for better support within modular applications.
  • Enhancement, MultiSelectCombobox:  Full KeyBoard support, including Arrow Keys, Space based selection, tab keys.
  • Enhancement , Combobox:  Added the “rowHeight” property to specify a custom row height for the dropdown items. Fixed bug with the addAllItem flag is set to true, and the combobox is rebuilt, the first non-All item is selected by default.
  • Enhancement, DateCombobox:Added support to display the actual date chosen when user chooses “Custom” date range.

 

  • Bug Fix, MultiSelectComboBox:When the addAllItem flag is set to true, and the MSCB is rebuild, the first non-All item is selected by default.

  • Enhancement, Ultimate:  Convenience properties to quickly override the default popups for print/export/change/persist/manage settings. The following properties were added to support this:
    • popupFactoryExportOptions : The renderer that shows up when the user clicks on the Word or Excel button - currently only supported in Ultimate
    • popupFactoryOpenSettingsPopup : The renderer that shows up when the user clicks on the Open Settings button - currently only supported in Ultimate
    • popupFactoryPrintOptions : The renderer that shows up when the user clicks on the Print or PDF button - currently only supported in Ultimate
    • popupFactorySaveSettingsPopup : The renderer that shows up when the user clicks on the Save Settings button - currently only supported in Ultimate
    • popupFactorySettingsPopup : The renderer that shows up when the user clicks on the Settings button - currently only supported in Ultimate
  • Enhancement, Ultimate:  Added the new OLAPFlexDataGrid, an extension to Ultimate that supports OLAP Queries. More details here.
  • Enhancement, Ultimate:  Much better and faster mechanism for drawing filler cells. The new default for enableFillerRows is true. This means that when there is not enough data to fill the entire height of the grid, blank rows will be drawn to fill up the space.
  • Enhancement, Ultimate:  Variable Header Row Heights. When you set “variableHeaderRowHeight” to true, and specify headerWordWrap to true for one of the columns, the grid will automatically size the header so that the header text is fully visible.
  • Enhancement, Ultimate:  Numerous documentation updates.
  • Enhancement, Ultimate:  Column Drag and Drop can be dropped on both sides of the target column, based on where you take your mouse.
  • Enhancement, Ultimate:  Numerous performance enhancements.
  • Enhancement, Ultimate:  Ability to specify which column is the collapse state column in a column group. Previously, this defaulted to the first column and could not be changed. Added collapseStateColumn and userLastColumnAsCollapseStateColumn to control this behavior.
  • Enhancement, Ultimate:  Default the Pager Control to the optimized PagerControlAS when enableDataCellOptimization to true.
  • Bug Fix, Ultimate:  Removed Flicker of the entire application when a Flexicious Ultimate Grid is added to the stage.
  • Bug Fix, Ultimate:  When columnWidthMode=fixed, user could not resize the column.
  • Bug Fix, Ultimate:  In certain scenarios, multiple change events were dispatched in response to a single user action.
  • Bug Fix, Ultimate:  Printing in a number of scenarios caused rows to be cut off or rows to be skipped over altogether.
  • Bug Fix, Ultimate:  In certain scenarios, the filtering caused items with children to no longer have the expand collapse icon.
  • Bug Fix, Ultimate:  In certain scenarios, the pager was no longer drawn.
  • Bug Fix, Ultimate:  If you have rowSpan, and the grid has scrolled down, and you change the data provider, the top of the grid is no longer drawn.
  • Bug Fix, Ultimate: If you set recalculateSeedOnEachScroll=true, and there is no data to display, null pointer.
  • Bug Fix, Ultimate: fitToContent did not take into account headerText when dataProvider.length=0.
  • Bug Fix, Ultimate: Scenarios where there was a large gap to scroll over while in edit mode caused a null pointer.
  • Bug Fix, Ultimate: Editable cells did not respect row spans and col spans.
  • Bug Fix, Ultimate: Show Hide footer when footer was above the body caused blank areas.
  • Bug Fix, Ultimate: Inner level sort did not work for XML List Collections.
  • Bug Fix, Ultimate: Fixed NPE when tabbing over a large area to get to the next editable cell.
  • Bug Fix, Ultimate: The dynamicLevelCreated event was not being dispatched in certain scenarios.

  • Enhancement, Dashboard: Task bar & Tiny Charts
  • Enhancement, Dashboard: 20% Improvement in rendering performance.
  • Enhancement, Dashboard: Added ability to embed tiny charts within datagrids (or other list based controls)
  • Enhancement, Dashboard: Animation for close, minimize and open transitions.
  • Enhancement, Dashboard: Added the dashboard task bar, and support for minimize operation.
  • Enhancement, Dashboard: Added support for 3D chart renderering for column and bar tiny charts.
  • Enhancement, Dashboard: Added new component: ExtendedTitleWindow - Extend the Spark TitleWindow to add support for maximize, restore, maximize on double click. resize, and close button.
  • Bug Fix, Dashboard: Preference persistence for dashlets did not work in certain scenarios.
  • Bug Fix, Dashboard: Printing for maximized dashlets did not work.
  • Bug Fix, Dashboard: Resizing the tiny charts did not re-render the chart in certain scenarios.

 

  • Bug Fix, Spark: Fix for grids with horizontal scroll on, filtering caused filters out of the view port to loose filtered state.

 



Modules, Ultimate, Styles, Popups and CheckBoxes- 2.9

clock November 10, 2012 04:49 by author Administrator

So this has been an interesting set of issues that has come up with a number of our customers. It revolves around using any of the Flexicious products in an application that uses Modules. Basically, when you use a module that references flexicious products where the top level application does not import the product in question, a couple of issues crop up. The fix that we’ve provided that works with consistently with every version of the SDK is this : Just import a blank copy of <flxs:FlexDataGrid/> in your top level application. This works for every scenario, works in every version of the SDK, and is usually enough to resolve the issue for 98% of our customers. However, there is always that 2% that it did not work for, because they did not control the top level application. So in this case, the resolution is a little nuanced. However, the resolution will provide a cleaner work around for all customers, so we’re going to go over the issues and the resolution approach in this blog post.

The first issue goes something like this:

When you use Flexicious Ultimate in a module with a “dumb” loader application, the first issue you will encounter is this:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:433]

          at mx.managers::PopUpManager$/addPopUp()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\PopUpManager.as:193]

This is unfortunately a blocker, because the top level application MUST import the PopupManager and force link it as such:

import mx.managers.PopUpManager; PopUpManager; // force link

There are a number of links that go further into explaining what is going on here, so all we’re going to cover here is that to resolve this issue, just force link the popup manager in the top level application as described above.

https://bugs.adobe.com/jira/browse/SDK-873

https://bugs.adobe.com/jira/browse/SDK-16474

http://forums.adobe.com/message/3448443

The second related issue is when the popup manager IS linked, but the grid throws this error:

TypeError: Error #1010: A term is undefined and has no properties.

              at com.flexicious.nestedtreedatagrid.cells::CellUtils$/getBackgroundColors()[C:\Code\Flexicious\NestedTreeDataGrid\NestedTreeDataGrid\src\com\ flexicious\nestedtreedatagrid\cells\CellUtils.as:257]

          at com.flexicious.nestedtreedatagrid.cells::FlexDataGridDataCell3/getBackgroundColors()[C:\Code\Flexicious\NestedTreeDataGrid\NestedTreeDataGrid\src\com\ flexicious\nestedtreedatagrid\cells\FlexDataGridDataCell3.as:452]

Another related issue is with CheckBoxes looking like buttons.


 

The issues are both related to each other. The fundamental problem is this:

When you load Flexicious products in the module, the styles associated with it are loaded using the style manager of the module itself. However, when you load it in a popup window, the Style Manager, used by default is the style manager of the top level application, which obviously does not contain the Flexicious styles. Fortunately, in Flex 4 onwards, Adobe recognized this problem and provided an overload to the add popup method that allows you to specify the module factory to associate with the popup. So the resolution is simple, specify the module factory of the module, and you are all set. This is of-course, assuming that you are on Flex 4. Unfortunately, if you are *still* on Flex 3, the only known resolution to this issue is to add the blank Flexicious component to the top level application. For Flex 4, however, we have added mechanisms that allow you to control the module factory. Now that said, there are 2 ways in which you can end up with Flexicious controls in a popup:

1)    When you launch popups yourself. If you do this, make sure that you pass in the module factory of the module in the add popup call. As an example:

  •                              <mx:Button label="Load this in popup" click="PopUpManager.addPopUp(new popup,FlexGlobals.topLevelApplication as DisplayObjectContainer,false,null,this.moduleFactory)"/>

2)    When you use Flexicious functionality that uses popups. There are a few such known places:

  • The Print/Export/Settings popups: Define a global style for the MSCB as such within your module:

@namespace nestedtreedatagrid "com.flexicious.nestedtreedatagrid.*";

            nestedtreedatagrid|FlexDataGrid{

                  useModuleFactory:true;

                                                   }

  • The MultiSelectCombobox: Define a global style for the MSCB as such within your module:

<mx:Style>

                   @namespace controls "com.flexicious.controls.*";

                   controls|MultiSelectComboBox{

                             useModuleFactory:true;

                   }

          </mx:Style>

That’s it! Once you do this, the popups will load fine, the errors will go away, and the funky look and feel you see with checkboxes showing up as buttons will go away as well.

Below are a couple of files that demonstrates the workaround above.

parent.mxml (911.00 bytes)

ModuleTest.mxml (831.00 bytes)


 



Dashboard’s getting a bow tie!- 2.9

clock November 10, 2012 04:06 by author Flexicious

The first big thing you will notice about our dashboard framework – Performance.

Before:

Screen Load | Average

949:949

905:927

1055:969.66

1080:997.25

After:

Screen Load | Average

726:726

726:726

851:767.66

864:791.75

Note : Timings running in debug mode. Release mode timings are MUCH faster, approx 1/3rd of this. Second, vast majority of time is consumed by the heavy Flex 3 Charts that are in the dashlets.

We’ve managed to shave off a good 20% off the load time for each of the screens. Now, note that these are debug mode timings – release mode timings are MUCH faster. Also, most of the time above is spent rendering the heavy Flex Chart components. We’ve found that using too many of these on a screen can kill performance, the core dashboard shells are now VERY light weight.

Second, the recently announced Tiny Charts have been a hit so far with our customers. Officially a part of 2.9, they were too good to hold back until the 2.9 release, so we’ve been shipping them for a while now. Now, with the 2.9 release, these will be made compatible with IListItemRenderer so you can use them inside data grids. These differ from the stock Flex Charts significantly in that they are VERY light weight. This is a key feature. These controls are a prime fit where the much heavier, slower stock Flex components are not a good fit.

A screen shot of how crazy you can go with this below (Warning: Do not try this at home with the stock flex components Laughing ):

TinyCharts have been shipping for a while now, and being used by a number of our customers. We’re going to be adding to and enhancing the Dashboard Product in future releases, and we are looking forward to user feedback to make this an indispensible tool just as our Grid products have become for Enterprise Application Development.

For those of you with an eye for fine details, you’ll notice that the tiny charts in the last column above are ----- yes, they’re 3D!!! Now, this is just a beginning – our new 3D Bar and Column Tiny Charts. This is just small step forward on our data visualization bits. We’re working on a full fledged lightweight charting components optimized for mobile, however, these were solid enough to release.

The other nice addition is the addition of the taskbar. This can be used to minimize the dashlets to the taskbar similar to what you would see in windows. Screenshot below:

The enableTaskbar property was added to make this happen:

Flag to draw a task bar UI at the bottom. Please ensure you set enableMinimize on your dashlets so it can be minimized to taskbar. You can customize the appearance of the task bar via the skin.




Asynchronous printing- New 2.9 Feature

clock November 9, 2012 07:36 by author Administrator

One of the most significant enhancements to 2.9 is the introduction of Asynchronous printing. This not only gives your users a responsive UI and progressive feedback of the printing/pdf generation process, but also prevents flash time-outs in certain cases where the number of requested pages to print was large.

The way print and pdf generation are implemented is a little different between classic and Ultimate/Dashboard. The way it works in Classic is that the PDF trigger code lies outside the core library (specifically, in MyPreviewRenderer.mxml that is distributed as a part of the sample code). For Ultimate, the PreviewRenderer is built into the swc, so you do not have to do any manual work. This also means that we are able to enable this new feature by default for Ultimate, but for Classic, this has to be done manually.


So, for Classic customers (and any Ultimate customers if you have customized the Preview Window), first thing is that with 2.9, as soon as you drop the swc into your libs, you will see the following error.

1044: Interface method set progress in namespace com.flexicious.print.printareas:IPrintPreview not implemented by class com.sample.examples.support.print:MyPreviewRenderer.          MyPreviewRenderer.mxml   /Sample/src/com/sample/examples/support/print       

 There are two ways to resolve this issue, depending on what you need to do

1)    You do not want to use the new Asynchronous Printing: Then just add the following code to your MyPreviewRenderer.

public function get progress():String

                             {

                                      return "";

                                      //do nothing

                             }

                             public function set progress(value:String):void

                             {

                                      //do nothing

                        }

2)    You want to use the new Asynchronous Printing:

  • First, in MyPrintOptions.as, set printOptions.asynch=true.
  • Use the  MyPreviewRendererBelow.
  • You will also need the AlivePDFPrinter, which is also attached. Drop it next to MyPreviewRenderer.

MyPreviewRenderer.mxml (8.21 kb) || AlivePdfPrinter.as (3.70 kb)


For Ultimate customers, the asynchronous printing is now the default. However, once you use 2.9, with the PDF, you will see the following error (Not only that, but the AlivePDFGenerator will also not be completely Asynchronous.):

Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press.

There are two ways to resolve the issue:

  •  You can live with the lag that is generated after the convert to image is complete and images are printed to PDF. If so, simply use the AlivePDFGenerator below.

AlivePdfGenerator.as (2.75 kb)

  • You want to fully leverage the new Asynchronous Printing, including while generating the PDF. In this case, remove the AlivePDFGenerator altogether. You do not need it. On the FlexDataGrid, instead of
    1. < FlexDataGrid pdfBytesReady="new AlivePdfGenerator().generate(event.target as FlexDataGrid ,event.printOptions)", add:
    2. < FlexDataGrid pdfPrinter="{new AlivePdfPrinter()}". The AlivePDFPrinter class is shown below.

AlivePdfPrinter2.as (3.70 kb)

Once done, when you do the print, you should see a nice progress bar while the printing is in process.


There are a number of properties added to support this, but most of them default for Ultimate and for Classic, you simply have to use the appropriate classes as defined above. Dashboard currently only prints a one pager so it is not affected so much.

The following properties were added to support this functionality:

asynch:Boolean

Flag to enable asynchronous processing of the print results. If you set this to true, the pages are processed in timer events, giving the application an opportunity to show progress and prevent timeouts. Asynch can only work if you specify the preview flag, because the print then shows the progress in the preview window, and uses the preview window as a parent container.

asynchDelayCapture:Boolean  

Flag to wait for the grid to completely render prior to capturing a snapshot for printing. The way the print works, is that it renders each page of the grid takes a snapshot and adds it to the print object to be spooled to the printer. Same concept applies to pdf where instead of adding to the print object the snapshot is converted to an image and added to the pdf bytestream. This does not work well in scenarios where you have external images that are loaded by url as opposed to using embedded assets. In scenarios like these you may need to add a delay to the printing mechanism to ensure that enough time is available for the external images to load. This flag, in combination with the asynchTimeInterval lets you control the amount of time that the print mechanism will wait after the grid is rendered to capture the snapshot.

This property can be used as the source for data binding.

asynchTimeInterval:int 

The time interval, in milliseconds, used by the timer of the execute() method to iteratively process pages. You can set it to a higher value if you want to wait for longer before the next page is processed. This is used in cases where you are loading external images in your item renderers. Please make sure you also set asynchDelayCapture to true in this scenario. The default value is 1, which allows enough time for the UI to update itself to show the end user a progress bar and also prevents timeouts while printing or exporting to pdf a large number of pages.

This property can be used as the source for data binding.


For Trials: Finally, if you see the following error when running the trial versions:

SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C:/Users/Flexicious-106/Downloads/trials/FlexiciousUltimateFlex4Trial/bin-debug/TreeGrid.swf cannot access file:///C:/Users/Flexicious-106/Downloads/trials/FlexiciousUltimateFlex4Trial/bin-debug/TreeGrid.html.

Fix is to Right Click -> Global Settings -> Advanced -> Trusted Location Settings -> Add -> Add the folder above (The one where the swf is located).




Multiple User Preferences - New 2.9 Feature

clock November 9, 2012 06:50 by author Flexicious

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();

                         }



Addition of the OLAPDataGrid – Flexicious 2.9

clock November 9, 2012 06:22 by author Administrator

2.9 brings to you a number of features. The support for OLAP is one of them. As most of you know, the Advanced Datagrid from the Flex SDK has a subclass, the OLAPDataGrid that takes a special kind of a data provider. There is an entire namespace dedicated to OLAP manipulation. Although this is not a very widely used feature, nevertheless, some of our customers did ask for it. So, with no further ado, presenting, the all new OLAPFlexDataGrid. The Olap DataGrid offers the following features that the stock OLAPDataGrid does not:

  • Sortable columns
  • Built in Expand Collapse of Column groups
  • Built in Expand Collapse of Rows
  • Row Spans for Cells that group values
  • Built in support for footers
  • Built in support to calculate running totals for summary values
  • Ability to hook into columns created to specify custom label functions

We’ve also created a set of examples using the OLAPFlexDataGrid. Below are some screenshots, and you can experience the application here.

For Trials:When you request a trial, please ensure to request the Dashboard Trial as well, since the OLAP trial uses the “FieldSet” component that is only a part of the Dashboard swc. You will need to place both the Ultimate trial swc as well as the Dashboard trial swc in your libs folder. If you are an Ultimate only customer, you will need to download the dashboard + ultimate Trial to run the OLAP demos. If you wish to use the OLAPDataGrid and not purchase dashboard, you can simply replace the fieldset component with a Panel or something similar.

From the documentation:

The OlapFlexDataGrid control expands on the functionality of the Flexicious Ultimate control to add support for the display of the results of OLAP queries. Like all Flex data grid controls, the OLAPDataGrid control is designed to display data in a two-dimensional representation of rows and columns.

Because of the way you pass data to the OLAPDataGrid control, it has several differences from the Flexicious Ultimate control:

  • You cannot edit cells in the OLAPDataGrid control because cell data is a result of a query and does not correspond to a single data value in the OLAP cube.
  • The data provider will only accept IOLAPResult values
  • A number of features meant for transactional data, like lazy load, inline filters, paging, etc. does not apply to OLAP data.

You populate an OlapFlexDataGrid control with data by setting its data provider to an instance of the OLAPResult class, which contains the results of an OLAP query.

Unlike the OLAPDataGrid that ships with the SDK, the Ultimate OlapFlexDataGrid converts the incoming IOLAPResult to a hierarchical collection. It does not use renderer providers. Since it provides support for expand collapse and the row and column levels, it takes the IOLAPResult and iterates through its row positions to convert them into an array collection of objects that have a 'children' property. This is repeated for the number of dimensions in the row, for a multi level hierarchy. This collection is then provided to the base dataprovider with the enableDynamicLevels flag turned on, so that the grid will instantiate the appropriate number of nested levels. You can configure each level as it is created by wiring up the dynamicLevelCreated event or the dynamicAllLevelsCreated event. The Ultimate OlapFlexDataGrid will also dispatch the following events:

  • olapColumnCreated: Dispatched when a column is created after introspecting the IOLAPResult Use this event to perform post processing of the columns after the grid has applied all its defaults
  • olapColumnGroupCreated: Dispatched when a grouped column is created after introspecting the IOLAPResult Use this event to perform post processing of the column group after the grid has applied all its defaults. Please note, this is dispatched after the initial column group is created, not after all the columns are added to the group. If you need that, you should use the columnsCreated event, which is dispatched after all columns and column groups are created. Please note, since the FlexDataGridEvent does not have a columnGroup property, the item property of the FlexDataGridEvent is used to store the column group that is created. Please do not modify the columns collection until AFTER olapDataProviderConverted is dispatched, because the column ordinal indexes are used in conversion of columns to hierarchical data.
  • olapColumnsCreated:Dispatched when all the columns are created after introspecting the IOLAPResult Use this event to perform post processing of the columns after the grid has applied all its defaults. Please do not modify the columns collection until AFTER olapDataProviderConverted is dispatched, because the column ordinal indexes are used in conversion of columns to hierarchical data.
  • olapDataProviderConverted: Dispatched when the IOLAPREsult is converted to a nested array collection and is set as the dataprovider. The OlapFlexDataGrid takes the IOLAPResult as a dataprovider and iterates through its row positions to convert them into an array collection of objects that have a 'children' property. This is repeated for the number of dimensions in the row, for a multi level hierarchy. This collection is then provided to the base dataprovider. You may modify the columns collection in this event.