Package org.adempiere.webui.desktop
Class FavouriteController
- java.lang.Object
-
- org.adempiere.webui.desktop.FavouriteController
-
public class FavouriteController extends Object
- Author:
- hengsin, Logilite Technologies - IDEMPIERE-3340
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
addNode(MTreeNode node)
add tree node to favouritesint
getAD_Tree_Favorite_ID()
List<MTreeNode>
getFavourites()
static FavouriteController
getInstance(org.zkoss.zk.ui.Session currSess)
Get favourites controller instance for current sessionMTreeNode
getRootNode()
boolean
hasNode(int nodeId)
boolean
removeNode(int nodeId)
remove node (by node id) from favouritesvoid
setTreeAndModel(FavoriteSimpleTreeModel treeModel, org.zkoss.zul.Tree tree)
-
-
-
Method Detail
-
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
-
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()
-
getRootNode
public MTreeNode getRootNode()
-
setTreeAndModel
public void setTreeAndModel(FavoriteSimpleTreeModel treeModel, org.zkoss.zul.Tree tree)
-
-