Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      When an event, like a ValueChangeEvent or ActionEvent is being broadcast to a component within a UISeries, such as an ice:panelSeries or ice:dataTable, there are redundant calls to setRowIndex(int), which does redundant row state saving and datamodel accessing.

      This was originally discovered while working on ICE-4565, where it was noticed that after an ActionEvent, which causes a navigation, the UISeries' row state saving was still happening, which was incorrect.

        Activity

        Hide
        Mark Collette added a comment -

        TRUNK
        Subversion 19146
        icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java

        GLIMMER
        Subversion 19147
        glimmer\compat\components\src\main\java\com\icesoft\faces\component\panelseries\UISeries.java

        Show
        Mark Collette added a comment - TRUNK Subversion 19146 icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java GLIMMER Subversion 19147 glimmer\compat\components\src\main\java\com\icesoft\faces\component\panelseries\UISeries.java
        Hide
        Mark Collette added a comment -

        Before code change

        UISeries.broadcast() event: javax.faces.component.WrapperEvent[source=com.icesoft.faces.component.panelseries.PanelSeries@1155331]
        UISeries.broadcast() !RowEvent
        UISeries.setRowIndex() rowIndex: 0
        UISeries.broadcast() event: com.icesoft.faces.component.panelseries.UISeries$RowEvent[source=com.icesoft.faces.component.panelseries.PanelSeries@1155331]
        UISeries.broadcast() RowEvent
        UISeries.setRowIndex() rowIndex: 0
        TimeZoneBean.valueChangeListener event: javax.faces.event.ValueChangeEvent[source=com.icesoft.faces.component.ext.HtmlInputText@b5c292]
        UISeries.setRowIndex() rowIndex: 0
        UISeries.setRowIndex() rowIndex: -1
        UISeries.setRowIndex() rowIndex: -1
        UISeries.setRowIndex() rowIndex: 0
        UISeries.setRowIndex() rowIndex: 1
        UISeries.setRowIndex() rowIndex: 2
        UISeries.setRowIndex() rowIndex: -1
        UISeries.broadcast() event: javax.faces.component.WrapperEvent[source=com.icesoft.faces.component.panelseries.PanelSeries@1155331]
        UISeries.broadcast() !RowEvent
        UISeries.setRowIndex() rowIndex: 0
        UISeries.broadcast() event: com.icesoft.faces.component.panelseries.UISeries$RowEvent[source=com.icesoft.faces.component.panelseries.PanelSeries@1155331]
        UISeries.broadcast() RowEvent
        UISeries.setRowIndex() rowIndex: 0
        TimeZoneBean.actionListener event: javax.faces.event.ActionEvent[source=com.icesoft.faces.component.ext.HtmlCommandButton@f92ab0]
        UISeries.setRowIndex() rowIndex: 0
        UISeries.setRowIndex() rowIndex: -1
        UISeries.setRowIndex() rowIndex: 0
        UISeries.setRowIndex() rowIndex: 1
        UISeries.setRowIndex() rowIndex: 2
        UISeries.setRowIndex() rowIndex: -1

        After code change

        UISeries.broadcast() event: com.icesoft.faces.component.panelseries.UISeries$RowEvent[source=com.icesoft.faces.component.panelseries.PanelSeries@6e1034]
        UISeries.broadcast() RowEvent
        UISeries.setRowIndex() rowIndex: 0
        TimeZoneBean.valueChangeListener event: javax.faces.event.ValueChangeEvent[source=com.icesoft.faces.component.ext.HtmlInputText@1e9ed1f]
        UISeries.setRowIndex() rowIndex: -1
        UISeries.setRowIndex() rowIndex: -1
        UISeries.setRowIndex() rowIndex: 0
        UISeries.setRowIndex() rowIndex: 1
        UISeries.setRowIndex() rowIndex: 2
        UISeries.setRowIndex() rowIndex: -1
        UISeries.broadcast() event: com.icesoft.faces.component.panelseries.UISeries$RowEvent[source=com.icesoft.faces.component.panelseries.PanelSeries@6e1034]
        UISeries.broadcast() RowEvent
        UISeries.setRowIndex() rowIndex: 0
        TimeZoneBean.actionListener event: javax.faces.event.ActionEvent[source=com.icesoft.faces.component.ext.HtmlCommandButton@ceb62f]
        UISeries.setRowIndex() rowIndex: -1
        UISeries.setRowIndex() rowIndex: 0
        UISeries.setRowIndex() rowIndex: 1
        UISeries.setRowIndex() rowIndex: 2
        UISeries.setRowIndex() rowIndex: -1

        Show
        Mark Collette added a comment - Before code change UISeries.broadcast() event: javax.faces.component.WrapperEvent [source=com.icesoft.faces.component.panelseries.PanelSeries@1155331] UISeries.broadcast() !RowEvent UISeries.setRowIndex() rowIndex: 0 UISeries.broadcast() event: com.icesoft.faces.component.panelseries.UISeries$RowEvent [source=com.icesoft.faces.component.panelseries.PanelSeries@1155331] UISeries.broadcast() RowEvent UISeries.setRowIndex() rowIndex: 0 TimeZoneBean.valueChangeListener event: javax.faces.event.ValueChangeEvent [source=com.icesoft.faces.component.ext.HtmlInputText@b5c292] UISeries.setRowIndex() rowIndex: 0 UISeries.setRowIndex() rowIndex: -1 UISeries.setRowIndex() rowIndex: -1 UISeries.setRowIndex() rowIndex: 0 UISeries.setRowIndex() rowIndex: 1 UISeries.setRowIndex() rowIndex: 2 UISeries.setRowIndex() rowIndex: -1 UISeries.broadcast() event: javax.faces.component.WrapperEvent [source=com.icesoft.faces.component.panelseries.PanelSeries@1155331] UISeries.broadcast() !RowEvent UISeries.setRowIndex() rowIndex: 0 UISeries.broadcast() event: com.icesoft.faces.component.panelseries.UISeries$RowEvent [source=com.icesoft.faces.component.panelseries.PanelSeries@1155331] UISeries.broadcast() RowEvent UISeries.setRowIndex() rowIndex: 0 TimeZoneBean.actionListener event: javax.faces.event.ActionEvent [source=com.icesoft.faces.component.ext.HtmlCommandButton@f92ab0] UISeries.setRowIndex() rowIndex: 0 UISeries.setRowIndex() rowIndex: -1 UISeries.setRowIndex() rowIndex: 0 UISeries.setRowIndex() rowIndex: 1 UISeries.setRowIndex() rowIndex: 2 UISeries.setRowIndex() rowIndex: -1 After code change UISeries.broadcast() event: com.icesoft.faces.component.panelseries.UISeries$RowEvent [source=com.icesoft.faces.component.panelseries.PanelSeries@6e1034] UISeries.broadcast() RowEvent UISeries.setRowIndex() rowIndex: 0 TimeZoneBean.valueChangeListener event: javax.faces.event.ValueChangeEvent [source=com.icesoft.faces.component.ext.HtmlInputText@1e9ed1f] UISeries.setRowIndex() rowIndex: -1 UISeries.setRowIndex() rowIndex: -1 UISeries.setRowIndex() rowIndex: 0 UISeries.setRowIndex() rowIndex: 1 UISeries.setRowIndex() rowIndex: 2 UISeries.setRowIndex() rowIndex: -1 UISeries.broadcast() event: com.icesoft.faces.component.panelseries.UISeries$RowEvent [source=com.icesoft.faces.component.panelseries.PanelSeries@6e1034] UISeries.broadcast() RowEvent UISeries.setRowIndex() rowIndex: 0 TimeZoneBean.actionListener event: javax.faces.event.ActionEvent [source=com.icesoft.faces.component.ext.HtmlCommandButton@ceb62f] UISeries.setRowIndex() rowIndex: -1 UISeries.setRowIndex() rowIndex: 0 UISeries.setRowIndex() rowIndex: 1 UISeries.setRowIndex() rowIndex: 2 UISeries.setRowIndex() rowIndex: -1
        Hide
        Mark Collette added a comment -

        The old UISeries.queueEvent method called the super method with the wrapping RowEvent, which caused UIData to further wrap that in its own WrapperEvent. More importantly, UISeries.broadcast calls UIData.broadcast for any non-RowEvent event, causing UIData to do its WrapperEvent handling, and do row state saving operations, unwrap the event, passing the RowEvent to the UISeries, which then took similar actions. Cutting out the call to UIData.queueEvent has the effect of cutting out the call to that undesired block of code in UIData.broadcast.

        Show
        Mark Collette added a comment - The old UISeries.queueEvent method called the super method with the wrapping RowEvent, which caused UIData to further wrap that in its own WrapperEvent. More importantly, UISeries.broadcast calls UIData.broadcast for any non-RowEvent event, causing UIData to do its WrapperEvent handling, and do row state saving operations, unwrap the event, passing the RowEvent to the UISeries, which then took similar actions. Cutting out the call to UIData.queueEvent has the effect of cutting out the call to that undesired block of code in UIData.broadcast .

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: