// icc gets disposed by ccc
//helper code which is used to create link chooser controller
ControllerCreator linkChooserControllerCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq,WindowControl lwControl) {
LinkChooserController myLinkChooserController;
VFSContainer baseContainer = config.getLinkBrowserBaseContainer();
String uploadRelPath = config.getLinkBrowserUploadRelPath();
CustomLinkTreeModel linkBrowserCustomTreeModel = config.getLinkBrowserCustomLinkTreeModel();
if (type.equals(CMD_FILEBROWSER)) {
// when in file mode we include the internal links to the selection
//FIXME: user activity logger
myLinkChooserController = new LinkChooserController(lureq, lwControl, baseContainer, uploadRelPath, suffixes, fileName, linkBrowserCustomTreeModel);
} else {
// in media or image mode, internal links make no sense here
myLinkChooserController = new LinkChooserController(lureq, lwControl, baseContainer, uploadRelPath, suffixes, fileName, null);
}
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, myLinkChooserController.getInitialComponent(), null);
layoutCtr.addDisposableChildController(myLinkChooserController); // cleanup on layout controller dispose
return layoutCtr;
}
};
PopupBrowserWindow pbw = Windows.getWindows(ureq).getWindowManager().createNewPopupBrowserWindowFor(ureq, linkChooserControllerCreator);