コード例 #1
0
 /**
  * Starts the asynchronous retrieval of the attachments related to the parent node.
  *
  * @param refNode The menu node of reference.
  * @param rootType The type of reference.
  */
 void fireParentLoading(TreeBrowserSet refNode) {
   Integer id = getLoaderID(ContainersLoader.class);
   if (id != null) cancel(id);
   Object ho = refNode.getUserObject();
   if (ho instanceof DataObject) {
     loaderID++;
     ctx = retrieveContext((DataObject) ho);
     ContainersLoader loader =
         new ContainersLoader(
             component, ctx, refNode, ho.getClass(), ((DataObject) ho).getId(), loaderID);
     loaders.put(loaderID, loader);
     loader.load();
   }
 }
コード例 #2
0
 /**
  * Starts an asynchronous retrieval of the containers hosting the currently edited object.
  *
  * @param type The type of the edited object.
  * @param id The id of the currently edited object.
  */
 void loadParents(Class type, long id) {
   loaderID++;
   ContainersLoader loader = new ContainersLoader(component, ctx, type, id, loaderID);
   loaders.put(loaderID, loader);
   loader.load();
 }