+
+ void createMySharedTree() {
+ mysharedTreeSelectionModel = new SingleSelectionModel<Folder>();
+ mysharedTreeSelectionModel.addSelectionChangeHandler(new Handler() {
+ @Override
+ public void onSelectionChange(@SuppressWarnings("unused") SelectionChangeEvent event) {
+ if (mysharedTreeSelectionModel.getSelectedObject() != null) {
+ deselectOthers(mysharedTreeView, mysharedTreeSelectionModel);
+ upload.setEnabled(false);
+ updateSharedFolder(mysharedTreeSelectionModel.getSelectedObject(), true);
+ }
+ }
+ });
+ selectionModels.add(mysharedTreeSelectionModel);
+ mysharedTreeViewModel = new MysharedTreeViewModel(Pithos.this, mysharedTreeSelectionModel);
+ mysharedTreeViewModel.initialize(new Command() {
+
+ @Override
+ public void execute() {
+ mysharedTreeView = new MysharedTreeView(mysharedTreeViewModel);
+ trees.insert(mysharedTreeView, 3);
+ createOtherSharedTree();
+ }
+ });
+ }
+
+ void createOtherSharedTree() {
+ otherSharedTreeSelectionModel = new SingleSelectionModel<Folder>();
+ otherSharedTreeSelectionModel.addSelectionChangeHandler(new Handler() {
+ @Override
+ public void onSelectionChange(@SuppressWarnings("unused") SelectionChangeEvent event) {
+ if (otherSharedTreeSelectionModel.getSelectedObject() != null) {
+ deselectOthers(otherSharedTreeView, otherSharedTreeSelectionModel);
+ applyPermissions(otherSharedTreeSelectionModel.getSelectedObject());
+ updateOtherSharedFolder(otherSharedTreeSelectionModel.getSelectedObject(), true);
+ }
+ }
+ });
+ selectionModels.add(otherSharedTreeSelectionModel);
+ otherSharedTreeViewModel = new OtherSharedTreeViewModel(Pithos.this, otherSharedTreeSelectionModel);
+ otherSharedTreeViewModel.initialize(new Command() {
+
+ @Override
+ public void execute() {
+ otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel);
+ trees.insert(otherSharedTreeView, 4);
+ }
+ });
+ }
+
+ public void logoff() {
+ Configuration conf = (Configuration) GWT.create(Configuration.class);
+ Cookies.removeCookie(conf.authCookie());
+ Window.Location.assign(Window.Location.getHost());
+ }