Announcement

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

    [bug] Creating a TreeGrid and putting it in a TabSet causes isFolder to be ignored.

    If I create a TreeGrid, then add it to a TabSet, the isFolder attribute that controls the (+) expander is ignored for the lowest level node that is showing.

    The bug doesn't reproduce if you have a TabSet, add a Layout to the TabSet, and then add the TreeGrid to the Layout after it is already on the TabSet (i.e. my workaround). The DataSource below is copy/pasted from a <isc:loadDS> tag.

    For clarity:
    (Layout with TreeGrid) added to (Tab) fails.
    (Layout) added to (Tab) -> add TreeGrid to (Layout) succeeds.

    SmartClient v9.1p_2014-06-26/Pro Deployment 2014-06-26
    Chrome 36.0.1985.125
    MacOSX 10.8.5

    Standalone test case:
    Code:
      <!doctype html>
      <html>
      <head>
        <SCRIPT>var isomorphicDir="../../isomorphic/";</SCRIPT>
        <SCRIPT SRC=../../isomorphic/system/modules/ISC_Core.js?isc_version=v9.1p_2014-06-26.js></SCRIPT>
        <SCRIPT SRC=../../isomorphic/system/modules/ISC_Foundation.js?isc_version=v9.1p_2014-06-26.js></SCRIPT>
        <SCRIPT SRC=../../isomorphic/system/modules/ISC_Containers.js?isc_version=v9.1p_2014-06-26.js></SCRIPT>
        <SCRIPT SRC=../../isomorphic/system/modules/ISC_Grids.js?isc_version=v9.1p_2014-06-26.js></SCRIPT>
        <SCRIPT SRC=../../isomorphic/system/modules/ISC_Charts.js?isc_version=v9.1p_2014-06-26.js></SCRIPT>
        <SCRIPT SRC=../../isomorphic/system/modules/ISC_DataBinding.js?isc_version=v9.1p_2014-06-26.js></SCRIPT>
        <SCRIPT SRC=../../isomorphic/skins/Enterprise/load_skin.js?isc_version=v9.1p_2014-06-26.js></SCRIPT>
    	</head>
    	<body>
        <script>
    
        isc.DataSource.create({
        allowAdvancedCriteria:true,
        ID:"SurveyDetailsOrgTreeDS",
        inheritsFrom:isc.DataSource.create({
            allowAdvancedCriteria:true,
            serverType:null,
            generatedBy:"v9.1p_2014-06-26/Pro Deployment 2014-06-26",
            xmlFromConfig:"true",
            ID:"SurveyDetailsOrgTreeDS_inheritsFrom",
            dataSourceVersion:"1",
            fields:[
                {
                    name:"childCount",
                    type:"integer"
                },
                {
                    name:"ancestorNodeId",
                    type:"integer"
                },
                {
                    name:"incompleteAttempts",
                    type:"integer"
                },
                {
                    name:"goalProximity",
                    type:"integer"
                },
                {
                    name:"overallScoreGoal",
                    type:"float"
                },
                {
                    name:"isOpen",
                    type:"boolean"
                },
                {
                    name:"id",
                    type:"integer"
                },
                {
                    name:"overallScore",
                    type:"float"
                },
                {
                    name:"orgNodeDescription",
                    type:"text"
                },
                {
                    name:"isFolder",
                    type:"boolean"
                },
                {
                    name:"nodeLevel",
                    type:"integer"
                },
                {
                    name:"overallScoreNearGoal",
                    type:"float"
                },
                {
                    name:"totalAttempts",
                    type:"float"
                }
            ]
        })
    ,
        fields:[
            {
                title:"ID",
                primaryKey:true,
                name:"id",
                type:"integer",
                required:true
            },
            {
                detail:true,
                rootValue:"0",
                name:"ancestorNodeId",
                type:"integer",
                required:true,
                foreignKey:"id"
            },
            {
                title:"Title",
                name:"orgNodeDescription",
                type:"text"
            },
            {
                title:"Total",
                name:"totalAttempts",
                type:"integer"
            },
            {
                title:"Score",
                name:"overallScore",
                type:"float"
            },
            {
                title:"Incomplete Attempts",
                name:"incompleteAttempts",
                type:"integer"
            },
            {
                name:"isFolder",
                type:"boolean"
            },
            {
                name:"isOpen",
                type:"boolean"
            }
        ]
    });
    
    			
    	isc.TreeGrid.create({
    		dataSource: SurveyDetailsOrgTreeDS,
    		ID : "hierarchyTree",
    		styleName: "hierarchyTree",
    		printAutoFit: true,
    		alternateRecordStyles: false,
    		showAllRecords: true,
    		dataProperties: {
    			openProperty: "isOpen"
    		},
    		autoDraw: false,
    		leaveScrollbarGap: false,
    		sortAscendingImage: null,
    		sortDescendingImage: null,
    		selectionType: "single",
    		folderIcon: null,
    		nodeIcon: null,
    		autoFitFieldWidths: true,
    		autoFitWidthApproach: "both",
    		autoFitMaxWidth: 130,
    		minFieldWidth: 90,
    		showGridSummary: true,
    		summaryRowStyle: "hierarchyTreeSummaryRow",
    		gridComponents: [
    			"header",
    			"summaryRow",
    			"body"
    		],
    		sortField: "orgNodeDescription",
    		width: "37%",
    		height: "100%",
    		autoFitWidthApproach: "both",
    		showResizeBar: true,
    		fields: [
    			{
    				name: "orgNodeDescription",
    				title: "Name",
    				align: "left",
    				cellAlign: "left",
    				width: "*",
    				autoFitWidth: true
    
    			},
    			{
    				name: "overallScore",
    				title: "Score",
    				align: "right",
    				cellAlign: "right",
    				autoFitWidth: true,
    				showGridSummary: true,
    				summaryFunction: function (records, summaryField) {
    					return "GOAL 90%";
    				}
    			},
    			{
    				name: "totalAttempts",
    				title: "Total Attempts",
    				align: "right",
    				cellAlign: "right",
    				autoFitWidth: true,
    				showGridSummary: false
    			},
    			{
    				name: "incompleteAttempts",
    				title: "Comments",
    				align: "right",
    				cellAlign: "right",
    				autoFitWidth: true,
    				showGridSummary: false
    			},
    			{
    				name: "isOpen",
    				title: "isOpen"
    			},
    			{
    				name: "isFolder",
    				title: "isFolder"
    			}
    		],
    		initialData: [
    			{
    				childCount:null,
    				ancestorNodeId:null,
    				incompleteAttempts:300,
    				isOpen:true,
    				id:1230,
    				overallScore:90.6,
    				orgNodeDescription:"CEO",
    				isFolder:true,
    				nodeLevel:8,
    				overallScoreNearGoal:null,
    				totalAttempts:1000
    			},
    			{
    				childCount:null,
    				ancestorNodeId:1230,
    				incompleteAttempts:300,
    				isOpen:true,
    				id:1231,
    				overallScore:90.6,
    				orgNodeDescription:"Vice President",
    				isFolder:true,
    				nodeLevel:7,
    				overallScoreNearGoal:null,
    				totalAttempts:1000
    			},
    			{
    				childCount:null,
    				ancestorNodeId:1231,
    				incompleteAttempts:200,
    				isOpen:false,
    				id:1234,
    				overallScore:90.6,
    				orgNodeDescription:"Manager",
    				isFolder:true,
    				nodeLevel:6,
    				overallScoreNearGoal:null,
    				totalAttempts:500
    			},
    			 {
    				childCount:null,
    				ancestorNodeId:1231,
    				incompleteAttempts:100,
    				isOpen:false,
    				id:1235,
    				overallScore:90.6,
    				orgNodeDescription:"Manager 2",
    				isFolder:true,
    				nodeLevel:6,
    				overallScoreNearGoal:null,
    				totalAttempts:500
    			}
    		]
    	
    	});
    	isc.HLayout.create({
    		ID: "hlay",
    		width: "100%",
    		height: "100%",
    		redrawOnResize: true,
    		autoDraw: false,
    		members: [hierarchyTree]
    	});
    	isc.SectionStack.create({
    		ID: "theSS",
    		width: "100%",
    		height: "100%",
    		autoDraw: true,
    		sections: [
    			{
    				items: hlay,
    				title: "title",
    				controls: [],
    				expanded: true,
    				canCollapse: false
    			}
    		]
    	});
    
    	var tab0 = {
    		name: "testtab",
    		title: "TreeGrid Bug",
    		pane: theSS,
    		tabSelected: function (tabSet, tabNum, tabPane, ID, tab, name) {
    			return false;
    		}
    	};
    
    	isc.TabSet.create({
    		ID: "mainLayout",
    		tabBarPosition: "top",
    		overflow: "auto",
    		position : "absolute",
    		top: 150,
    		left: 50,
    		width: isc.Page.getWidth() - 100,
    		height: isc.Page.getHeight() - 220,
    		redrawOnResize: true,
    		rememberHistory: false,
    		tabs: [tab0],
    		selectedTab: 0
    	});
    
    
    	</script>
    	</body>
    	</html>

    #2
    We've made a change to address this issue. Please try the next nightly build dated Aug 12 or above

    Regards
    Isomorphic Software

    Comment

    Working...
    X