queueTable.addColumn(jndiColumn, "JNDI");
queueTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
@Override
public void onSelectionChange(SelectionChangeEvent event) {
Queue queue = getCurrentSelection();
presenter.setSelectedQueue(queue);
}
});
// -------
DefaultPager pager = new DefaultPager();
pager.setDisplay(queueTable);
ToolStrip queueTools = new ToolStrip();
queueTools.addToolButtonRight(new ToolButton("Flush", new ClickHandler() {
@Override
public void onClick(ClickEvent clickEvent) {
SingleSelectionModel<Queue> selectionModel =
(SingleSelectionModel<Queue>)queueTable.getSelectionModel();
final Queue queue = selectionModel.getSelectedObject();
Feedback.confirm("Flush Queue", "Do you really want to flush queue "+queue.getName(),
new Feedback.ConfirmationHandler(){
@Override
public void onConfirmation(boolean isConfirmed) {
if(isConfirmed)
presenter.onFlushQueue(queue);