return aPage;
}
public WOComponent deleteInstanceClicked() {
final MInstance instance = currentInstance;
return ConfirmationPage.create(context(), new ConfirmationPage.Delegate() {
public WOComponent cancel() {
return AppDetailPage.create(context(), instance.application());
}
public WOComponent confirm() {
handler().startWriting();
try {
siteConfig().removeInstance_M(instance);
if (siteConfig().hostArray().count() != 0) {
handler().sendRemoveInstancesToWotaskds(new NSArray(instance), siteConfig().hostArray());
}
} finally {
handler().endWriting();
}
return AppDetailPage.create(context(), instance.application());
}
public String explaination() {
return "Selecting 'Yes' will shutdown the selected instance of this application and delete its instance configuration.";
}
public int pageType() {
return APP_PAGE;
}
public String question() {
return "Are you sure you want to delete this instance (" + instance.displayName() + " running on " + instance.hostName() + ")";
}
});
}