You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just noticed this issue. Just to give the scenario; I have a page, with a tabbed panel. As the user selects tabs, I store the selected tab index. When the user reloads the page, I reset the last selected tab index in setActiveTab(index) so that the user re-opens the page on the last selected tab.
Trouble is, from that reload, once setActiveTab() is called, onActivate will always return that index as it's index. So from that point I have no idea which tab they've actually selected.
Cheers,
Col.
The text was updated successfully, but these errors were encountered:
I tried to reproduce your issue but its working for me (I presumed you are using the jQuery UI TabbledPanel). When I come back in the page, the correct tab is selected, and when I click antoher one, the correct index is retrieved. Are you sure you are using #onActivate and not #onActivating?
Here is the code I used:
this.tabPanel = new TabbedPanel("tabs", this.newTabModel()) {
private static final long serialVersionUID = 1L;
@Override
protected void onConfigure()
{
super.onConfigure();
this.setActiveTab(SampleSession.get().tabIndex);
}
@Override
public void onActivate(AjaxRequestTarget target, int index, ITab tab)
{
SampleSession.get().tabIndex = index;
this.info("selected tab #" + index);
target.add(feedback);
}
}
Please create a quickstart so I can actually reproduce your issue! :)
Seb,
Just noticed this issue. Just to give the scenario; I have a page, with a tabbed panel. As the user selects tabs, I store the selected tab index. When the user reloads the page, I reset the last selected tab index in setActiveTab(index) so that the user re-opens the page on the last selected tab.
Trouble is, from that reload, once setActiveTab() is called, onActivate will always return that index as it's index. So from that point I have no idea which tab they've actually selected.
Cheers,
Col.
The text was updated successfully, but these errors were encountered: