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

A book can't reset to another book-series

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.0.0 RC
    • Fix Version/s: 3.0.0 RC
    • Component/s: ZSS Server Side
    • Labels:
      None

      Description

      To reproduce.
      1.There is a book series book1.xlsx, book2.xlsx, if book1 has cell(A1) refers to [book2.xlsx]Sheet1!B1
      2.Use another book3.xlsx, and make it book-series with book2.xlsx (use the same book2 instance),
      3.Then update book2-Sheet1!B1, you will get a NPE, it was cause by spreadsheet try to update book1-Sheet!A1 but it miss-updates to book3.

      (Note, You shouldn't just avoid the check of null cell in bookhleper line 302, should remove the wrong dependence after reset book-series)

      >>java.lang.NullPointerException
      >> at org.zkoss.zss.model.sys.impl.BookHelper.reevaluate(BookHelper.java:302)
      >> at org.zkoss.zss.model.sys.impl.BookHelper.reevaluateAndNotify(BookHelper.java:462)
      >> at org.zkoss.zss.model.sys.impl.XRangeImpl.reevaluateAndNotify(XRangeImpl.java:434)
      >> at org.zkoss.zss.model.sys.impl.XRangeImpl.setEditText(XRangeImpl.java:398)
      >> at org.zkoss.zss.api.impl.RangeImpl.setCellEditText(RangeImpl.java:606)
      >> at org.zkoss.zss.ui.Spreadsheet.processStopEditing0(Spreadsheet.java:4389)
      >> at org.zkoss.zss.ui.Spreadsheet.processStopEditing(Spreadsheet.java:4352)
      >> at org.zkoss.zss.ui.Spreadsheet.access$42(Spreadsheet.java:4350)
      >> at org.zkoss.zss.ui.Spreadsheet$2.onEvent(Spreadsheet.java:319)
      >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2748)
      >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2719)
      >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2660)
      >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717)
      >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502)
      >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1212)
      >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600)
      >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
      >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491)
      >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      >> at org.mortbay.jetty.Server.handle(Server.java:326)
      >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

        Activity

        Hide
        dennis dennis added a comment -

        currently api to break it directly, however you could make them a standalone series to break it.

        for example, for the case, BookSeriesBuilder.getInstance().buildBookSeries(book1,book2);

        you make book1 a standalone series to break the dependency
        BookSeriesBuilder.getInstance().buildBookSeries(book1);

        Show
        dennis dennis added a comment - currently api to break it directly, however you could make them a standalone series to break it. for example, for the case, BookSeriesBuilder.getInstance().buildBookSeries(book1,book2); you make book1 a standalone series to break the dependency BookSeriesBuilder.getInstance().buildBookSeries(book1);
        Hide
        dennis dennis added a comment -

        fixed since 2013/6/10

        Show
        dennis dennis added a comment - fixed since 2013/6/10

          People

          • Assignee:
            dennis dennis
            Reporter:
            dennis dennis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: