}
// FROM FULLCHIEFCONTROLLER
private void activateSite(SiteInstance s, UserRequest ureq, String viewIdentifier) {
BornSiteInstance bs = siteToBornSite.get(s);
GuiStack gs;
Controller resC;
//PB//WindowControl site_wControl;
if (bs != null && s != curSite) {
// single - click -> fetch guistack from cache
gs = bs.getGuiStackHandle();
resC = bs.getController();
//PB//site_wControl = bs.getWindowControl();
} else {
// bs == null (not yet in cache) || s == curSite
// double click or not yet in cache.
// dispose old controller
if (bs != null) {
// already in cache -> dispose old
bs.getController().dispose();
}
// reset site and create new controller
s.reset();
/*PB
OLATResourceable ores = OresHelper.createOLATResourceableInstance(SiteInstance.class, Long.valueOf(sites.indexOf(s)));
ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ores);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
resC = s.createController(ureq, bwControl);
*/
resC = s.createController(ureq, getWindowControl());
gs = getWindowControl().getWindowBackOffice().createGuiStack(resC.getInitialComponent());
//PB//site_wControl = bwControl;
//PB//siteToBornSite.put(s, new BornSiteInstance(gs, resC, bwControl));
siteToBornSite.put(s, new BornSiteInstance(gs, resC));
}
doActivateSite(s, gs);
//set current BusPath for extraction in the TopNav Controller
//FIXME:pb:2009-06-21:move core