Announcement

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

  • Missing fourth FacetValue folder in CubeGrid

    Hi,

    I am trying to make a cube grid with 4 levels of FacetValue folders in a tree. I believe that I set all the facet values correctly, and set the right data, but I only see 3 levels of folders instead of 4 under the Facet "metric". It seems the "budgeted_inputs_gisbports2reg" folder was skipped and the TotalWorst, TotalCount, etc. metrics are instead children of "functional". Could you look into what is wrong here? The effect is much worse even if I add a lot more data, or set the metric FacetValue folders to collapsed by default. Also, how do you add indents to the left of the FacetValue titles, based on the level in the tree? I have attached a screenshot and example code.

    Click image for larger version  Name:	missing_cubegrid_folder.png Views:	1 Size:	30.6 KB ID:	250191
    Attached Files
    Last edited by user316; 6th Nov 2017, 12:38.

  • #2
    Hi,

    I actually have fixed the problem with the missing folder. I was setting the metric attribute incorrectly for that record.

    Anyways, could you please let me know how to add the indents to the left of the folder arrows? I am using SmartClient Version: v11.1p_2017-08-08/PowerEdition Deployment (built 2017-08-08). As seen in my original screenshot, there are no indents for any of the folders, and I don't see any way to add them.

    I need to add indents like in the Advanced Cube Grid example, but not sure how. See screenshot below from the Advanced Cube Grid example:

    Click image for larger version  Name:	indents.png Views:	1 Size:	10.5 KB ID:	250217
    Last edited by user316; 7th Nov 2017, 09:27.

    Comment


    • #3
      You should find that those indents are already there, as there are in the Showcase. First thing to check is whether you've got custom CSS (beyond what we include in the skin) which is interfering:

      Comment


      • #4
        I simply changed code in the example BuiltInDS project which does not have any custom CSS. I'm not setting any custom style for my CubeGrid. You can see this in my sample code. Could it be another problem?

        I have re-attached the sample code which has the fix for the missing folder row. BuiltInDS.java


        Click image for larger version

Name:	indents.png
Views:	2
Size:	25.6 KB
ID:	250231
        Attached Files
        Last edited by user316; 7th Nov 2017, 13:15.

        Comment


        • #5
          Try removing left alignment. You haven't indicated your browser, version or platform, but perhaps you are running into a browser-specific bug where left alignment collapses the indent.

          This could also be due to extensions installed in your browser, so try disabling those if the problem persists.

          Comment


          • #6
            My main browser is Google Chrome, but I am seeing the same issue in Internet explorer. I have a few extensions in Google Chrome, but when I disable them the issue is still there. I'm using Google Chrome Version 61.0.3163.100.

            I tried removing the left alignment, but that simply causes all the facet values to be centered and not indented. Could something else be the cause? It seems there is some SmartGWT framework bug that is causing the indentation to not occur.
            Last edited by user316; 8th Nov 2017, 08:04.

            Comment


            • #7
              Sorry for the delay on this - it turns out that this is due to not setting rowHeaderGridMode to true. We generally recommend this setting for performance reasons, so we'd recommend you have it on anyway. The loss of indent for non-rowHeaderGridMode appears to be a regression that wasn't noticed because everyone is running with rowHeaderGridMode turned on.

              There's also a problem with this line of code:

              FacetValue val = cubeGrid.getFacetValue("metric", "MacroCellArea");
              Your code never actually does anything with the "val" local variable, however, accessing it at this point appears to create an order-of-initialization problem. It does not appear to be problem to do similar access after completeCreation() or draw(), if you have something in mind that you want to do with this facetValue in your actual app.

              Comment


              • #8
                To clarify, rowHeaderGridMode cannot be set after the CubeGrid has been "created" in JavaScript, and certain APIs such as CubeGrid.getFacetValue() force creation of the underlying JavaScript CubeGrid.

                So try to set such "IR" properties like rowHeaderGridMode as early as possible in the logic flow, before anything questionable that may force creation of the underlying JavaScript instance. Note that, in this case, a warning describing this problem would've been logged to the Developer Console to alert you to the problem.

                Comment

                Working...
                X