Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

the limits of the context menu of the tree and the table

chan guang
1 decade ago Jul 12, 2011 7:14am

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.:angry:

anybody has any solution?

Teppo Kurki
1 decade ago Jul 12, 2011 7:52am