@@ -0,0 +1,1718 @@
+/*%0A * Copyright %5B2014%5D %5BShopWiki%5D%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.shopwiki.vaadin;%0A%0Aimport com.vaadin.terminal.UserError;%0Aimport com.vaadin.ui.AbstractComponent;%0Aimport com.vaadin.ui.Component;%0Aimport com.vaadin.ui.Window.Notification;%0A%0A/**%0A * @owner rstewart%0A */%0Apublic class Errors %7B // TODO: Move this to Edhotan ???%0A%0A%09private Errors() %7B%0A%09%09// can't instantiate%0A%09%7D%0A%0A%09public static void notify(Component component, String caption, String description) %7B%0A%09%09component.getWindow().showNotification(caption, description, Notification.TYPE_ERROR_MESSAGE);%0A%09%7D%0A%0A%09public static void notify(Component component, String caption, Throwable t) %7B%0A%09%09notify(component, caption, Utils.stackTraceAsString(t));%0A%09%7D%0A%0A%09public static void notify(Component component, String caption) %7B%0A%09%09notify(component, caption, (String)null);%0A%09%7D%0A%0A%09public static void set(AbstractComponent component, Throwable t) %7B%0A%09%09set(component, t.toString());%0A%09%09notify(component, %22ERROR%22, t);%0A%09%7D%0A%0A%09public static void set(AbstractComponent component, String errorMsg) %7B%0A%09%09component.setComponentError(new UserError(errorMsg));%0A%09%7D%0A%0A%09public static void clear(AbstractComponent component) %7B%0A%09%09component.setComponentError(null);%0A%09%7D%0A%7D%0A

Add Errors.java