左邊的工具欄是在stencil-controller.js中獲取的,右側和頂部是在oryx.debug.js里獲取的兩個地方,不知道是什么原因造成了這個錯誤
TypeError: Cannot read property 'split' of undefined
at Object.ORYX.Core.StencilSet.stencilSet (oryx.debug.js:8640)
at oryx.debug.js:8619
at prototype-1.5.1.js:446
at Array.Object.extend._each (prototype-1.5.1.js:672)
at Array.Enumerable.each (prototype-1.5.1.js:445)
at Object.ORYX.Core.StencilSet.stencilSets (oryx.debug.js:8618)
at ORYX.Editor.getStencilSets (oryx.debug.js:11705)
at ORYX.Editor._createCanvas (oryx.debug.js:11192)
at ORYX.Editor.construct (oryx.debug.js:10921)
at classDef (oryx.debug.js:1747)(anonymous function) @ angular.min.js:85a.$get @ angular.min.js:63l.promise.then.B @ angular.min.js:94l.promise.then.B @ angular.min.js:94(anonymous function) @ angular.min.js:95a.$get.h.$eval @ angular.min.js:103a.$get.h.$digest @ angular.min.js:101a.$get.h.$apply @ angular.min.js:104g @ angular.min.js:68I @ angular.min.js:72y.onreadystatechange @ angular.min.js:73

at Object.ORYX.Core.StencilSet.stencilSet (oryx.debug.js:8640)
at oryx.debug.js:8619
at prototype-1.5.1.js:446
at Array.Object.extend._each (prototype-1.5.1.js:672)
at Array.Enumerable.each (prototype-1.5.1.js:445)
at Object.ORYX.Core.StencilSet.stencilSets (oryx.debug.js:8618)
at ORYX.Editor.getStencilSets (oryx.debug.js:11705)
at ORYX.Editor._createCanvas (oryx.debug.js:11192)
at ORYX.Editor.construct (oryx.debug.js:10921)
at classDef (oryx.debug.js:1747)(anonymous function) @ angular.min.js:85a.$get @ angular.min.js:63l.promise.then.B @ angular.min.js:94l.promise.then.B @ angular.min.js:94(anonymous function) @ angular.min.js:95a.$get.h.$eval @ angular.min.js:103a.$get.h.$digest @ angular.min.js:101a.$get.h.$apply @ angular.min.js:104g @ angular.min.js:68I @ angular.min.js:72y.onreadystatechange @ angular.min.js:73
本來應該傳回到JS頁面的直接是json字符串,然后他調用eval("this._jsonObject =" + response.responseText);直接轉換成json對象,但是我獲取到的卻是帶轉義字符的json字符串
,


所以程序中默認使用的eval("this._jsonObject =" + response.responseText)沒給轉換成json對象,
給轉成了json字符串,造成了里面的任何屬性都獲取不到是undefined,需要再轉換一次才能變成json對象,造成里面所有的屬性都取不到,困擾了2天了終於解決了(估計可能是少了哪個包也不知道是哪個環節出錯了,但是后台不報錯,網上也看到一些朋友遇到這問題也是使用了shiro,但是應該不是shiro的問題,我估計可能是activiti-json-converter-5.19.0.jar包有什么依賴包,我沒有導入,導致在讀取stencilset.json時,里面的轉義字符也被返回成字符串到前台沒有做處理,內部應該有處理的


)
具體修改如下:
左邊的工具欄是在stencil-controller.js中獲取的
在72行左右添加,data就是后台返回的帶有轉義字符的json字符串,由於這里的是帶有轉義字符的完全沒有轉換的,因此需要轉換兩次,第一次轉換為json字符串,第二次轉換為json對象


右側和頂部是在oryx.debug.js中獲取的
在8495行左右



暫時只能這樣處理,如果有更好的方式找到在返回頁面json字符串時內部是如何處理的,希望能告知一下~