summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2011-10-12 18:42:21 (EDT)
committer Roberto E. Escobar2011-10-12 18:42:21 (EDT)
commit97040753cf2f41c8e66d85409b99b09e520d6640 (patch)
tree905e99631382e3624c3a522ae0e0ad000f9f3aa1
parentca4e24846dff19dba7f528f7e2a2329e3ca4b7ba (diff)
downloadorg.eclipse.osee-97040753cf2f41c8e66d85409b99b09e520d6640.zip
org.eclipse.osee-97040753cf2f41c8e66d85409b99b09e520d6640.tar.gz
org.eclipse.osee-97040753cf2f41c8e66d85409b99b09e520d6640.tar.bz2
feature[ats_Q9NLC]: Implement setErrorMessage in components
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderComponent.java15
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java15
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java15
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java15
4 files changed, 56 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderComponent.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderComponent.java
index 7f267f0..babd0ae 100644
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderComponent.java
+++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderComponent.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.display.api.data.WebId;
import org.eclipse.osee.display.view.web.CssConstants;
import org.eclipse.osee.display.view.web.components.OseeLogoLink;
import org.eclipse.osee.display.view.web.search.OseeSearchHeaderComponent;
+import com.vaadin.Application;
import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.event.Action;
@@ -33,6 +34,8 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.Notification;
/**
* @author Shawn F. Cook
@@ -273,7 +276,17 @@ public class AtsSearchHeaderComponent extends OseeSearchHeaderComponent implemen
@Override
public void setErrorMessage(String message) {
- //TODO:
+ Application app = this.getApplication();
+ if (app != null) {
+ Window mainWindow = app.getMainWindow();
+ if (mainWindow != null) {
+ mainWindow.showNotification(message, Notification.TYPE_ERROR_MESSAGE);
+ } else {
+ System.out.println("AtsSearchHeaderComponent.setErrorMessage - ERROR: Application.getMainWindow() returns null value.");
+ }
+ } else {
+ System.out.println("AtsSearchHeaderComponent.setErrorMessage - ERROR: getApplication() returns null value.");
+ }
}
//TODO: None of this works because Vaadin only supports key actions for Windows and Panel Objects. (this is
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
index b363726..28f9b0b 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
@@ -15,9 +15,12 @@ import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.osee.display.api.components.AttributeComponent;
import org.eclipse.osee.display.view.web.CssConstants;
+import com.vaadin.Application;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.Notification;
/**
* @author Shawn F. Cook
@@ -104,7 +107,17 @@ public class OseeAttributeComponent extends VerticalLayout implements AttributeC
@Override
public void setErrorMessage(String message) {
- //TODO:
+ Application app = this.getApplication();
+ if (app != null) {
+ Window mainWindow = app.getMainWindow();
+ if (mainWindow != null) {
+ mainWindow.showNotification(message, Notification.TYPE_ERROR_MESSAGE);
+ } else {
+ System.out.println("OseeAttributeComponent.setErrorMessage - ERROR: Application.getMainWindow() returns null value.");
+ }
+ } else {
+ System.out.println("OseeAttributeComponent.setErrorMessage - ERROR: getApplication() returns null value.");
+ }
}
@Override
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java
index c0f306c..3640713 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeRelationsComponent.java
@@ -17,12 +17,15 @@ import org.eclipse.osee.display.api.search.SearchNavigator;
import org.eclipse.osee.display.api.search.SearchPresenter;
import org.eclipse.osee.display.view.web.CssConstants;
import org.eclipse.osee.display.view.web.OseeUiApplication;
+import com.vaadin.Application;
import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.ListSelect;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.Notification;
/**
* @author Shawn F. Cook
@@ -177,6 +180,16 @@ public class OseeRelationsComponent extends VerticalLayout implements RelationCo
@Override
public void setErrorMessage(String message) {
- //TODO:
+ Application app = this.getApplication();
+ if (app != null) {
+ Window mainWindow = app.getMainWindow();
+ if (mainWindow != null) {
+ mainWindow.showNotification(message, Notification.TYPE_ERROR_MESSAGE);
+ } else {
+ System.out.println("OseeRelationsComponent.setErrorMessage - ERROR: Application.getMainWindow() returns null value.");
+ }
+ } else {
+ System.out.println("OseeRelationsComponent.setErrorMessage - ERROR: getApplication() returns null value.");
+ }
}
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java
index 6a5bdfe..c8fcf72 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java
@@ -20,11 +20,14 @@ import org.eclipse.osee.display.api.components.SearchResultsListComponent;
import org.eclipse.osee.display.view.web.CssConstants;
import org.eclipse.osee.display.view.web.components.OseePagingComponent.PageSelectedEvent;
import org.eclipse.osee.display.view.web.components.OseePagingComponent.PageSelectedListener;
+import com.vaadin.Application;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.Notification;
/**
* @author Shawn F. Cook
@@ -137,7 +140,17 @@ public class OseeSearchResultsListComponent extends VerticalLayout implements Se
@Override
public void setErrorMessage(String message) {
- //TODO:
+ Application app = this.getApplication();
+ if (app != null) {
+ Window mainWindow = app.getMainWindow();
+ if (mainWindow != null) {
+ mainWindow.showNotification(message, Notification.TYPE_ERROR_MESSAGE);
+ } else {
+ System.out.println("OseeSearchResultsListComponent.setErrorMessage - ERROR: Application.getMainWindow() returns null value.");
+ }
+ } else {
+ System.out.println("OseeSearchResultsListComponent.setErrorMessage - ERROR: getApplication() returns null value.");
+ }
}
@Override