Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-1212

Select a sheet and a javascript error is thrown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.9.0
    • 3.8.3
    • None
    • Security Level: Jimmy
    • None
    • Sprint 5

      steps to reproduce

      1. load the attached excel file in firefox (or chrome)
        <spreadsheet id="ss" src="/WEB-INF/issue/1212-5.xlsx" maxVisibleRows="800" maxVisibleColumns="100" width="100%" 
        		height="90%" preloadColumnSize="5" preloadRowSize="5"
        		showContextMenu="true" showSheetbar="true" showToolbar="true" showFormulabar="true"/>
        
      2. click the 2nd sheet

      actual

      a javascript error is thrown.

      setAttr
      this.cells[0] is undefined (TypeError)
      zk.override.prepareFilterBtns_ @ zssex.wpd:22
      zk.override._prepareAutoFilterBtns @ zssex.wpd:22
      zk.override._prepareAllFilterBtns @ zssex.wpd:22
      zk.override.bind_ @ zssex.wpd:22
      zk.Widget.zk.$extends.bindChildren_ @ zk.wpd:16633
      zk.Widget.zk.$extends.bind_ @ zk.wpd:16603
      zk.Object.$supers @ zk.wpd:10629
      zss.CellBlockCtrl.zk.$extends.bind_ @ zss.wpd:10
      zk.Widget.zk.$extends.bindChildren_ @ zk.wpd:16633
      zk.Widget.zk.$extends.bind_ @ zk.wpd:16603
      zk.Object.$supers @ zk.wpd:10629
      zss.Panel.zk.$extends.bind_ @ zss.wpd:27
      zk.Object.$supers @ zk.wpd:10629
      zss.TopPanel.zk.$extends.bind_ @ zss.wpd:29
      zk.Widget.zk.$extends.bind @ zk.wpd:16566
      zk.Widget.zk.$extends.replaceChildHTML_ @ zk.wpd:16417
      zk.Widget.zk.$extends.replaceHTML @ zk.wpd:16328
      zk.Widget.zk.$extends.replaceWidget @ zk.wpd:15810
      zss.SSheetCtrl.zk.$extends.doSheetSelected @ zss.wpd:37
      zss.Spreadsheet.zk.$extends.$define.sheetId @ zss.wpd:2
      (anonymous function) @ zk.wpd:9897
      zk.copy._set2 @ zk.wpd:10331
      zk.Widget.zk.$extends.set @ zk.wpd:15568
      zAu.cmd1.setAttr @ zk.wpd:20279
      doProcess @ zk.wpd:19292
      doCmdsNow @ zk.wpd:19532
      zAu._doCmds @ zk.wpd:19780
      afterResponse @ zk.wpd:19424
      onResponseReady @ zk.wpd:19421
      XMLHttpRequest.send (async)
      ajaxSendNow @ zk.wpd:19484
      zAu.sendNow @ zk.wpd:19938
      (anonymous function) @ zk.wpd:19463
      setTimeout (async)
      ajaxSend2 @ zk.wpd:19463
      ajaxSend @ zk.wpd:19457
      zAu.send @ zk.wpd:19698
      zk.Widget.zk.$extends.sendAU_ @ zk.wpd:17069
      zk.Object.$supers @ zk.wpd:10655
      zss.Spreadsheet.zk.$extends.sendAU_ @ zss.wpd:2
      zk.Widget.zk.$extends.fireX @ zk.wpd:17048
      zk.Widget.zk.$extends.fire @ zk.wpd:17077
      zss.SheetSelector.zk.$extends.doSelectSheet @ zss.wpd:36
      zss.SheetSelector.zk.$extends._onSelectSheet @ zss.wpd:36
      (anonymous function) @ zk.wpd:10582
      zk.Widget.zk.$extends.fireX @ zk.wpd:17029
      _fireClick @ zk.wpd:14907
      zk.Widget.zk.$extends.doClick_ @ zk.wpd:17211
      zk.Object.$supers @ zk.wpd:10655
      zul.Widget.zk.$extends.doClick_ @ zk.wpd:22253
      zk.Object.$supers @ zk.wpd:10655
      zul.tab.Tab.zk.$extends.doClick_ @ zul.tab.wpd:910
      zk.Object.$supers @ zk.wpd:10629
      zss.SheetTab.zk.$extends.doClick_ @ zss.wpd:36
      _doEvt @ zk.wpd:18762
      (anonymous function) @ zk.wpd:18958
      jQuery.event.dispatch @ zk.wpd:5162
      elemData.handle @ zk.wpd:4833
      

      debug information

      • if we remove the filter, there is no js error.

      workaround

      • specify a bigger preloadColumnSize (> 7) or no specify can resolve this issue

            henrichen henrichen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: