Announcement

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

    Can't get setViewState to do anything, include throwing a parse error.

    Greetings,

    I'm using 70rC pro and passing a string to treegrid.setViewState doesn't seem to cause anything to happen. I've watched the developer console thinking I would see something, but nothing. So then I passed in a bogus string, expecting to see a parse error in the dev console, but nothing. I'm using the patch described in an earlier post for the header columns on treegrids, but if I remove that patch, that doesn't seem to help anything either. Any clues?

    Code:
    isc.TreeGrid.create({
    	indentSize:2,
    	cellHeight: 30,
    	showConnectors:false,
    	animateFolders:false,
    	cellPadding:0,
        iconSize:1,
        nodeIcon:"[SKIN]transparent_spacer.gif",
        dataSource:GlobalNavDataSource,
        leaveScrollbarGap:false,
        showHeader:false,
        showOpenIcons:false,
        showClosedIcons:false,
        loadingDataMessage:"Loading menu...",
        loadDataOnDemand:false,
        showHeaderContextMenu:false,
        autoFitData:"vertical",
        autoFitMaxRecords:1000,
        autoFitMaxHeight:1000,
        ID:"CITreeGrid",
        height:100,
        width:panelWidth,
        overflow:"visible",
        autoFetchData:true,
        initialCriteria: {panel: 2},    
        autoDraw:false,
        cellClick: function (record, rowNum, colNum) {
             eval(record.target_page_href);
        }
    })
    //doesn't generate an error
    CITreeGrid.setViewState("sfsdf");
    
    //actual test produces no results
    var test =  ({
        		selected:"[\r]", 
        		field:"[\r    {\r        name:\"nodeTitle\", \r        width:null\r    }\r]", 
        		sort:"({\r    fieldName:null, \r    sortDir:true\r})", 
        		open:"[\r    \"/7/8\", \r    \"/7/17/18\", \r    \"/7/17\", \r    \"/7\", \r    \"/\"\r]"
    			});
    
    CITreeGrid.setViewState(test);

    #2
    Okay I see the parse error now for the bogus string I'm passing, I must have missed it. However, I don't get a parse error for the setviewState, and it's not changing anything in the treeGrid.

    Here's additional log info if that helps:

    Code:
    15:56:54.350:INFO:Log:initialized
    15:56:54.709:WARN:TreeGrid:CITreeGrid:Unable to parse viewState object passed in: sfsdf Ignoring.
    15:56:54.740:DEBUG:TreeGrid:BasicsTreeGrid:setRect: {left: null,
    top: null,
    width: null,
    height: null}
    15:56:54.740:DEBUG:TreeGrid:BasicsTreeGrid:setRect: {left: null,
    top: null,
    width: null,
    height: null}
    15:56:55.006:INFO:Log:isc.Page is loaded
    15:56:55.021:DEBUG:visualState:isc_globalPrompt_blurb:state changed to: normal
    15:56:55.880:RDQ3:DEBUG:TreeGrid:CITreeGrid:delaying adjustOverflow: childResized
    15:56:56.037:RDQ3:DEBUG:TreeGrid:NewsTreeGrid:delaying adjustOverflow: childResized
    15:56:56.130:RDQ3:DEBUG:TreeGrid:IATreeGrid:delaying adjustOverflow: childResized
    15:56:56.208:TMR5[E]:DEBUG:TreeGrid:BasicsTreeGrid:delaying adjustOverflow: childResized
    15:56:56.302:TMR7[E]:DEBUG:TreeGrid:BasicsTreeGrid:delaying adjustOverflow: childResized
    15:56:56.396:TMR8[E]:DEBUG:TreeGrid:BasicsTreeGrid:delaying adjustOverflow: childResized

    Comment


      #3
      Just had to hammer at it for a while. I'm not sure exactly how I got it working, or why it wasn't working, so I can't post much information about what the problem was. It was likely how I was treating the string in javascript (like an object, not a string).

      Comment

      Working...
      X