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