myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Koelle (JIRA)" <>
Subject [jira] Commented: (TOMAHAWK-717) Tabbed Pane: dataModel inside tabs is not updated when switching between tabs and coming back
Date Wed, 30 Apr 2008 08:04:55 GMT


Christian Koelle commented on TOMAHAWK-717:

I can confirm that this bug exists. 

It can be reproduced with the MyFaces-Simple-Demo-Application V. 1.1.6 on Tomcat 5.5.20 by
doing the following:

a.) Amend the content of the server-side-switched tab1 in the demo's TabbedPane.jsp  to the
 the following, i.e. a a dataTable: 

<t:panelTab id="tab1" label="#{example_messages['tabbed_tab1']}" rendered="#{tabbedPaneBean.tab1Visible}">
         <f:facet name="header">
                     value="--Header 1 --" />
               value="#{r.s1}" />

         <f:facet name="header">
                     value="--Header 2 --" />
               value="#{r.s2}" />

b.) Add a TestBean to the application:

pulbic class TestBean implements Serializable{
  private String _s1;
  private String _s2;
// + getter and setter

c.) Extend the TabbedPaneBean with one property holding a list of TestBeans:

private List<TestBean> testBeans;
// + getter and setter

d.) Initialise the property testBeans, with a few objects, e. g. by adding a default contructor
 containing the following lines:

this.testBeans = new ArrayList<TestBean>();
this.testBeans.add(new TestBean());
this.testBeans.add(new TestBean());

There will be two table rows @ 2 input fields on the the tabbedPane-demopage after this amendment.
Data entered into it, will be lost on Tab-change, contrary to the input fields outside of
the <t:dataTable>.


As far as I could spent time to debug this, I can say that after the Apply-Request-Values-Phase
(i. e. processDecodes) the UIcomponent (UIInput), which loses the entered values holds the
submitted value in the attribue "_submittedValue" but somehow afterwards, the value will not
be written into the bound bean model property. 

Somehow it appears that the tabswitching has some kind of immediate-alike behaviour, i. e.
if you switch tabs, all fields of TabbedPane.jsp which are to be validated, will not be validated,
contrary to what's happening when you use the already provided "Common submit button".

It is interesting, that entered data will be correctly written to the bound model properties,
if you use UIInput-components outside of a <t:dataTable> as already provided within
the demo application.

Please let me know, if you need more information on this or if you cannot reproduce it with
the given information.

Regards and thanks in advance.

> Tabbed Pane: dataModel inside tabs is not updated when switching between tabs and coming
> ---------------------------------------------------------------------------------------------
>                 Key: TOMAHAWK-717
>                 URL:
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Tabbed Pane
>    Affects Versions: 1.1.3
>            Reporter: Gerald Müllan
> I have worked several times with the tabbed pane component, but never got aware of this
> There is a dataTable inside one tab and some new values were put in some input components.
After switching to another tab and coming back, the values are gone and only the "old" ones
are rendered out. This bug seems to be actual since 1.1.3 and before.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message