context menu?

Hello all,

I have found com.itmill.toolkit.terminal.gwt.client.ui.IContextMenu but nothing in the com.itmill.toolkit.ui package.

How is then the recommended way of implementing a context menu? – the kind that will show up when you right-click on something

Thanks
Jaime

Look at actionhandler at tree and table.

Hi,

Just a little more verbose than the previous poster:
Currently only Tree and Table support the context menu, though it’s quite possible that other components could have a context menu in the future.
For Tree and Table, you get the context menu by implementing a Action.Handler, and adding that to the Tree/Table.

Best Regards,
Marc

I forgot to login posting the question.

Thanks for your answers

Marc:
I was reviewing the design and I realized that what I should have is a menu that appears when you click on a button. It’s still sort of a context menu but then I guess is not what Tree and Table provide for; and since there is no general purpose context menu, what the usual workaround for this? A panel maybe? I’m curious about what has worked for people before.

Thanks
Jaime

Hi,

Of course this depends on exactly what you’re trying to do, but at least have a look at PopupView - it’s a new feature that I think might do what you want - it has a ‘minimized’ view which pops up to a ‘full’ view when you click on the minimized view, and it’s quite flexible.

Best Regards,
Marc

I have downloaded itmill-toolkit-mac-5.2.14 but I can’t find a PopupView class there.

What I need is this http://livedocs.adobe.com/flex/3/langref/mx/controls/PopUpButton.html (scroll to the very bottom of the page to see an example in action).

Is this what PopupView does?

Thanks again
Jaime

PopupView can be found in 5.3.0 series. As 5.3.0 is almost out of the door, maybe you should try out 5.3.0rc4

Not exactly. PopupView opens a (popup) view that may contain any components. The view is opened from a static html. It is mostly used to show a simple “quick” presentation for some info and then it can be opened (by clicking) for closer inspection or editing.

How about simply using Select component for PopUpButton?

If you really want to, you can do the “PopUpButton” by putting normal button and popupview side by side. And then add selections to popupview. The result should be almost identical to the Adobe example.