hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java
@@ -75,6 +75,38 @@ return null; } public Form createDeleteForm() { try { MainApplication application = module.getApplication(); ModuleConfig config = module.getModuleConfig(); Map<String, String> where = new HashMap<String, String>(); where.put(findIdKey(), entityId.toString()); Object searchResult = application.getRemote().callSearch(config.getRemoteName(), where); if (searchResult instanceof Object[]) { Map<?, ?> row = (Map<?, ?>) (((Object[]) searchResult)[0]); Form f = new Form(); f.setCaption(config.getLabel("delete")); f.setData(entityId); Layout layout = f.getLayout(); for (PropertyConfig prop : config.getPropertyList()) { if (prop.getPropFieldFactory().getClass().equals(DefaultPropertyFieldFactory.class) && prop.getPropTableColumn().equals(PropertyTableColumn.DISPLAY)) { PropertyFieldFactory propFieldFactory = prop.getPropFieldFactory(); Object value = row.get(prop.getId()); Component component = (Component) propFieldFactory.createFieldComponent(prop, value); component.setReadOnly(true); layout.addComponent(component); } } return f; } } catch (HsarwebException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } private String findIdKey() { List<PropertyConfig> propertyList = module.getModuleConfig().getPropertyList(); String idKey = null; hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
@@ -13,13 +13,12 @@ import com.vaadin.terminal.Sizeable; import com.vaadin.terminal.ThemeResource; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Form; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Label; import com.vaadin.ui.Table; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.themes.BaseTheme; import de.hsadmin.web.DeleteAble; @@ -260,6 +259,7 @@ private Button createDeleteButton(long id) { ThemeResource icon = new ThemeResource("../runo/icons/16/document-delete.png"); final Button button = new Button(); final Module thisModule = module; button.setIcon(icon); button.setDescription(module.getApplication().getLocaleConfig().getText("delete")); button.setData(id); @@ -269,14 +269,16 @@ private Window childWindow; @Override public void buttonClick(ClickEvent event) { final GenericForm genericForm = new GenericForm(thisModule, (Long) button.getData()); final Form form = genericForm.createDeleteForm(); final MainApplication application = module.getApplication(); LocaleConfig localeConfig = application.getLocaleConfig(); childWindow = new Window(module.getModuleConfig().getLabel("moduletitle") + " " + localeConfig.getText("delete")); childWindow.setWidth(320.0f, Sizeable.UNITS_PIXELS); childWindow.setWidth(640.0f, Sizeable.UNITS_PIXELS); VerticalLayout vLayout = new VerticalLayout(); vLayout.setMargin(true); vLayout.setSpacing(true); vLayout.addComponent(new Label(localeConfig.getText("confirmdelete"))); vLayout.addComponent(form); HorizontalLayout hLayout = new HorizontalLayout(); Button btDeleteRow = new Button(localeConfig.getText("delete")); btDeleteRow.addListener(new Button.ClickListener() { hsarweb/src/texts/domain.properties
@@ -7,4 +7,5 @@ moduletitle=domains moduleicon=../runo/icons/16/document-web.png new=configure domain update=update domain update=update domain delete=delete domain hsarweb/src/texts/domain_de.properties
@@ -7,4 +7,5 @@ moduletitle=Domains moduleicon=../runo/icons/16/document-web.png new=Domain konfigurieren update=Domaindaten ändern update=Domainkonfiguration ändern delete=Domainkonfiguration löschen hsarweb/src/texts/emailaddress.properties
@@ -10,4 +10,5 @@ moduletitle=email addresses moduleicon=../runo/icons/16/email.png new=create address update=update address update=update address delete=delete address hsarweb/src/texts/emailaddress_de.properties
@@ -10,4 +10,5 @@ moduletitle=EMail Adressen moduleicon=../runo/icons/16/email.png new=EMail-Adresse anlegen update=EMail-Adresse ändern update=EMail-Adresse ändern delete=EMail-Adresse löschen hsarweb/src/texts/emailalias.properties
@@ -5,4 +5,5 @@ moduletitle=email aliases moduleicon=../runo/icons/16/email-send.png new=create alias update=update alias update=update alias delete=delete alias hsarweb/src/texts/emailalias_de.properties
@@ -5,4 +5,5 @@ moduletitle=EMail Aliases moduleicon=../runo/icons/16/email-send.png new=EMail-Alias anlegen update=EMail-Alias ändern update=EMail-Alias ändern delete=EMail-Alias löschen hsarweb/src/texts/mysqldb.properties
@@ -4,6 +4,7 @@ encoding=encoding owner=owner moduletitle=mysql db new=create db update=update db new=create database update=database delete=delete database moduleicon=../hs/icons/table.png hsarweb/src/texts/mysqldb_de.properties
@@ -5,5 +5,6 @@ owner=Verwalter moduletitle=MySQL DB new=Datenbank anlegen update=Datenbank ändern update=Datenbank delete=Datenbank löschen moduleicon=../hs/icons/table.png hsarweb/src/texts/mysqluser.properties
@@ -7,4 +7,5 @@ moduletitle=mysql user new=create user update=change password delete=delete user moduleicon=../hs/icons/table_key.png hsarweb/src/texts/mysqluser_de.properties
@@ -7,4 +7,5 @@ moduletitle=MySQL User new=User anlegen update=Passwort ändern delete=User löschen moduleicon=../hs/icons/table_key.png hsarweb/src/texts/postgresqldb.properties
@@ -4,6 +4,7 @@ encoding=encoding owner=owner moduletitle=postgresql db new=create db new=create database update=database delete=delete database moduleicon=../hs/icons/database.png hsarweb/src/texts/postgresqldb_de.properties
@@ -6,4 +6,5 @@ moduletitle=PostgreSQL DB new=Datenbank anlegen update=Datenbank delete=Datenbank löschen moduleicon=../hs/icons/database.png hsarweb/src/texts/postgresqluser.properties
@@ -7,4 +7,5 @@ moduletitle=postgres user new=create user update=change password delete=delete user moduleicon=../hs/icons/database_key.png hsarweb/src/texts/postgresqluser_de.properties
@@ -7,4 +7,5 @@ moduletitle=PostgreSQL User new=User anlegen update=Passwort ändern delete=User löschen moduleicon=../hs/icons/database_key.png hsarweb/src/texts/user.properties
@@ -13,4 +13,5 @@ moduletitle=unix user new=create user update=update user delete=delete user moduleicon=../runo/icons/16/users.png hsarweb/src/texts/user_de.properties
@@ -13,4 +13,5 @@ moduletitle=Unix User moduleicon=../runo/icons/16/users.png new=Benutzer anlegen update=Benutzer ändern update=Benutzer ändern delete=Benutzer löschen