If we use the context menu of tree or table, we should add a ActionHandler to the tree or table,for example :
table.addActionHandler(new Action.Handler() {
public Action[] getActions(Object target, Object sender) {
if (markedRows.contains(target)) {
return ACTIONS_MARKED;
} else {
return ACTIONS_UNMARKED;
}
}
the limits is the return type of the method, it return a single-dimensional array. it means we can’t have sub menu of each menu.
anybody has any solution?