Refs #1819 Double click on jmx beans tables doesn't expand tree

This commit is contained in:
Yuriy Artamonov 2013-01-25 16:30:10 +00:00
parent d77d13fbc0
commit 56f53e45e9

View File

@ -13,7 +13,6 @@ import com.haulmont.cuba.gui.components.*;
import com.haulmont.cuba.gui.components.actions.ItemTrackingAction; import com.haulmont.cuba.gui.components.actions.ItemTrackingAction;
import com.haulmont.cuba.gui.components.actions.RefreshAction; import com.haulmont.cuba.gui.components.actions.RefreshAction;
import com.haulmont.cuba.gui.data.CollectionDatasource; import com.haulmont.cuba.gui.data.CollectionDatasource;
import com.haulmont.cuba.gui.data.Datasource;
import com.haulmont.cuba.gui.data.ValueListener; import com.haulmont.cuba.gui.data.ValueListener;
import com.haulmont.cuba.jmxcontrol.entity.ManagedBeanInfo; import com.haulmont.cuba.jmxcontrol.entity.ManagedBeanInfo;
import com.haulmont.cuba.web.app.ui.jmxcontrol.ds.ManagedBeanInfoDatasource; import com.haulmont.cuba.web.app.ui.jmxcontrol.ds.ManagedBeanInfoDatasource;
@ -72,21 +71,14 @@ public class MbeansDisplayWindow extends AbstractWindow {
} else { // expand / collapse fake root node } else { // expand / collapse fake root node
TreeTable treeTable = mbeansTable; TreeTable treeTable = mbeansTable;
UUID itemId = mbi.getId(); UUID itemId = mbi.getId();
if (treeTable.isExpanded(itemId)) { if (treeTable.isExpanded(itemId))
treeTable.collapse(itemId); treeTable.collapse(itemId);
} else { else
treeTable.expand(itemId); treeTable.expand(itemId);
}
} }
} }
} }
@Override
public boolean isApplicableTo(Datasource.State state, Entity item) {
return super.isApplicableTo(state, item) &&
((ManagedBeanInfo) item).getObjectName() != null;
}
@Override @Override
public String getCaption() { public String getCaption() {
return getMessage("action.inspect"); return getMessage("action.inspect");