[
https://issues.apache.org/jira/browse/TOMAHAWK-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593252#action_12593252
]
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}">
<t:dataTable
headerClass="myTableHeader"
rowClasses="myTableRow1,myTableRow2"
var="r"
preserveDataModel="false"
preserveRowStates="false"
preserveSort="false"
value="#{tabbedPaneBean.testBeans}">
<h:column>
<f:facet name="header">
<h:outputText
value="--Header 1 --" />
</f:facet>
<t:inputText
id="inputField002"
value="#{r.s1}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText
value="--Header 2 --" />
</f:facet>
<t:inputText
id="inputField001"
value="#{r.s2}" />
</h:column>
</t:dataTable>
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.
Christian
> Tabbed Pane: dataModel inside tabs is not updated when switching between tabs
> and coming back
> ---------------------------------------------------------------------------------------------
>
> Key: TOMAHAWK-717
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-717
> 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 bug.
> 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.