ICEfaces
  1. ICEfaces
  2. ICE-5869

Mojarra 2.0.3 release State-Saving issues with Glimmer samples

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta1
    • Fix Version/s: 2.0-Beta1
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      mojarra-2.0.3-FCS-binary
      Glimmer revision: 21849
    • Assignee Priority:
      P1

      Description

      mojarra-2.0.3-FCS-binary
      Glimmer revision: 21849
      Server: Tomcat 6.0.26
      Browser: FF3.6

      Following are the sample test results:

      1. Compat basic: clicking on the Show/Hide button or the reload button on ICEfaces page causes Server Internal Error message displaying on the page. Exception thrown to the server:
      6-Jul-2010 3:48:52 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
      SEVERE: Error Rendering View[/icefaces.xhtml]
      java.lang.IllegalStateException: Component ID debugPanel has already been found in the view.
              at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820)
              at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804)
              at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(StateManagementStrategyImpl.java:134)

      2. Compat showcase:
      - Menu bar: the sub menu does not display
      - Split pane panel: the divider is not draggable
      - Charts: When choosing chart type, server internal error message shows on the page and exceptions throw:

      6-Jul-2010 3:33:37 PM org.icepush.servlet.EnvironmentAdaptingServlet <init>
      INFO: Adapting to Thread Blocking environment
      javax.faces.FacesException: Unexpected error restoring state for component with id iceform:radialOuputChart.
      Cause: java.lang.IllegalStateException: java.lang.InstantiationException: com.icesoft.faces.component.outputchart.PieChart.
              at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:250)
              at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147)

      3. Tested successfully
      - auction
      - compat auction
      - basic
      - scopes
      - fajax
      - elementUpdate

        Activity

        Hide
        Ted Goddard added a comment -

        1. Can be reproduced by adding <ui:debug> to basic.

        Show
        Ted Goddard added a comment - 1. Can be reproduced by adding <ui:debug> to basic.
        Hide
        Joanne Bai added a comment -
        • Menu bar: the sub menu does not display
        • Split pane panel: the divider is not draggable

        Those two failures in compat showcase are current glimmer regressions. Only Charts seems specific to JSF2.0.3.

        Show
        Joanne Bai added a comment - Menu bar: the sub menu does not display Split pane panel: the divider is not draggable Those two failures in compat showcase are current glimmer regressions. Only Charts seems specific to JSF2.0.3.
        Hide
        Ted Goddard added a comment - - edited

        Chart components were failing due to a lack of no-arg constructors. This change has been checked in.

        Show
        Ted Goddard added a comment - - edited Chart components were failing due to a lack of no-arg constructors. This change has been checked in.
        Hide
        Ted Goddard added a comment -

        Fixes for issues believed to be specific to JSF 2.0.3 have been checked in.

        Show
        Ted Goddard added a comment - Fixes for issues believed to be specific to JSF 2.0.3 have been checked in.
        Hide
        Joanne Bai added a comment -

        Verified using Glimmer revision 21897 (tomcat6.0.26 + FF3.6)

        1. Compat basic: tested with success

        2. Compat showcase

        • Charts: Error and exception are not seen. But, if clicking on the chart image (i.e. bars), the image flashes and no output displayed for Image Map Value
        Show
        Joanne Bai added a comment - Verified using Glimmer revision 21897 (tomcat6.0.26 + FF3.6) 1. Compat basic: tested with success 2. Compat showcase Charts: Error and exception are not seen. But, if clicking on the chart image (i.e. bars), the image flashes and no output displayed for Image Map Value
        Hide
        Ted Goddard added a comment -

        The following JavaScript error appears when JSF is upgraded to 2.0.3:

        TypeError: Result of expression 'detect(parents(element), function(e)

        { return e.configuration; }

        )' [null] is not an object.

        Show
        Ted Goddard added a comment - The following JavaScript error appears when JSF is upgraded to 2.0.3: TypeError: Result of expression 'detect(parents(element), function(e) { return e.configuration; } )' [null] is not an object.
        Hide
        Ted Goddard added a comment -

        AbstractChart is now Serializable.

        Code from mojarra StateHolderSaver shows that non-serializable "attached objects" will be restored purely from their class name. This causes state to be lost in this case, so serialization is required.

        public StateHolderSaver(FacesContext context, Object toSave) {
        className = toSave.getClass().getName();

        if (toSave instanceof StateHolder) {
        // do not save an attached object that is marked transient.
        if (!((StateHolder) toSave).isTransient())

        { savedState = (Serializable) ((StateHolder) toSave).saveState(context); }

        else

        { className = null; }

        } else if (toSave instanceof Serializable)

        { savedState = (Serializable) toSave; className = null; }

        }

        Show
        Ted Goddard added a comment - AbstractChart is now Serializable. Code from mojarra StateHolderSaver shows that non-serializable "attached objects" will be restored purely from their class name. This causes state to be lost in this case, so serialization is required. public StateHolderSaver(FacesContext context, Object toSave) { className = toSave.getClass().getName(); if (toSave instanceof StateHolder) { // do not save an attached object that is marked transient. if (!((StateHolder) toSave).isTransient()) { savedState = (Serializable) ((StateHolder) toSave).saveState(context); } else { className = null; } } else if (toSave instanceof Serializable) { savedState = (Serializable) toSave; className = null; } }
        Hide
        Joanne Bai added a comment -

        Charts demo is verified successfully on Glimmer revision 21929 using Tomcat 6 + IE8 and FF3.6. Close it!

        Show
        Joanne Bai added a comment - Charts demo is verified successfully on Glimmer revision 21929 using Tomcat 6 + IE8 and FF3.6. Close it!

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Joanne Bai
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: