Announcement

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

    Lazy Loading of Facet Values

    Lazy loading of facet values has been implemented as a feature sponsorship.
    I've made some tests with SmartClient 8.3d_2012-05-17 and I am having some troubles.
    What I've done is replacing (switching the files) SmartClient 8.1 with the new version, configuring with the options I have been given (hideEmptyFacetValues: true and hideEmptyAxis: "row").
    I am seeing two problems:
    1. The cube headers are not shown any more.
    2. The query parameters to build the cube are sent when the cube is created, the total is displayed, but when I try to open a tree facet, no request is sent and no data shown.

    I'm including the snippet I'm using:
    Code:
    var cubo = isc.CubeGrid.create({
    
                ID: "cuboServidoresOrgaoCargo",
                hideEmptyFacetValues: true,
                hideEmptyAxis: "row",
                emptyCellValue: "-",
                formatCellValue: function (value, record, field, rowNum, colNum) {
                    return isc.isA.Number(parseInt(value)) ?
    		                            Number(value).toLocalizedString(0, ',', '.', '-') : value;
                },
    
                autoDraw: false,
    
                width: "100%",
    
                // data configuration
                facets: facetas, // defined above
                dataSource: "dsServidoresOrgaoCargo",
                valueProperty: "TOTAL",
    
                // initial facet layout
                rowFacets: ["ORGAO", "CARREIRACARGO"],
                columnFacets: ["TOTALSERVIDORES"],
    
                wrapFacetValueTitles: true,
                autoFitFieldWidths: true,
                autoSizeHeaders: true,
    
                // misc settings for this application
                canCollapseFacets: true,
                canMinimizeFacets: true,
                autoSelectValues: "both", // both, cols, row, none
                rowHeaderGridMode: true,
                canMoveFacets: true,
    
                cellClick: function (record) {
                    Stc.Portal.Servidores.mostraGradeServidores(record.ORGAO, record.CARREIRACARGO);
                }
    
            });
    Cheers,
    Cédric.
    Last edited by basis.cedric; 22 May 2012, 03:48.

    #2
    There's no way to help you with just code like this - we need to see the data and facet settings. The best way to start is to take the "Advanced Cube" example and, if you can reproduce an issue there, show the modifications necessary to recreate the problem.

    In particular, if you add settings like this to that sample:

    hideEmptyFacetValues:true,
    hideEmptyAxis:"row",

    // initial facet layout
    rowFacets: ["Products"],
    columnFacets: ["Time", "Regions"],
    fixedFacetValues: {Scenarios:"Budget"},

    Then you should see that as you open the Product tree, load on demand occurs, and if you modify the sample dataset so that the data for certain products is wiped out, they will be trimmed from the headers for the tree.

    Comment


      #3
      OK, I'll try to modify the advanced cube sample.

      Comment

      Working...
      X