[
https://issues.apache.org/jira/browse/TOMAHAWK-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593331#action_12593331
]
Zdenek Sochor commented on TOMAHAWK-717:
----------------------------------------
Hi,
when using serverSideSwitch changing tab IS handled like immediate action.
Relevant code in org.apache.myfaces.custom.tabbedpane package:
HtmlTabbedPaneRenderer:
method: public void decode(FacesContext facesContext, UIComponent uiComponent)
call: tabbedPane.queueEvent(new TabChangeEvent(tabbedPane,
tabbedPane.getSelectedIndex(), tabIdx));
HtmlPanelTabbedPane
method: public void broadcast(FacesEvent event) throws
AbortProcessingException
call:
if (event instanceof TabChangeEvent)
{
TabChangeEvent tabChangeEvent = (TabChangeEvent)event;
if (tabChangeEvent.getComponent() == this)
{
setSelectedIndex(tabChangeEvent.getNewTabIndex());
getFacesContext().renderResponse();
}
}
This event if fired ONLY when using serverSideSwitch, clientSideSwitch is using
other name in parameter sent in request's map.
When the event is fired, a call to rederResponse() makse MyFaces skip "update
model values" phase, so the model is NOT updated.
I see two possible remedies (doing the same):
1. adding new parameter, which would enable partial model update (note that you
get only partial info from just 1 tab of whole panel), defaulting to FALSE to
preserve current behaviour
2. adding new parameter, which would flag switching tabs as immediate,
defaulting to TRUE to preserve current behaviour
As for updating bounded model properties from outside components, they are
updated in apply request values phase when decoded.
Regards,
Zdenek
> 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, 1.1.6
> 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.