GWT SuggestBox: add multiple ClickHandlers to each suggestion - gwt

Add multiple ClickHandlers to each suggestion. For example, for each suggestion I want to have 2 links 'exclude' and 'include' and add a handlers to each link.

SuggestBox let's you provide your own SuggestionDisplay if you don't like the default one.

It might be helpful to include more details in the question (I would comment but cant until i get more rep).
What type of widget/widgets are you using?
If its a suggestbox then the answer Thomas Broyer supplied should work.
To do this create a new class and extend
SuggestBox.DefaultSuggestionDisplay

We have a similar implementation at my workplace. We have a custom suggestion display class which extends SuggestBox.SuggestionDisplay. It is a PopupPanel at heart, with a VerticalPanel that holds our custom Suggestions. Those items have click handlers.

The project advanced suggest box handles this kind of needs: you can use the Table layout for example to have your buttons (see the demo)

Related

How to integrate react-dnd into admin-on-rest?

Has anyone tried to integrate react-dnd or another lib into admin on rest?
I wanted to make datagrid draggable inside a referencearrayfield.
Should i write my own component overriding datagrid or there's a simple way to do it?
Thanks!
You'll have to implement a custom datagrid for that
Although experimental you can have a look on this plugin: https://github.com/marmelab/react-admin/tree/master/packages/ra-tree-ui-materialui
It has as dependency react-dnd and it seems that it is editing the listing. Not sure if it can update a property used for ordering like order for example

What would be the best approach to implement a multi-select combo in SWT/JFace?

I need to implement a multi-select combobox using SWT/JFace, What would be the best approach?should i go for changing the source code or i should try to extend the combo?
It is not possible to extend a Combo It is possible to extend Combo by overriding checkSubclass(), however it is highly disapproved of. The alternative is to create a wrapper for it. But that would be too much work.
Extending a CCombo is an option, but not a very good idea. Again, too much work for the functionality you need.
BUT
As sambi reddy mentioned, you could use a TableComboViewer from Nebula (scroll down to "TableCombo").
Another convenient solution (my favorite) is to have a CheckboxTreeViewer since you need to implement multi selection and such.
screenshot
https://github.com/lawhcd/SWTMultiCheckSelectionCombo
For anyone who is looking for a widget that allows user to select multiple options from a list of check box style options.
It is based on user1438038's idea and extended to provide nearly all of the api required of a widget similar to Combo.

How to get exactly Eclipse Editor kind of Tool Tip in RCP/SWT Table cell

I want to get Exactly eclipse editor kind highly customized tooltip like below-
I used eclipse provided snippets of customized Tooltips but none of them were so highly improvised performance and easy to use.
How to reuse these Tooltips , any example would help.
you just need to extend org.eclipse.jface.window.ToolTip
and override
protected abstract Composite createToolTipContentArea(Event event,
Composite parent);
you can add org.eclipse.swt.browser.Browser and set formatted content and add required controls.

How to refresh CheckboxTableViewer after adding an element?

Can somebody help me how do I refresh CheckboxTableViewer after added one element?
Please provide some code snippets.
Use Viewer.refresh() or AbstractTableViewer.add() or any of the overloads.
Please read this tutorial that explains the usage of Eclipse JFace TableViewer including label and content provider.

How to enable Next/back button in wizard page in eclipse?

In my wizard page, the Next and Back buttons are not visible. is there any method to be called to make that enable?
Thanks a lot in advance!
Did you add multiple Wizard pages to the wizard? If there is only a single page, it makes sense to remove the mentioned buttons.
Update:
If there are multiple pages, then look at the Wizard implementation, and check the needsNextAndPreviousButton method what it describes. If you have implemented the IWizard interface directly (and not using some convenience abstract class, such as Wizard), it is possible that you generated that method returning constant false.
If that did not help, I suggest looking at the tutorial http://www.eclipse.org/articles/article.php?file=Article-JFaceWizards/index.html
Check the needsNextAndPreviousButton method in the wizard constructor. If you've added pages in your wizard then check canFlipToNextPage, isPageComplete, and validate your page completion in these methods and enable/disable as well.