Announcement

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

    Regression - IE11 error when fetching data and using DynamicForm

    SmartClient_v101p_2016-03-14_PowerEdition

    We use a custom paging model with our grid since we have to integrate with some legacy components in our application. Basically, we execute a new fetchData request on the grid with some additional parameters and the server returns the correct page of data. This worked in with SmartClient 9.1. I have simplified this code in the test case for brevity. Basically, when the user selects the page, I call fetchData.

    This functionality is now throwing an error in IE11 only. It works in Chrome with no exceptions.

    REPRO Steps:
    ========
    1. Load test case
    2. Select page 1 from the drop down
    3. Observe the console (attached image)


    Code:
    <!DOCTYPE html>
    
    <html>
        <head>
    
            <title></title>
            
            <style>
                .diagInfo {
                    font-size: 14px;
                    font-weight: bold;
                    padding: 5px;
                }
            </style>
            
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Core.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Foundation.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Containers.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Grids.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Forms.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_DataBinding.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Drawing.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_PluginBridges.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Charts.js"></script>    
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
        
            <script type="text/javascript" >
                var isomorphicDir="http://localhost:8080/isomorphic/";
                
                // set this to the correct JIRA ticket
                var JIRA_TICKET = "SNTQ-1219";
                
                isc.DataSource.create({
                ID: "countryDS",
                dataURL: "SNQA-1219-1.json",
                fields:[
                    {name:"continent", title:"Continent"},
                    {name:"countryCode", title:"Code"},
                    {name:"countryName", title:"Country"},
                    {name:"capital", title:"Capital"}
                ],
                dataFormat: "json",
                clientOnly: true
    
                })
                
                
                // once page loads set some diagnostic information, DO NOT CHANGE
                isc.Page.setEvent("load", function() {
                    document.title = JIRA_TICKET + "   (SmartClient version " + isc.versionNumber + ")";
                    var html = [];
                    html.push("Jira: " + JIRA_TICKET);
                    html.push("SmartClient: " + isc.versionNumber);
                    html.push("Browser: " + navigator.appCodeName + " " + navigator.appName + " " + navigator.appVersion);
                    diagLabel.setContents( html.join("<br>"));
                });
                
    
            </script>
    
        <!--mstheme--><link rel="stylesheet" type="text/css" id="onetidThemeCSS" href="../../_themes/Lichen/Lich1011-65001.css"><meta name="Microsoft Theme" content="Lichen 1011, default">
    </head>
        
        <body>
            <script>
            
                // ===== DO NOT REMOVE =====
                var diagLabel = isc.Label.create({
                            ID: "diagInfo",
                            width: "100%",
                            styleName: "diagInfo",
                            autoFit: true
                        });
                // ===== DO NOT REMOVE =====
                            
                // basic grid        
                var grid = isc.ListGrid.create({
                    dataSource: countryDS,
                    dataFetchMode : "local",            position: "relative",
                    width : "100%",
                    align : "center",
                    autoFitData : "vertical",
                    autoFitMaxHeight : 400,
                    alternateRecordStyles : true,
                    canAddFormulaFields : true,
                    canAddSummaryFields : true,
                    canGroupBy : true,
                    canReorderFields : true,
                    showGroupSummary : true,
                    groupByMaxRecords : 5,
                    useAdvancedFieldPicker: true,
                    advancedFieldPickerThreshold: 5,
                    autoDraw: false
                });    
                
                    
                // the main page layout - place all other components afetr diagLabel
                var layout = isc.VLayout.create({
                    width:"100%",
                    membersMargin: 20,
                    members: [
                        // ===== DO NOT REMOVE diagLabel
                        diagLabel,
                        isc.DynamicForm
                                            .create({
                                                id: "form",
                                                titleWidth : 40,
                                                autoDraw : false,
                                                fields : [ {
                                                    name : "pageNumber",
                                                    title : "Page",
                                                    type : "select",
                                                    valueMap: ["1", "2", "3"],
                                                    width : 80,
                                                    changed : function(form, item) {
                                                        fetchPage(item.getValue());
                                                    }
                                                } ]
                                            }),
                        // ===== place anty components here
                        
                        grid
                                
                    ]
                });
                
                var fetchPage = function(page) {
    
                    grid.fetchData(null, function(dsResponse, data, dsRequest) {
                            isc.warn("Returned " + data.length + " records",
                                        null, {
    
                                            buttons : [ Dialog.OK ]
                                        });
                    });
                }
                    
            </script>
    
        </body>
    
    </html>
    Click image for larger version

Name:	3-16-2016 11-51-59 AM.png
Views:	129
Size:	67.9 KB
ID:	235882


    As mentioned, this works in Chrome and in SmartClient_v91p_2014-04-10_PowerEdition. I tested a few previous 10.1 versions and they still had the issue.

    Looking at the debug JS, looks like something changed with focus on the dynamic form, but that's all I could ascertain.
    Attached Files

    #2
    Did you intend to attach the data file SNQA-1219-1.json which the code tries to load?

    Comment


      #3
      Yes, sorry about that. Here it is. You will need to rename it to .json.
      Attached Files

      Comment


        #4
        We've made a fix for this that will be applied to affected branches. It should be in the nightlies dated 2016-03-17 and later.

        Comment

        Working...
        X