-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.0
-
Security Level: Jimmy
-
None
tabboxes using the model feature ZK-1845 / ZK-2002 get into an inconsitent state, when the <tab>s use closable="true"
when the tab is closed the the tabbox component does not, and cannot remove it from the ListModel - as it is readonly.
workaround:
the ListModel item can be removed by the application during the onClose event of a <tab> component
<tab label="@load(each)" closable="true" onClose="@command('closeTab', page=each)"/>
@Command("closeTab") public void onCloseTab(@BindingParam("page") String page) { tabsModel.remove(page); }
the problem with this workaround is the fact, that the component is being removed 2 times once by the models onChange event, and by the <tab> component itself in its close() method calling detatch... however this works, but might lead to (unknown) side effects
so in the usecase of model with closable, the default detach behaviour should be disabled (stopping the event) and indicating the developer that he should handle the onClose event by updating the model for the tabbox.