Package org.adempiere.webui.desktop
Class FavouriteController
java.lang.Object
org.adempiere.webui.desktop.FavouriteController
Controller for favourite menu nodes
- 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
-