ICEfaces
  1. ICEfaces
  2. ICE-7477

DataTable holds reference and saves state of non-serializable TablePanelConfig component

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta2
    • Fix Version/s: 3.0.RC1, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      To avoid the exceptions when running the example, you can set the following context parameter:


          <context-param>
              <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
              <param-value>false</param-value>
          </context-param>

      However, this is only a solution for environments where session serialization is not needed at all.
      Show
      To avoid the exceptions when running the example, you can set the following context parameter:     <context-param>         <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>         <param-value>false</param-value>     </context-param> However, this is only a solution for environments where session serialization is not needed at all.

      Description

      In testing the ACE Comp Suite application, the Data Table: Table Configuration example throws the following exception when running with MyFaces 2:

      Table Config throws java.io.NotSerializableException: org.icefaces.ace.component.tableconfigpanel.TableConfigPanel

      This will be a problem in any environment where the state gets serialized (serialized sessions in Tomcat, clusters, etc) but shows up more quickly with MyFaces because the implementation serializes the state far more frequently than Mojarra.

      The issue is that the DataTable component not only keeps a reference to the TablePanelConfig class (if one is active) but also tries to save it's state which is a bit of an unusual design.

      There are two possible solutions:

      1) Make TablePanelConfig and TablePanelConfigBase implement Serializable (which involved changing TablePanelConfigMeta to generate the proper code).

      2) Make the TablePanelConfig reference transient, and make sure it's only used as a cache for the getter method, which should fall back to searching for the component.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26516 Tue Nov 22 14:12:32 MST 2011 nils.lundquist ICE-7477 - ConfigPanel Redesign Cont.
             - Remove sizing from properties.
             - Removed requirement to use bi-directional 'for' attributes
             - Reflected changes on example
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tableconfigpanel/TableConfigPanelMeta.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTableConfigPanel.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tableconfigpanel/TableConfigPanel.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.css
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tableconfigpanel/TableConfigPanelRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableMeta.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/tableconfigpanel/tableconfigpanel.css
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26508 Tue Nov 22 11:32:34 MST 2011 nils.lundquist ICE-7477 - ConfigPanel Redesign.
             - Fixed internal component reference
             - Fixed addressing
             - Fixed updates from DataTable during filter/sort/reorder
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/core/core.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTableConfigPanel.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tableconfigpanel/TableConfigPanel.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/tableconfigpanel/tableconfigpanel.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tableconfigpanel/TableConfigPanelRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableMeta.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.js

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: