Package org.adempiere.webui.desktop
Class FavouriteController
java.lang.Object
org.adempiere.webui.desktop.FavouriteController
- Author:
- hengsin, Logilite Technologies - IDEMPIERE-3340
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDeletedCallback
(Callback<Integer> callback) add callback for after remove node from favouritesvoid
addInsertedCallback
(Callback<MTreeNode> callback) add callback for after add node to favouritesboolean
addNode
(int nodeId) Add node (by node id) to favourtiesboolean
add tree node to favouritesint
static FavouriteController
getInstance
(org.zkoss.zk.ui.Session currSess) Get favourites controller instance for current sessionboolean
hasNode
(int nodeId) boolean
removeNode
(int nodeId) remove node (by node id) from favouritesvoid
setTreeAndModel
(FavoriteSimpleTreeModel treeModel, org.zkoss.zul.Tree tree)
-
Method Details
-
getInstance
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
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
- Returns:
- List of favourites node
-
addInsertedCallback
add callback for after add node to favourites- Parameters:
callback
-
-
addDeletedCallback
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
- Returns:
- root MTreeNode
-
setTreeAndModel
- Parameters:
treeModel
- FavoriteSimpleTreeModeltree
- Tree
-