use of org.ovirt.engine.ui.uicommonweb.models.vms.NewPoolModelBehavior in project ovirt-engine by oVirt.
the class PoolListModel method newEntity.
public void newEntity() {
if (getWindow() != null) {
return;
}
PoolModel model = new PoolModel(new NewPoolModelBehavior());
model.setIsNew(true);
model.setCustomPropertiesKeysList(AsyncDataProvider.getInstance().getCustomPropertiesList());
// $NON-NLS-1$
model.setIsAdvancedModeLocalStorageKey("wa_pool_dialog");
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().newPoolTitle());
model.setHelpTag(HelpTag.new_pool);
// $NON-NLS-1$
model.setHashName("new_pool");
model.getVmType().setSelectedItem(VmType.Desktop);
model.initialize();
VmBasedWidgetSwitchModeCommand switchModeCommand = new VmBasedWidgetSwitchModeCommand();
switchModeCommand.init(model);
model.getCommands().add(switchModeCommand);
// $NON-NLS-1$
UICommand command = UICommand.createDefaultOkUiCommand("OnSave", this);
model.getCommands().add(command);
// $NON-NLS-1$
model.getCommands().add(UICommand.createCancelUiCommand("Cancel", this));
}
Aggregations