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

    Hiding the expand/collapse triangle for particular FacetValues in a CubeGrid?

    Hello, is it possible to hide the expand/collapse triangle buttons for specific facet values? There are some facet values that have just a single row, so there is no reason we'd want to show the toggle for minimizing the FacetValue. I looked through the docs and did some experimentation but couldn't figure out if this is possible per FacetValue. I tried the facetValue.setCanCollapse(false) but this did not work, possibly because the facet values aren't set up to be hierarchical - however this was a few weeks ago when I tried it, so maybe I did something wrong.

    See screenshot - here we would want to hide the minimize toggle for the "plan" stage.

    Click image for larger version  Name:	hide_expand_collapse.png Views:	1 Size:	41.5 KB ID:	258348
    Last edited by user316; 27th Jun 2019, 05:28.

    We're looking into a fix that will optimize away the toggle if you have a CubeGrid such as the Basic Cube Sample but with CubeGrid.canMinimizeFacets true and all but one row removed from the "Western U.S." Row FacetValue.

    However, CubeGrid field toggles control both "collapsing" and "minimizing," and we'd like to make sure any fix we apply correctly resolves your issue before making it. Can you provide sample code creating a CubeGrid that mimics your use case, perhaps by modifying one of our Showcase samples, so we can be sure it's resolved?


      I've attached an example (although it's a very rough approximation of the current code). In this example, we'd want to hide the minimize toggles for the "sta" and "ecpm" stages.
      Attached Files
      Last edited by user316; 28th Jun 2019, 11:53.


        Is it also possible to set a FacetValue to be initially minimized? I tried setCollapsed(true) but it did not have any effect.

        In my sample code (lines 201:210 in, I changed the code to the below but it did not make the first PNR Stage (place_opt) be initialized to minimized/collapsed:
                tempFacetVals = new FacetValue[pnrStageNames.size()];
                i = 0;
                for (String str : pnrStageNames) {
                    tempFacetVals[i] = new FacetValue(str, str);
                    if (i == 0) {
        Last edited by user316; 28th Jun 2019, 11:54.


          We don't currently support initial minimization of a facetValue, and in fact doing so complicates the toggle optimization. It probably makes sense for us to do both of these at once, but it's not going to be a trivial change, as it will need to be verified, etc. We'll update this thread when it's in.


            We've added new facet and facet value minimize properties that parallel existing collapse properties, and suppressed CubeGrid field toggles that would do nothing, in SGWT/SC 12.0 and newer branches. All of that will be in the nightly builds dated 2019-07-05 and beyond.

            In your code snippet above, you would now do this: