### Eclipse Workspace Patch 1.0
#P org.jboss.tools.deltacloud.ui
Index: src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
===================================================================
--- src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java	(revision 29745)
+++ src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java	(working copy)
@@ -48,26 +48,21 @@
 	/**
 	 * Initial image, may be null
 	 */
-	private DeltaCloudImage image;
+	private String imageId;
 
 	public NewInstanceWizard(DeltaCloud cloud) {
 		this.cloud = cloud;
-		try {
-			this.image = cloud.getLastImage();
-		} catch (DeltaCloudException e) {
-			// ignore
-		}
 	}
 
-	public NewInstanceWizard(DeltaCloud cloud, DeltaCloudImage image) {
+	public NewInstanceWizard(DeltaCloud cloud, String imageId) {
 		this(cloud);
-		this.image = image;
+		this.imageId = imageId;
 	}
 
 	@Override
 	public void addPages() {
 		setWindowTitle(WizardMessages.getString("NewInstance.title"));
-		mainPage = new NewInstancePage(cloud, image);
+		mainPage = new NewInstancePage(cloud, imageId);
 		addPage(mainPage);
 		additionalPages = DeltacloudUIExtensionManager.getDefault().loadNewInstanceWizardPages();
 		for (int i = 0; i < additionalPages.length; i++) {
@@ -75,12 +70,6 @@
 		}
 	}
 
-	// @Override
-	// public boolean canFinish() {
-	// //return mainPage.isPageComplete();
-	// return super.canFinish();
-	// }
-
 	@Override
 	public boolean performFinish() {
 		NewInstancePageModel model = mainPage.getModel();
Index: src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceFromSpecificImageHandler.java
===================================================================
--- src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceFromSpecificImageHandler.java	(revision 29564)
+++ src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceFromSpecificImageHandler.java	(working copy)
@@ -45,7 +45,7 @@
 	private void createInstance(DeltaCloudImage deltaCloudImage, Shell shell) {
 		if (deltaCloudImage != null) {
 			DeltaCloud deltaCloud = deltaCloudImage.getDeltaCloud();
-			IWizard wizard = new NewInstanceWizard(deltaCloud, deltaCloudImage);
+			IWizard wizard = new NewInstanceWizard(deltaCloud, deltaCloudImage.getId());
 			WizardDialog dialog = new WizardDialog(shell, wizard);
 			dialog.create();
 			dialog.open();
Index: src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java
===================================================================
--- src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java	(revision 29564)
+++ src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java	(working copy)
@@ -10,13 +10,21 @@
  ******************************************************************************/
 package org.jboss.tools.internal.deltacloud.ui.wizards;
 
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
 import org.jboss.tools.deltacloud.core.DeltaCloudHardwareProfile;
 import org.jboss.tools.deltacloud.core.DeltaCloudImage;
 import org.jboss.tools.deltacloud.core.DeltaCloudRealm;
+import org.jboss.tools.deltacloud.core.job.AbstractCloudElementJob;
+import org.jboss.tools.deltacloud.core.job.AbstractCloudElementJob.CLOUDELEMENT;
 import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ObservableUIPojo;
 
 /**
@@ -28,6 +36,7 @@
 	public static final String PROPERTY_URL = "url"; //$NON-NLS-1$
 	public static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
 	public static final String PROPERTY_IMAGE = "image"; //$NON-NLS-1$
+	public static final String PROPERTY_IMAGE_ID = "imageId"; //$NON-NLS-1$
 	public static final String PROPERTY_ARCH = "arch"; //$NON-NLS-1$
 	public static final String PROPERTY_REALMS = "realms"; //$NON-NLS-1$
 	public static final String PROPERTY_SELECTED_REALM_INDEX = "selectedRealmIndex"; //$NON-NLS-1$
@@ -39,6 +48,7 @@
 
 	private String name;
 	private DeltaCloudImage image;
+	private String imageId;
 	private String arch;
 	private String keyId;
 	private DeltaCloudRealm selectedRealm;
@@ -49,10 +59,19 @@
 	private String cpu;
 	private String storage;
 	private String memory;
+	private DeltaCloud cloud;
 
-	protected NewInstancePageModel(String keyId, DeltaCloudImage image) {
+	protected NewInstancePageModel(String keyId, String imageId, DeltaCloud cloud) {
+		this.cloud = cloud;
 		this.keyId = keyId;
-		this.image = image;
+		initImageId(imageId, cloud);
+	}
+
+	private void initImageId(String imageId, DeltaCloud cloud) {
+		if (imageId == null) {
+			imageId = cloud.getLastImageId();
+		}
+		setImageId(imageId);
 	}
 
 	public String getName() {
@@ -71,7 +90,45 @@
 		firePropertyChange(PROPERTY_IMAGE, this.image, this.image = image);
 		List<DeltaCloudHardwareProfile> filteredProfiles = filterProfiles(image, allProfiles);
 		setFilteredProfiles(filteredProfiles);
-		setArch(image.getArchitecture());
+		if (image != null) {
+			setArch(image.getArchitecture());
+		}
+	}
+
+	public String getImageId() {
+		return imageId;
+	}
+
+	public void setImageId(final String imageId) {
+		firePropertyChange(PROPERTY_IMAGE_ID, this.imageId, this.imageId = imageId);
+		if (imageId == null || imageId.length() == 0) {
+			return;
+		}
+		
+		new AbstractCloudElementJob(
+				MessageFormat.format("Getting image {0} from cloud {1}", imageId, cloud.getName()),
+				cloud, CLOUDELEMENT.IMAGES) {
+
+			@Override
+			protected IStatus doRun(IProgressMonitor monitor) throws Exception {
+				try {
+					final DeltaCloudImage image = cloud.getImage(imageId);
+					Display.getDefault().syncExec(new Runnable() {
+						
+						@Override
+						public void run() {
+							setImage(image);
+						}
+					});
+				} catch (Exception e) {
+					setImage(null);
+					// do not re-throw exception. DC server 0.1.2 return internal
+					// error 500 when requesting unknown image
+				}
+				return Status.OK_STATUS;
+			}
+
+		}.schedule();
 	}
 
 	public void setSelectedRealmIndex(int index) {
Index: src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java	(revision 29747)
+++ src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java	(working copy)
@@ -31,7 +31,6 @@
 import org.eclipse.core.databinding.observable.IObservable;
 import org.eclipse.core.databinding.observable.list.IObservableList;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
 import org.eclipse.core.databinding.validation.IValidator;
 import org.eclipse.core.databinding.validation.ValidationStatus;
 import org.eclipse.core.runtime.Assert;
@@ -104,7 +103,6 @@
 	private static final String PROPERTIES_LABEL = "Properties.label"; //$NON-NLS-1$
 	private static final String MUST_ENTER_A_NAME = "ErrorMustProvideName.text"; //$NON-NLS-1$	
 	private static final String MUST_ENTER_A_KEYNAME = "ErrorMustProvideKeyName.text"; //$NON-NLS-1$	
-	private static final String MUST_ENTER_IMAGE_ID = "ErrorMustProvideImageId.text"; //$NON-NLS-1$	
 	private static final String LOADING_VALUE = "Loading.value"; //$NON-NLS-1$
 	private static final String IMAGE_ID_NOT_FOUND = "ErrorImageIdNotFound.text"; //$NON-NLS-1$
 	private static final String SSH2_PREF_KEYS = "ShowSSH2Preferences.label"; //$NON-NLS-1$
@@ -154,11 +152,11 @@
 		}
 	};
 
-	public NewInstancePage(DeltaCloud cloud, DeltaCloudImage image) {
+	public NewInstancePage(DeltaCloud cloud, String imageId) {
 		super(WizardMessages.getString(NAME));
 		this.cloud = cloud;
 		String defaultKeyname = cloud.getLastKeyname();
-		model = new NewInstancePageModel(defaultKeyname, image); //$NON-NLS-1$
+		model = new NewInstancePageModel(defaultKeyname, imageId, cloud); //$NON-NLS-1$
 		setDescription(WizardMessages.getString(DESCRIPTION));
 		setTitle(WizardMessages.getString(TITLE));
 		setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
@@ -490,56 +488,26 @@
 	}
 
 	private IObservableValue bindImage(Text imageText, DataBindingContext dbc) {
-		UpdateValueStrategy widgetToModelUpdateStrategy = new UpdateValueStrategy();
-		ImageLabel2DeltaCloudImageConverter imageConverter = new ImageLabel2DeltaCloudImageConverter();
-		widgetToModelUpdateStrategy.setConverter(imageConverter);
-		widgetToModelUpdateStrategy.setAfterGetValidator(
-				new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_IMAGE_ID)));
-		widgetToModelUpdateStrategy.setAfterConvertValidator(new DeltaCloudImageValidator());
-
-		UpdateValueStrategy modelToTextUpdateStrategy = new UpdateValueStrategy();
-		modelToTextUpdateStrategy.setConverter(new DeltaCloudImage2LabelConverter());
+		IObservableValue imageTextObservable = WidgetProperties.text(SWT.Modify).observeDelayed(IMAGE_CHECK_DELAY,
+				imageText);
 
-		Binding imageBinding = dbc.bindValue(
-				WidgetProperties.text(SWT.Modify).observeDelayed(IMAGE_CHECK_DELAY, imageText),
-				BeanProperties.value(NewInstancePageModel.class, NewInstancePageModel.PROPERTY_IMAGE).observe(model),
-				widgetToModelUpdateStrategy,
-				modelToTextUpdateStrategy);
-		ControlDecorationSupport.create(imageBinding, SWT.LEFT | SWT.TOP);
-		return imageConverter.getImageObservable();
-	}
+		dbc.bindValue(
+				imageTextObservable,
+				BeanProperties.value(
+						NewInstancePageModel.class, NewInstancePageModel.PROPERTY_IMAGE_ID).observe(model));
 
-	private class ImageLabel2DeltaCloudImageConverter extends Converter {
-
-		private WritableValue imageObservable = new WritableValue();
-
-		public ImageLabel2DeltaCloudImageConverter() {
-			super(String.class, DeltaCloudImage.class);
-		}
-
-		@Override
-		public Object convert(Object fromObject) {
-			Assert.isLegal(fromObject instanceof String);
-			String id = (String) fromObject;
-			DeltaCloudImage image = null;
-			if (id != null) {
-				image = getImage(id);
-			}
-			imageObservable.setValue(image);
-			return image;
-		}
-
-		private DeltaCloudImage getImage(String id) {
-			try {
-				return cloud.getImage(id);
-			} catch (DeltaCloudException e) {
-				return null;
-			}
-		}
+		IObservableValue modelImageObservable =
+				BeanProperties.value(NewInstancePageModel.PROPERTY_IMAGE).observe(model);
+		Binding modelImageBinding = dbc.bindValue(
+				imageTextObservable,
+				modelImageObservable,
+				new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER),
+				new UpdateValueStrategy()
+						.setAfterGetValidator(new DeltaCloudImageValidator())
+						.setConverter(new DeltaCloudImage2LabelConverter()));
 
-		public IObservableValue getImageObservable() {
-			return imageObservable;
-		}
+		ControlDecorationSupport.create(modelImageBinding, SWT.LEFT | SWT.TOP);
+		return modelImageObservable;
 	}
 
 	private class DeltaCloudImage2LabelConverter extends Converter {
