Class FavouriteController

java.lang.Object
org.adempiere.webui.desktop.FavouriteController

public class FavouriteController extends Object
Author:
hengsin, Logilite Technologies - IDEMPIERE-3340
  • Method Details

    • getInstance

      public static FavouriteController getInstance(org.zkoss.zk.ui.Session currSess)
      Get favourites controller instance for current session
      Parameters:
      currSess -
      Returns:
      FavouriteController session instance
    • addNode

      public boolean addNode(int nodeId)
      Add node (by node id) to favourties
      Parameters:
      nodeId -
      Returns:
      true if successfully added
    • addNode

      public boolean addNode(MTreeNode node)
      add tree node to favourites
      Parameters:
      node -
      Returns:
      true if successfully added
    • removeNode

      public boolean removeNode(int nodeId)
      remove node (by node id) from favourites
      Parameters:
      nodeId -
      Returns:
      true if found and remove
    • hasNode

      public boolean hasNode(int nodeId)
      Parameters:
      nodeId -
      Returns:
      true if node id is in the current favourites list
    • getFavourites

      public List<MTreeNode> getFavourites()
      Returns:
      List of favourites node
    • addInsertedCallback

      public void addInsertedCallback(Callback<MTreeNode> callback)
      add callback for after add node to favourites
      Parameters:
      callback -
    • addDeletedCallback

      public void addDeletedCallback(Callback<Integer> callback)
      add callback for after remove node from favourites
      Parameters:
      callback -
    • getAD_Tree_Favorite_ID

      public int getAD_Tree_Favorite_ID()
      Returns:
      AD_Tree_Favorite_ID
    • getRootNode

      public MTreeNode getRootNode()
      Returns:
      root MTreeNode
    • setTreeAndModel

      public void setTreeAndModel(FavoriteSimpleTreeModel treeModel, org.zkoss.zul.Tree tree)
      Parameters:
      treeModel - FavoriteSimpleTreeModel
      tree - Tree