Announcement

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

    setFields bug in 8.0 Pro

    Greetings,

    I installed the new version 8.0 Pro we just purchased. I suddenly began having problems with listGrid.setFields(). I'm getting "object doesn't support property or method" in ISC_DataBinding.js. I rolled my /system/modules/ javascript libraries back to the previous version I was using, which is "SC_SNAPSHOT-2011-03-16".
    That corrected the problem.

    So this must be a new bug in the GA 8.0 version. Since nightly builds are not GA, is there a patch for this?

    Thanks,
    Stan

    TRACE:
    Code:
    14:44:29.350:INFO:Log:isc.Page is loaded
    14:44:29.787:XRP3:WARN:Log:firing the callback from global eval with...
    14:44:29.787:XRP3:WARN:Log:viewLoader is:[ViewLoader ID:tabsetViewLoader1]
    14:44:31.272:IFCS7:WARN:DynamicForm:reinGroupForm:call to deprecated method 'setEnabled()' - use 'setDisabled()' instead.
    14:44:33.662:WARN:Log:Error:
    	'Object doesn't support this property or method'
    	in http://vkurapati.highlinedata.com:81/iap/include/isomorphic/system/modules/ISC_DataBinding.js
    	at line 287
        [c]DataSource.checkEmptyCriteria(_1=>Obj)
        Canvas.filterWithCriteria(_1=>Obj, _2=>Obj{ID:SearchResults_fetch}, _3=>Obj)
        Canvas.$wo(_1=>"fetch", _2=>Obj, _3=>undef, _4=>Obj)
        Class.invokeSuper(_1=>null, _2=>"$wo", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
        Class.Super(_1=>"$wo", _2=>Array[4], _3=>Obj{length:4})
        ListGrid.$wo(_1=>"fetch", _2=>Obj, _3=>undef, _4=>Obj, _5=>undef)
        Canvas.fetchData(_1=>Obj, _2=>undef, _3=>undef)
        setFields(rpcResponse=>Obj,  entity=>"name")
        callback(rpcResponse=>Obj, data=>Array[8], rpcRequest=>Obj)
            "setFields(rpcResponse,'name')"
        [c]Class.fireCallback(_1=>"setFields(rpcResponse,'name')", _2=>"rpcResponse,data,rpcRequest", _3=>Array[3], _4=>[RPCManager ID:builtinApplication], _5=>undef) on [Class RPCManager]
        Class.fireCallback(_1=>"setFields(rpcResponse,'name')", _2=>"rpcResponse,data,rpcRequest", _3=>Array[3], _4=>undef)
        [c]RPCManager.fireReplyCallback(_1=>"setFields(rpcResponse,'name')", _2=>Obj, _3=>Obj, _4=>Array[8])
        [c]RPCManager.fireReplyCallbacks(_1=>Obj, _2=>Obj)
        [c]RPCManager.performOperationReply(_1=>Obj, _2=>Obj)
        [c]RPCManager.$39d(_1=>11)
        [c]RPCManager.performTransactionReply(_1=>11, _2=>"//isc_RPCResponseStart-->[{data:[{width:..."[1037], _3=>undef)
        callback(transactionNum=>11, results=>Obj, wd=>undef)
            "isc.RPCManager.performTransactionReply(transactionNum,results,wd)"
        ** recursed on [c]Class.fireCallback

    #2
    It's unclear if this a usage issue or a bug - this stack trace suggests you may be passing AdvancedCriteria with no _constructor:"AdvancedCriteria"?

    Have you checked whether your code works in a recent nightly? Regardless of what you ultimately deploy with, this is a good idea in case you manage to find a bug that affects only you and wouldn't have been corrected for the next release.

    Comment


      #3
      I tried it with the javascript files from snapshot-2011-04-22 and it works fine. It's only with the actual GA release we purchased that I have the problem. Your website states that nightly builds aren't necessarily production quality, so I'm leery of using that for our production builds. The code I'm having trouble with I wrote months ago and it hasn't been touched since. It's been working fine. It's only with the GA release we purchased that it doesn't work.

      The code for the listgrid is:
      Code:
      	isc.ListGrid.create({
      	    ID: "searchResultsList",
      	    loadingDataMessage:"Loading...",
      	    dataSource:"SearchResults",
      		width:panelWidth-5,
      		bodyBackgroundColor:"#FFFFFF",
      		alternateRecordStyles:true,
      		selectionAppearance:"checkbox",
      	    autoFetchData:false,
      	    height:250,
      	    headerHeight:30,
      	    wrapCells:true,
      	    cellHeight:30,
      	    left:0,
      		autoDraw:false,
      		dataArrived: function(startRow, endRow) {
      			//No longer used 1/24/2011 svm
      			//searchResultsRowCount = endRow;
      			if (setResultsPanel == true) {
      				setupResultsPanel(globalEntity, endRow);
      				setResultsPanel = false;
      			}
      		},
      	    getCellCSSText: function (record, rowNum, colNum) {
      			if ((record.dpw == <%=UserInterface.VALUE_NOT_FILED_FLAG%>) && colNum == 4){
      				return "font-weight:normal; color:gray;";
      			}else if ((record.dpw == <%=UserInterface.VALUE_NOT_FILED_FLAG%>) && colNum == 5){
      				return "font-weight:normal; color:gray;";
      			}
      		},
      		cellClick: function (record, rowNum, colNum) {
      			if (colNum == 1) {
      				eval("showOrgChart(" + record.group_code + "," + record.ins_type + ")");
      			}
      			if (colNum == 2) {
      				layoutViewController('companyIntelligence',7);
      								eval("document.location.href= '/iap/ng/jsp/companyIntelligence/viewCompanyIntel.jsp?it=" + record.ins_type + "&cc=" + record.company_code_dis + "'");
      			}
      		}
      	});
      The code that sets the fields is:
      Code:
      			    isc.RPCManager.sendRequest({
      					containsCredentials: false,
      					actionURL:"/iap/ng/jsp/advancedSearch/searchDataMgr.jsp?cmd=name",
      					useSimpleHttp: false,
      					timeoutErrorMessage:"Operation timed out.",
      					prompt:"Searching...",
      					showPrompt: true,
      				    willHandleError:false,
      				    data : {
      				       searchType: '<%=UserInterface.SEARCH_TYPE_NAME%>',
      				       insType: <%=UserInterface.GLOBAL_SEGMENT_ID%>.getValue()
      			    	},   
      				    callback : "setFields(rpcResponse,'" + entity + "')"
      			    });
      And the callback function:
      Code:
      		criteria = {criteria:simpleSearchForm.getItem('companyQuickSearchField').getValue(),
                         insType:<%=UserInterface.GLOBAL_SEGMENT_ID%>.getValue(),
                         searchType: <%=UserInterface.SEARCH_TYPE_NAME%>,
                         filingType: reinGroupForm.getField('groupAndNon').getValue()};
      
      ....
      
      			searchResultsList.setFields(rpcResponse.data);
      			searchResultsList.fetchData(criteria, setResultsPanelTrue());
      			searchResultsList.show();

      Comment


        #4
        It's hard to tell if this is a usage issue or not (still a possibility, even if the current version avoids a crash - after all we have zero similar reports), but, we'd recommend moving to the nightly anyway, as we are closing in on a new release and focusing on bugfixes and samples right now- the nightlies are quite stable and getting more so.

        Comment


          #5
          There's also another problem. When I install the nightly build code from the 4-22 snapshot, it corrects the setFields problem I mention above, but it breaks another section of our code. With this new code, I keep getting a "dataPath" error from the form module. This also has not been modified in months, and worked perfectly with the version 8 code we used (before the nightly build). But when I install the snapshot, it breaks this other section of our application. So at this point, we're unable to work with version 8 at all. And this of course is an enormous problem because we are in beta, and we've begun using features in version 8.

          The only version 8 code that works all the way around for us is the version 8 trial version. I'll try your latest snapshot and see what happens.

          Comment


            #6
            Whether this other problem is a usage error or actual bug, we'd love to help, but you haven't provided any details - urgency doesn't help without details.

            Comment


              #7
              I've discovered the problem and solution. It's not exactly a bug, but a change in your code that interfered with our code. It only exists in your GA release build, not in your recent nightly builds.

              I built a test case using two different criteria sets to be passed in using fetchData(criteria);
              Code:
              criteria1 = { criteria:1,
              		 insType:1,
              		 searchType:1,
              		 filingType:1};		
              
              criteria2 = { criteria:'ace',
              		 insType:1,
              		 searchType:1,
              		 filingType:1};
              
              resultsList.fetchData(criteria1);
              The criteria1 works, criteria2 does not work. The correction I made was that I changed the word 'criteria:' to 'searchCriteria:' and that solved the problem. Apparently, naming the reference 'criteria' was an issue. This only occurs in your GA 8 pro release. It doesn't occur in the most recent nightly build or in version 8 trial, or in version 7.

              I'm going to rollback to the Version 8 GA release and not use the nightly because the most recent one breaks another section of our code (the dataPath error). Rather than spend time on that I'm just going to move forward with this solution and deal with the dataPath problem when I have to.

              Thanks,
              S

              Comment


                #8
                We strongly urge you to provide just the basic diagnostic information we always request on the dataPath issue. Your (vague) report is the only one we have on this issue - if it turns out to be a real bug, if you don't supply information that should take just minutes to gather, it might not be fixed.

                As far as the criteria / searchCriteria issue - this makes sense and is an already-corrected issue. The problem is that when AdvancedCriteria were introduced we added some checks that would try to figure out if a given Criteria was an AdvancedCriteria. These checks used to be fooled by a field being present called "criteria" but are now more sophisticated.

                Comment


                  #9
                  This is as much info I have at the moment regarding the dataPath error. The important thing to note is that it doesn't have anything to do with the object redirectButtonForm, because I can remove that object, and even all of the code around that object and I still get the same error. The stack trace is slightly different of course, but it's still a dataPath error in ISC_Forms.js. Unfortunately I don't have any time to create a simple test case right now.

                  Code:
                  17:31:11.528:WARN:Log:Error:
                  	''dataPath' is null or not an object'
                  	in http://iaqa.highlinedata.com/iap/include/isomorphic/system/modules/ISC_Forms.js
                  	at line 263
                      DynamicForm.initWidget(Obj{ID:redirectButtonForm}, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef)
                      Canvas.init(_1=>Obj{ID:redirectButtonForm}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
                      Class.completeCreation(_1=>Obj{ID:redirectButtonForm}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
                      [c]Class.create(_1=>Obj{ID:redirectButtonForm}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
                          "var _14=this.createRaw();_14=_14.completeCreation(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13);return _14"

                  Comment


                    #10
                    This indicates that in a DynamicForm without a DataSource, you've got a null entry in the items Array. This is always invalid, but would work anyway in the past.

                    This might be something really easy to fix like an extra comma in your code that puts together the items Array. This would then allow you to move forward with the latest version.

                    Comment

                    Working...
                    X