Announcement

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

    problem with Dashboard

    SmartClient Version: v10.0p_2014-12-13/EVAL Development Only (expires 2015.02.11_12.43.38) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)

    Hello, while trying the #portalDashboard sample I noticed in the developer console logs that it's always loading the datasource definitions with the dashboard layout:
    Code:
    12:03:29.428:XRP2:WARN:Log:ClassFactory.addGlobalID: ID:'supplyItem' for object '[DataSource ID:supplyItem]' collides with ID of existing object '[DataSource ID:supplyItem]'. The global reference to this object will be replaced
    So I've modified the saveDashboard method like this:
    Code:
        saveDashboard : function () {
            var editNodes = editPane.serializeAllEditNodes({ indent: false, serverless: true });
    ....
    I understand that serverless:true is the correct setting if the dataSources are already available in the application (correct me if I'm wrong)

    Now, if I create a new dashboard, then add 'animals', and save, the layout is saved without the datasource:
    Code:
    {
        dataSource:"dashboards", 
        operationType:"update", 
        componentId:"dashboardList", 
        data:{
            id:3, 
            description:"New dashboard", 
            layout:"\r<ListGrid dataSource=\"animals\" autoFetchData=\"true\" ID=\"ListGrid0\" autoDraw=\"false\">\r<showFilterEditor>true</showFilterEditor>\r\r</ListGrid>\n\n\r<Portlet ID=\"Portlet0\" height=\"482\" left=\"0\" top=\"0\" autoDraw=\"false\">\r<destroyOnClose>true</destroyOnClose>\r<title>Animals</title>\r<items><Canvas ref=\"ListGrid0\"/>\r</items>\r\r</Portlet>\n\n\r<PortalLayout ID=\"PortalLayout1\" width=\"100%\" height=\"100%\" autoDraw=\"false\">\r<portalColumns>\r<PortalColumn>\r<portalRows>\r<PortalRow>\r<portlets><Canvas ref=\"Portlet0\"/>\r</portlets>\r<autoDraw>false</autoDraw>\r<ID>PortalRow0</ID>\r\r</PortalRow>\r</portalRows>\r<ID>PortalColumn0</ID>\r</PortalColumn>\r<PortalColumn>\r<ID>PortalColumn1</ID>\r</PortalColumn>\r</portalColumns>\r<canResizePortlets>true</canResizePortlets>\r<numColumns>0</numColumns>\r\r</PortalLayout>\n\n"
        }, 
        textMatchStyle:"exact", 
        showPrompt:true, 
        oldValues:{
            id:3, 
            description:"New dashboard", 
            layout:"\r<ListGrid dataSource=\"animals\" autoFetchData=\"true\" ID=\"ListGrid0\" autoDraw=\"false\">\r<showFilterEditor>true</showFilterEditor>\r\r</ListGrid>\n\n\r<Portlet ID=\"Portlet0\" height=\"482\" left=\"0\" top=\"0\" autoDraw=\"false\">\r<destroyOnClose>true</destroyOnClose>\r<title>Animals</title>\r<items><Canvas ref=\"ListGrid0\"/>\r</items>\r\r</Portlet>\n\n\r<PortalLayout ID=\"PortalLayout1\" width=\"100%\" height=\"100%\" autoDraw=\"false\">\r<portalColumns>\r<PortalColumn>\r<portalRows>\r<PortalRow>\r<portlets><Canvas ref=\"Portlet0\"/>\r</portlets>\r<autoDraw>false</autoDraw>\r<ID>PortalRow0</ID>\r\r</PortalRow>\r</portalRows>\r<ID>PortalColumn0</ID>\r</PortalColumn>\r<PortalColumn>\r<ID>PortalColumn1</ID>\r</PortalColumn>\r</portalColumns>\r<canResizePortlets>true</canResizePortlets>\r<numColumns>0</numColumns>\r\r</PortalLayout>\n\n"
        }, 
        requestId:"dashboards$6276", 
        fallbackToEval:false, 
        lastClientEventThreadCode:"MUP1", 
        bypassCache:true
    }
    so far so good. But if I re-edit the dashboard, which gets re-loaded with this request:
    Code:
    {
        "actionURL":"http://localhost:8083/isomorphic/IDACall", 
        "showPrompt":false, 
        "transport":"xmlHttpRequest", 
        "promptStyle":"cursor", 
        "data":{
            "requestParams":null, 
            "appID":"isc_builtin", 
            "className":"builtin", 
            "methodName":"xmlToJS", 
            "arguments":[
                "\r<ListGrid dataSource=\"animals\" autoFetchData=\"true\" ID=\"ListGrid3\" autoDraw=\"false\">\r<showFilterEditor>true</showFilterEditor>\r\r</ListGrid>\n\n\r<Portlet ID=\"Portlet3\" height=\"482\" left=\"0\" top=\"0\" autoDraw=\"false\">\r<destroyOnClose>true</destroyOnClose>\r<title>Animals</title>\r<items><Canvas ref=\"ListGrid3\"/>\r</items>\r\r</Portlet>\n\n\r<PortalLayout ID=\"PortalLayout3\" width=\"100%\" height=\"100%\" left=\"0\" top=\"0\" autoDraw=\"false\">\r<portalColumns>\r<PortalColumn>\r<portalRows>\r<PortalRow>\r<portlets><Canvas ref=\"Portlet3\"/>\r</portlets>\r<autoDraw>false</autoDraw>\r<ID>PortalRow3</ID>\r\r</PortalRow>\r</portalRows>\r<ID>PortalColumn0</ID>\r</PortalColumn>\r<PortalColumn>\r<ID>PortalColumn1</ID>\r</PortalColumn>\r</portalColumns>\r<canResizePortlets>true</canResizePortlets>\r<numColumns>0</numColumns>\r\r</PortalLayout>\n\n"
            ], 
            "is_ISC_RPC_DMI":true
        }
    }
    and this is the response:
    Code:
    {
        status:0, 
        data:"\nisc.ListGrid.create({\n    ID:\"ListGrid3\",\n    autoDraw:false,\n    autoFetchData:true,\n    dataSource:\"animals\",\n    showFilterEditor:true\n})\n\n\n\nisc.Portlet.create({\n    ID:\"Portlet3\",\n    autoDraw:false,\n    height:482,\n    left:0,\n    top:0,\n    destroyOnClose:true,\n    title:\"Animals\",\n    items:[\n        ListGrid3\n    ]\n})\n\n\n\nisc.PortalLayout.create({\n    ID:\"PortalLayout3\",\n    autoDraw:false,\n    height:\"100%\",\n    left:0,\n    top:0,\n    width:\"100%\",\n    portalColumns:[\n        {\n            portalRows:[\n                {\n                    portlets:[\n                        Portlet3\n                    ],\n                    autoDraw:\"false\",\n                    ID:\"PortalRow3\",\n                    _constructor:\"PortalRow\"\n                }\n            ],\n            ID:\"PortalColumn0\",\n            _constructor:\"PortalColumn\"\n        },\n        {\n            ID:\"PortalColumn1\",\n            _constructor:\"PortalColumn\"\n        }\n    ],\n    canResizePortlets:true,\n    numColumns:\"0\"\n})\n\n\n"
    }
    and then I save it:
    Code:
    {
        dataSource:"dashboards", 
        operationType:"update", 
        componentId:"dashboardList", 
        data:{
            id:5, 
            description:"New dashboard", 
            layout:"\r<DataSource loadParents=\"true\">\r<loadID>animals</loadID>\r</DataSource>\n\n\r<ListGrid dataSource=\"animals\" autoFetchData=\"true\" ID=\"ListGrid3\" autoDraw=\"false\">\r<showFilterEditor>true</showFilterEditor>\r</ListGrid>\n\n\r<Portlet ID=\"Portlet3\" height=\"482\" left=\"0\" top=\"0\" autoDraw=\"false\">\r<destroyOnClose>true</destroyOnClose>\r<title>Animals</title>\r<items><Canvas ref=\"ListGrid3\"/>\r</items>\r</Portlet>\n\n\r<PortalLayout ID=\"PortalLayout3\" width=\"100%\" height=\"100%\" left=\"0\" top=\"0\" autoDraw=\"false\">\r<portalColumns>\r<PortalColumn>\r<portalRows>\r<PortalRow height=\"482\">\r<portlets><Canvas ref=\"Portlet3\"/>\r</portlets>\r<autoDraw>false</autoDraw>\r<ID>PortalRow3</ID>\r</PortalRow>\r</portalRows>\r<autoDraw>false</autoDraw>\r<ID>PortalColumn0</ID>\r<left>0</left>\r<top>0</top>\r<height>514</height>\r</PortalColumn>\r<PortalColumn>\r<autoDraw>false</autoDraw>\r<ID>PortalColumn1</ID>\r<left>426</left>\r<top>0</top>\r<height>514</height>\r</PortalColumn>\r</portalColumns>\r<canResizePortlets>true</canResizePortlets>\r<numColumns>0</numColumns>\r</PortalLayout>\n\n"
        }, 
        textMatchStyle:"exact", 
        showPrompt:true, 
        oldValues:{
            id:5, 
            description:"New dashboard", 
            layout:"\r<DataSource loadParents=\"true\">\r<loadID>animals</loadID>\r</DataSource>\n\n\r<ListGrid dataSource=\"animals\" autoFetchData=\"true\" ID=\"ListGrid3\" autoDraw=\"false\">\r<showFilterEditor>true</showFilterEditor>\r</ListGrid>\n\n\r<Portlet ID=\"Portlet3\" height=\"482\" left=\"0\" top=\"0\" autoDraw=\"false\">\r<destroyOnClose>true</destroyOnClose>\r<title>Animals</title>\r<items><Canvas ref=\"ListGrid3\"/>\r</items>\r</Portlet>\n\n\r<PortalLayout ID=\"PortalLayout3\" width=\"100%\" height=\"100%\" left=\"0\" top=\"0\" autoDraw=\"false\">\r<portalColumns>\r<PortalColumn>\r<portalRows>\r<PortalRow height=\"482\">\r<portlets><Canvas ref=\"Portlet3\"/>\r</portlets>\r<autoDraw>false</autoDraw>\r<ID>PortalRow3</ID>\r</PortalRow>\r</portalRows>\r<autoDraw>false</autoDraw>\r<ID>PortalColumn0</ID>\r<left>0</left>\r<top>0</top>\r<height>514</height>\r</PortalColumn>\r<PortalColumn>\r<autoDraw>false</autoDraw>\r<ID>PortalColumn1</ID>\r<left>426</left>\r<top>0</top>\r<height>514</height>\r</PortalColumn>\r</portalColumns>\r<canResizePortlets>true</canResizePortlets>\r<numColumns>0</numColumns>\r</PortalLayout>\n\n"
        }, 
        requestId:"dashboards$62733", 
        fallbackToEval:false, 
        lastClientEventThreadCode:"MUP9", 
        bypassCache:true
    }
    as you see, the '<DataSource loadParents=\"true\"><loadID>animals</loadID></DataSource>' is saved with the layout.

    I'm still trying to reproduce my actual - very similar - use case, where the entire dataSource definition is saved with the layout, and the listGridFields tags of all fields are duplicated for every save operation.
    Last edited by claudiobosticco; 15 Dec 2014, 03:30.

    #2
    Originally posted by claudiobosticco View Post
    I'm still trying to reproduce my actual - very similar - use case, where the entire dataSource definition is saved with the layout, and the listGridFields tags of all fields are duplicated for every save operation.
    These additional problems seems solved: I forgot to define extraPalettes, and also I enabled saving the dashboard without going in edit mode.

    It remains the problem reproduced in the sample.

    Comment


      #3
      SmartClient Version: v10.0p_2015-01-14/EVAL Development Only (expires 2015.03.15_10.24.32) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)

      Hello, this problem is still there.
      Did you manage to reproduce it? Is it a bug or intended behavior?

      Comment

      Working...
      X