Skip to content
Snippets Groups Projects
Commit 7f8b7238 authored by srosse's avatar srosse
Browse files

OO-1667: check the input parameters before activating a tabbed pane

parent 1aebb449
No related branches found
No related tags found
No related merge requests found
...@@ -260,10 +260,13 @@ public class TabbedPane extends Container implements Activateable2 { ...@@ -260,10 +260,13 @@ public class TabbedPane extends Container implements Activateable2 {
@Override @Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) { public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if(entries == null || entries.isEmpty()) return; if(entries == null || entries.isEmpty()) return;
int pos = entries.get(0).getOLATResourceable().getResourceableId().intValue(); OLATResourceable ores = entries.get(0).getOLATResourceable();
if(pos != selectedPane) { if("tab".equals(ores.getResourceableTypeName())) {
dispatchRequest(ureq, pos); int pos = ores.getResourceableId().intValue();
if(pos != selectedPane && pos >= 0 && pos < getTabCount()) {
dispatchRequest(ureq, pos);
}
} }
} }
} }
\ No newline at end of file
...@@ -317,7 +317,6 @@ public class BusinessGroupEditController extends BasicController implements Cont ...@@ -317,7 +317,6 @@ public class BusinessGroupEditController extends BasicController implements Cont
} }
@Override @Override
//fxdiff BAKS-7 Resume function
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) { public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if(entries == null || entries.isEmpty() || tabbedPane == null) return; if(entries == null || entries.isEmpty() || tabbedPane == null) return;
tabbedPane.activate(ureq, entries, state); tabbedPane.activate(ureq, entries, state);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment