queueTable.addColumn(jndiColumn, "JNDI");
queueTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
@Override
public void onSelectionChange(SelectionChangeEvent event) {
Queue queue = getCurrentSelection();
presenter.setSelectedQueue(queue);
}
});
// ----
final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = new ModelNode();
address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "messaging");
address.get(ModelDescriptionConstants.ADDRESS).add("hornetq-server", "default");
address.get(ModelDescriptionConstants.ADDRESS).add("jms-queue", "*");
return address;
}
};
// -------
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);