Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Cube Grid and behavior of .setData() and .show() inside and outside a fetchData callback

    SmartClient Version: v12.1p_2021-10-22/PowerEdition Deployment (built 2021-10-22)

    I have a very basic cube grid that displays in a popup window.

    I'm attempting to get it to load with a datasource, but it fails to draw. The fetchData callback returns with the correct and appropriate data, which is then written to the grid with a setData() call, and after a delay (artificial I don't really want this) I call window.show() to draw the popup.

    If I code using Static data (same as the fetchData return ) and in one case apply the setData() outside the callback I see the drawn Cube Grid, and in the other case I apply the setData() in the fetchData callback, I don't see the drawn Cube Grid. What am I missing.

    Here is case 1, a successful draw of the Cube in the popup window. The setData() is done OUTSIDE of the callback.
    Code:
                       final CubeGrid dvdCube = new CubeGrid();
                        dvdCube.setRowFacets("Status","VBin");
                        dvdCube.setColumnFacets("TopTitle","DVDMode", "Category", "CVT");
                        dvdCube.setValueProperty("Count");
                        dvdCube.setHideEmptyFacetValues(true);
    
                        final List<ListGridRecord> dvdD = new ArrayList<ListGridRecord>();
    
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.00::0.01", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.01::0.02", "Completed", 7));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.05::0.06", "Completed with Errors", 800));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.06::0.07", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.00::0.01", "Completed", 4));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.05::0.06", "Completed", 1000));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.06::0.07", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.00::0.01", "Completed", 8));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.03::0.04", "Completed", 20));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.05::0.06", "Completed", 900));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.06::0.07", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.00::0.01", "Completed", 9));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.05::0.06", "Completed", 1220));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.06::0.07", "Completed", 0));
    
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.00::0.01", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.01::0.02", "Completed", 4));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.03::0.04", "Completed", 330));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.05::0.06", "Completed", 900));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.06::0.07", "Completed with Errors", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.00::0.01", "Completed", 3));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.05::0.06", "Completed", 1230));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.06::0.07", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.00::0.01", "Completed", 40));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.03::0.04", "Completed with Errors", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.05::0.06", "Completed", 700));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.06::0.07", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.00::0.01", "Completed", 20));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.05::0.06", "Completed", 1000));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.06::0.07", "Completed", 0));
    
                        dvdCube.setWidth(1100);
                        dvdCube.setHeight(360);
                        dvdCube.setOverflow(Overflow.VISIBLE);
    
                        dvdCube.setDataSource(DataSource.get("BCG_BE_STA_DVD_Checks"))      
                        dvdCube.setFetchOperation("fetchDVDBlockDetails");
                        dvdCube.setAutoFetchData(false);
    
                        DSRequest dvdReq = new DSRequest();
                        dvdReq.setOperationId("fetchDVDBlockDetails");
                        final AdvancedCriteria critDVD= new AdvancedCriteria(OperatorId.AND, new Criterion[] {
                                new Criterion("Block_Name", OperatorId.EQUALS, clickedRec.getAttribute("Block_Name")),
                                new Criterion("FK_Layout_Rundir", OperatorId.EQUALS, clickedRec.getAttribute("FK_Layout_Rundir")) });
    
                        DataSource.get("BCG_BE_STA_DVD_Checks").fetchData(critDVD, new DSCallback() {
    
                            @Override
                            public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
                                if(dsResponse.getData().length < 1) {
                                    return;
                                }
    
    // dvdCube.setData( dvdD.toArray( new ListGridRecord[ dvdD.size()] ));   // set data inside callback
    
    
    // Timer delayCubeShow = new Timer() {
    // public void run() {
    // detailsWin.show();      // just delay the show,  even setting it to 20 seconds doesn't cause the grid to draw.
    // }
    // };
    // delayCubeShow.schedule(1000);
    
                            }
                        }, dvdReq);
    
    
                        dvdCube.setData( dvdD.toArray( new ListGridRecord[ dvdD.size()] ));   // Set data outside callback.
    
                        VLayout dvdLayout = new VLayout();
                        dvdLayout.setWidth100();
                        dvdLayout.setHeight100();
                        dvdLayout.setPadding(5);
                        dvdLayout.setMargin(10);
                        dvdLayout.setMembersMargin(5);
                        dvdLayout.setOverflow(Overflow.AUTO);
    
                        dvdLayout.setMembers(dvdCube);  
    
    
                        detailsWin.setMaxHeight(800);
                        detailsWin.setMaxWidth(1300);
                        detailsWin.setWidth("50%");
                        detailsWin.setHeight("33%");
                        detailsWin.addItem(dvdLayout);
    
                        Timer delayCubeShow = new Timer() {
                            public void run() {
                                detailsWin.show();
                            }
                        };
                        delayCubeShow.schedule(1000);
    
    
                }

    Here is the result:







    And in the second case I do the setData from within the callback, and delay the detailWin.show(), but no grid is created.

    Code:
                       final CubeGrid dvdCube = new CubeGrid();
                        dvdCube.setRowFacets("Status","VBin");
                        dvdCube.setColumnFacets("TopTitle","DVDMode", "Category", "CVT");
                        dvdCube.setValueProperty("Count");
                        dvdCube.setHideEmptyFacetValues(true);
    
                        final List<ListGridRecord> dvdD = new ArrayList<ListGridRecord>();
    
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.00::0.01", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.01::0.02", "Completed", 7));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.05::0.06", "Completed with Errors", 800));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ff069125", "0.06::0.07", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.00::0.01", "Completed", 4));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.05::0.06", "Completed", 1000));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ff069125", "0.06::0.07", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.00::0.01", "Completed", 8));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.03::0.04", "Completed", 20));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.05::0.06", "Completed", 900));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Standard", "ss077125", "0.06::0.07", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.00::0.01", "Completed", 9));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.05::0.06", "Completed", 1220));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Max", "Special", "ss077125", "0.06::0.07", "Completed", 0));
    
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.00::0.01", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.01::0.02", "Completed", 4));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.03::0.04", "Completed", 330));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.05::0.06", "Completed", 900));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ff069125", "0.06::0.07", "Completed with Errors", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.00::0.01", "Completed", 3));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.05::0.06", "Completed", 1230));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ff069125", "0.06::0.07", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.00::0.01", "Completed", 40));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.03::0.04", "Completed with Errors", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.05::0.06", "Completed", 700));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Standard", "ss077125", "0.06::0.07", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.00::0.01", "Completed", 20));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.01::0.02", "Completed", 0));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.02::0.03", "Completed", 10));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.03::0.04", "Completed", 30));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.05::0.06", "Completed", 1000));
                        dvdD.add(CubeGridConfig.setCubeGridDVDData("VBin Count", "Pwr_Opt", "Special", "ss077125", "0.06::0.07", "Completed", 0));
    
                        dvdCube.setWidth(1100);
                        dvdCube.setHeight(360);
                        dvdCube.setOverflow(Overflow.VISIBLE);
    
                        dvdCube.setDataSource(DataSource.get("BCG_BE_STA_DVD_Checks"))
                        dvdCube.setFetchOperation("fetchDVDBlockDetails");
                        dvdCube.setAutoFetchData(false);
    
                        DSRequest dvdReq = new DSRequest();
                        dvdReq.setOperationId("fetchDVDBlockDetails");
                        final AdvancedCriteria critDVD= new AdvancedCriteria(OperatorId.AND, new Criterion[] {
                                new Criterion("Block_Name", OperatorId.EQUALS, clickedRec.getAttribute("Block_Name")),
                                new Criterion("FK_Layout_Rundir", OperatorId.EQUALS, clickedRec.getAttribute("FK_Layout_Rundir")) });
    
                        DataSource.get("BCG_BE_STA_DVD_Checks").fetchData(critDVD, new DSCallback() {
    
                            @Override
                            public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
                                if(dsResponse.getData().length < 1) {
                                    return;
                                }
    
                              dvdCube.setData( dvdD.toArray( new ListGridRecord[ dvdD.size()] )); // set data inside callback
    
    
                              Timer delayCubeShow = new Timer() {
                                   public void run() {
                                            detailsWin.show(); // just delay the show, even setting it to 20 seconds doesn't cause the grid to draw.
                                   }
                                };
                             delayCubeShow.schedule(1000);     // shouldn't the cube grid draw?
    
                            }
                        }, dvdReq);
    
    
               //         dvdCube.setData( dvdD.toArray( new ListGridRecord[ dvdD.size()] )); // Set data outside callback.
    
                        VLayout dvdLayout = new VLayout();
                        dvdLayout.setWidth100();
                        dvdLayout.setHeight100();
                        dvdLayout.setPadding(5);
                        dvdLayout.setMargin(10);
                        dvdLayout.setMembersMargin(5);
                        dvdLayout.setOverflow(Overflow.AUTO);
    
                        dvdLayout.setMembers(dvdCube);
    
    
                        detailsWin.setMaxHeight(800);
                        detailsWin.setMaxWidth(1300);
                        detailsWin.setWidth("50%");
                        detailsWin.setHeight("33%");
                        detailsWin.addItem(dvdLayout);
    
          //              Timer delayCubeShow = new Timer() {
         //                   public void run() {
         //                       detailsWin.show();
         //                   }
          //              };
          //              delayCubeShow.schedule(1000);
    
                }
    The result of this code is:







    I have tried to qualify the detailsWin.show by a if ( dvdCube.isCreated() ) condition, and the result is the same blank popup.

    What am I missing here?
    Last edited by tece321; 7 Sep 2022, 15:44. Reason: SHould have shown the setData() commented out in the second case, the failure case

    #2
    hideEmptyFacetValues requires the complete dataset before draw. Otherwise we cannot render at all - that's impossible without the complete dataset, because we don't even know what headers will be there. Unless something has gone wrong, you should have a warning about this in your Developer Console.

    So you just need to get the full dataset before you ask the cube to draw. The simplest thing in this situation, if you have a DataSource from which to fetchData(), is just to use the callback from fetchData() to create both the Window and its contained Cube.

    Note that if you see the docs for hideEmptyFacetValues, there is an advanced mode where you basically use hideEmptyFacetValues on one axis and turn off LOD on that axis, but it looks like you're really just doing complete data loading up front, so that probably doesn't apply.

    Comment


      #3
      Thanks.

      The documentation on hideEmptyFacetValues says:

      public CubeGrid setHideEmptyFacetValues(java.lang.Boolean hideEmptyFacetValues) throws java.lang.IllegalStateExceptionThis causes the headers for any combination of facetValues for which there are no cellRecords to be suppressed.

      To use this feature, either:
      • all must be provided via setData() before the CubeGrid is first drawn, OR
      • all data must be returned by the first DataSource fetch, OR
      • hideEmptyAxis must be set to either "row" or "column" so that empty values are only automatically hidden for one axis
      This last point is required because there is no way to determine whether a row is empty unless data for all columns of the row has been loaded (and vice-versa). For this reason if you set hideEmptyFacetValues but do not set hideEmptyAxis, the default behavior of loading only visible data is automatically disabled and only fixedFacetValues will be sent as criteria.


      But in my second example the setData() is provided in the Callback function, BEFORE the Window in which the cube grid is placed is drawn. So does that not meet the first criteria:
      "all must be provided via setData() before the CubeGrid is first drawn" ?

      There is a failure to draw no matter how long I delay the detailsWin.show() call after the setData().

      I will now attempt to create the cube grid inside the Callback function and see if that works..

      Comment


        #4
        There certainly could be a second problem in your code (which we can't run) or in the data returned by your DataSource fetch (which we can't see). Did you check your Developer Console for errors and warnings?

        Note that when the hideEmptyFacetValues docs refer to "all data must be returned by the first DataSource fetch", this means a DataSource fetch initiated by the cube.

        If you instead use the setData() approach, then there's no way the CubeGrid could tell the difference between your two scenarios (it doesn't know how you got the data). So that strongly suggests that the data is subtly different, or that something else is wrong.

        Comment

        Working...
        X