Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

9.1 Regression (04/07): Javascript error when hovering over form elements

$
0
0
This problem occurs in the latest drop, 9.1p 04/07, but does not occur on 9.1p 04/03.

- Load the test case
- open console (I used firebug)
- Click filter to open dialog
- Add a new filter clause
- Move mouse over any of the criteria clause form elements
- Note the following error appears in console:
Code:

TypeError: this.$169 is not a function
http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Forms.js
Line 826

Test Case:
Code:

<!DOCTYPE html>

<html>
        <head>

                <title></title>
               
                <style>
                        .diagInfo {
                                font-size: 14px;
                                font-weight: bold;
                                padding: 5px;
                        }
                </style>
               
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Core.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Foundation.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Containers.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Grids.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Forms.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_DataBinding.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Drawing.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_PluginBridges.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Charts.js"></script>       
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/system/development/ISC_Tools.js"></script>
                <script type="text/javascript" SRC="http://an2605.pitnet.com:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
       
                <script type="text/javascript" >
                        var isomorphicDir="http://an2605.pitnet.com:8080/isomorphic/";
                       
                        // set this to the correct JIRA ticket
                        var jiraTicket = "SNQA-439";
                       
                        // test data
                        var data = [
                                {inspectorID:12345, region:"Northeast", inspections:206, observations:913,lastInspectionDate:new Date(2012, 8, 13), index:52.6 },
                                {inspectorID:67890, region:"West", inspections:66, observations:2,lastInspectionDate:new Date(2013, 2,2), index:75.3 },
                                {inspectorID:54321, region:"Northeast", inspections:4, observations:67,lastInspectionDate:new Date(2013,2,3), index:75.3 },
                                {inspectorID:09876, region:"South", inspections:24, observations:0,lastInspectionDate:new Date(2012,8,31), index:52.6 }
                        ];
                        // datasource for the grid               
                        isc.DataSource.create({
                                ID: "ds",
                                fields: [
                                        {name:"inspectorID", title:"Inspector ID", type:"integer", showIf:"false" }, // hidden
                                        {name:"inspections", type:"integer", title:"Number of Inspections Total"},
                                        {name:"observations", title:"# Observations"},
                                        {name:"region", type:"text", title:"Region/Country"},
                                        {name:"lastInspectionDate", type:"date", title:"Last Inspection"}
                                ],
                                cacheData:data,
                                clientOnly: true
                        });
                       
                        // once page loads set some diagnostic information
                        isc.Page.setEvent("load", function() {
                                document.title = jiraTicket + "  (SmartClient version " + isc.versionNumber + ")";
                                var html = [];
                                html.push("Jira: " + jiraTicket);
                                html.push("SmartClient: " + isc.versionNumber);
                                html.push("Browser: " + navigator.appCodeName + " " + navigator.appName + " " + navigator.appVersion);
                                diagLabel.setContents( html.join("<br>"));
                        });
                       
                        var criteria = {
                                _constructor : "AdvancedCriteria",
                                operator : "and",
                                criteria : [ {
                                        fieldName : "inspectorID",
                                        operator : "equals",
                                        value : [ 12345 ]
                                } ]
                        };
               
                </script>

        </head>
       
        <body>
                <script>
               
                        // this laebl should not be removed, all test cases should have this
                        var diagLabel = isc.Label.create({
                                                ID: "diagInfo",
                                                width: "100%",
                                                styleName: "diagInfo",
                                                autoFit: true
                                        });

                        // basic grid               
                        var grid = isc.ListGrid.create({
                                dataSource: ds,
                                dataFetchMode : "local",
                                autoFetchData: true,
                                clientOnly: true,
                                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
                        });       
                                       
                        var filter = isc.FilterBuilder.create({
                                        dataSource : ds,
                                        topOperatorAppearance : "radio",
                                        allowEmpty : true,
                                        height : 10
                                });


                        var dialog = isc.Window.create({
                                        width : 600,
                                        height : 350,
                                        title : "Filter Grid",
                                        canDragReposition : true,
                                        canDragResize : true,
                                        padding : 10,
                                        autoCenter : true,
                                        autoDraw : false,
                                        items : [ filter,
                                                isc.HLayout.create({
                                                        ID : "PSC_ParentChartLayout",
                                                        membersMargin : 25,
                                                        defaultLayoutAlign : "center",
                                                        align : "center",
                                                        width : "100%",
                                                        height : 10,
                                                        members : [ isc.IButton.create({
                                                                ID : "filterButton",
                                                                title : "Filter",
                                                                click : function() {
                                                                        grid.filterData( filter.getCriteria() );
                                                                }
                                                        }), isc.IButton.create({
                                                                ID : "clearFilterButton",
                                                                title : "Clear Filter",
                                                                click : function() {
                                                                        filter.clearCriteria();
                                                                        grid.filterData( filter.getCriteria );
                                                                }
                                                        }) ]
                                                })
                                        ]
                                });
               
                        // the main page layout - place all other components afetr diagLabel
                        isc.VLayout.create({
                                width:"100%",
                                membersMargin: 20,
                                members: [
                                        // this must remain here to output diagnostic information
                                        diagLabel,
                                        // add any other components here
                                        grid,
                                        isc.Button.create({
                                                title:"Filter",
                                                click:function() { dialog.show(); }
                                        })
                                ]
                        });
                               
                </script>

        </body>

</html>


Viewing all articles
Browse latest Browse all 4756

Trending Articles