use of org.ovirt.engine.ui.uicommonweb.models.macpool.SharedMacPoolModel in project ovirt-engine by oVirt.
the class ClusterListModel method addMacPool.
private void addMacPool(final ClusterModel clusterModel) {
SharedMacPoolModel macPoolModel = new NewSharedMacPoolModel.ClosingWithSetConfirmWindow(this) {
@Override
protected void onActionSucceeded(Guid macPoolId) {
MacPool macPool = getEntity();
macPool.setId(macPoolId);
Collection<MacPool> macPools = new ArrayList<>(clusterModel.getMacPoolListModel().getItems());
macPools.add(macPool);
clusterModel.getMacPoolListModel().setItems(macPools);
clusterModel.getMacPoolListModel().setSelectedItem(macPool);
ClusterListModel.this.setConfirmWindow(null);
}
};
macPoolModel.setEntity(new MacPool());
setConfirmWindow(macPoolModel);
}
Aggregations