Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-146

TableView reset() method must reset m_objCachedTableModelValue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 3.0
    • None
    • Contrib
    • None
    • Operating System: Other
      Platform: Other
    • 28012

    Description

      Now in TableView.reset() method

      public void reset()
      {
      m_objTableModel = null;
      storeSessionState(null);
      }

      but we also need to reset m_objCachedTableModelValue,
      because now in
      public ITableModel getTableModel()
      {
      // if null, first try to recreate the model from the session state
      if (m_objTableModel == null)

      { Serializable objState = loadSessionState(); m_objTableModel = getTableSessionStateManager().recreateTableModel (objState); }

      // if the session state does not help, get the model from the binding
      if (m_objTableModel == null)
      m_objTableModel = getCachedTableModelValue();

      // if the model from the binding is null, build a model from source
      and columns
      if (m_objTableModel == null)
      m_objTableModel = generateTableModel(null);

      if (m_objTableModel == null)
      throw new ApplicationRuntimeException(TableUtils.format("missing-
      table-model", getExtendedId()));

      return m_objTableModel;
      }

      When call getTableModel() after reset(), the table model will still be cached
      table model.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erazor_kwan@hotmail.com Alex Kwan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: