Perhaps you're doing too much in onActivate(), it's called more often than
you might think. Perhaps you should split the initialization logic into
onPrepare() more info here
http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/onactivateandonpassivate/3

eg:

public void onActivate(EventContext eventContext) {
selectedScene = eventContext.getCount() > 0 ?
activate(eventContext.get(Scene.class, 0) : null;
selectedShot = eventContext.getCount() > 1 ?
activate(eventContext.get(Shot.class, 1) : null;
selectedComponent = eventContext.getCount() > 2 ?
eventContext.get(ShotComponent.class, 2) : null;
}

public void onPrepare() {
if (!scene.getProject().equals(user.getSelectedProject())) {
user.setSelectedProject(scene.getProject());
}

shotComponents = systemManager.getComponents(selectedShot, filter);
CollectionUtils.sortComponents(shotComponents);
}

Reply via email to