ICEfaces
  1. ICEfaces
  2. ICE-1007

panelStack change is resetting state of contained components

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC

      Description

      As noted in the forum: http://www.icefaces.org/JForum/posts/list/0/2863.page#13993

      Apparently if a panelStack changes its panel, the state of the contained
      components is reset to null.

      need to verify

        Issue Links

          Activity

          Hide
          Philip Breau added a comment -

          verified

          Show
          Philip Breau added a comment - verified
          Hide
          Ken Fyten added a comment -

          Here's the bug details from the forum, they should be captured in the bug and
          not just linked to:

          I have a panelStack where each one has a selectOneRadio (something similar to
          the Component Showcase Demo).

          When I change the selected panel, the last selected radio button does not show
          up (just as happens in the demo).

          Well, my need is that every time I change the selected panel, the radio group
          component must show the current readio button selection.

          How can I do that? (I could'nt find out).

          In my page, the radio group is defined as:

          <ice:selectOneRadio layout="pageDirection"
          value="#

          {direcConsultor.conocimientoSelecId}

          "
          styleClass="grupoBotonesRadio"
          valueChangeListener="#

          {direcConsultor.opcionesConocimientoListener}

          " >
          <f:selectItems
          value="#

          {direcConsultor.listaOpcionesConocimientos}

          " />
          </ice:selectOneRadio>

          The listener is used to set the selected value and other component values.


          I found the answer. The lifecycle of Faces 1.5 pages is different from 1.0.1
          version. Now, when you change the selected stacked panel, it fires the
          setConocimientoSelecId method with a null value and so, the old selected value
          is lost.

          The workaround is to change the method to be like:

          public void setConocimientoSelecId(String conocimientoSelecId) {
          if (conocimientoSelecId != null)

          { this.conocimientoSelecId = conocimientoSelecId; }

          }

          This way, the old value is preserved and changes only when you click an option
          from the radio group.

          Show
          Ken Fyten added a comment - Here's the bug details from the forum, they should be captured in the bug and not just linked to: I have a panelStack where each one has a selectOneRadio (something similar to the Component Showcase Demo). When I change the selected panel, the last selected radio button does not show up (just as happens in the demo). Well, my need is that every time I change the selected panel, the radio group component must show the current readio button selection. How can I do that? (I could'nt find out). In my page, the radio group is defined as: <ice:selectOneRadio layout="pageDirection" value="# {direcConsultor.conocimientoSelecId} " styleClass="grupoBotonesRadio" valueChangeListener="# {direcConsultor.opcionesConocimientoListener} " > <f:selectItems value="# {direcConsultor.listaOpcionesConocimientos} " /> </ice:selectOneRadio> The listener is used to set the selected value and other component values. I found the answer. The lifecycle of Faces 1.5 pages is different from 1.0.1 version. Now, when you change the selected stacked panel, it fires the setConocimientoSelecId method with a null value and so, the old selected value is lost. The workaround is to change the method to be like: public void setConocimientoSelecId(String conocimientoSelecId) { if (conocimientoSelecId != null) { this.conocimientoSelecId = conocimientoSelecId; } } This way, the old value is preserved and changes only when you click an option from the radio group.
          Hide
          Ken Fyten added a comment -

          High priority.

          Show
          Ken Fyten added a comment - High priority.
          Hide
          Ken Fyten added a comment -

          Assign to Rob for review.

          Show
          Ken Fyten added a comment - Assign to Rob for review.
          Hide
          Rob Mayhew added a comment -

          Checked in fix. 1.5 r12726 and head r12727

          Show
          Rob Mayhew added a comment - Checked in fix. 1.5 r12726 and head r12727
          Hide
          Rob Mayhew added a comment -

          Verified

          Show
          Rob Mayhew added a comment - Verified

            People

            • Assignee:
              Rob Mayhew
              Reporter:
              Philip Breau
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: