Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-82

Status not saved correctly for all kind of elements between tab pages switch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.8 beta
    • 1.0.9m9
    • None
    • None
    • Tomcat5, Sun JDK 1.5.0, Debian Sarge

    Description

      Hello,
      thanks for creating MyFaces, I'm beginning to like it very much

      I have a problem working on tabs with the x:panelTabbedPane : the status of some elements is not correctly saved and restored when switching tabs.

      I report a snip of a mail from Sylvain Vieujot from the -user mailing list, I think it can be useful for who will try to solve the problem.
      ---------
      [...]
      But we still have an issues for UISelectItems.
      If someone could look at line 140 of the HtmlCheckBoxRendererBase, and line 463 of the RendererUtils, it would be great, as I think they too are using the component's value, instead of checking for a submitted value first.
      I can't work on this right now as I'll be away from my computer for a week, and I don't want to take the risk of breaking it before leaving.

      An easy way to test test the problem is the same as for any component : Put the component in an tab panel, with at least 2 tabs. Change the component value, and then switch to another tab.
      This should set the component's submitted value, but not change the backing bean value.
      When you switch back to initial tab, you should have the changed value.
      If the user changes have been lost, then the component's renderer has a bug. It always renders the backing bean value instead of looking first for a submitted value.
      [...]
      ---------

      I've modified the tabbedPane.jsp page from the example of the distribution to show the bad behaviohur. To check the problem:

      • fill in the controls on tab1
      • switch to tab3, fill the other controls
      • switch back to tab1 and you'll notice that the date lost it's value
      • switch back to tab3 and also the selectboxes and radiobuttons are reset

      If I find a way to attach a file to this issue I'll upload the new tabbedPane.jsp, otherwise I'll attach it on a message on the mailing list.

      Thanks,
      Alex

      Attachments

        1. tabbedPane.jsp
          5 kB
          Alessandro Polverini

        Issue Links

          Activity

            People

              svieujot Sylvain Vieujot
              dusty Alessandro Polverini
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: