From 2be8a0ae02a53af28a091787a8e42dd4ff65cfdc Mon Sep 17 00:00:00 2001 From: "David E. Jones" Date: Tue, 30 Jan 2007 04:01:03 +0000 Subject: [PATCH] Added formlet to remove a single table for an entity git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@501304 13f79535-47bb-0310-9956-ffa450edef68 --- .../webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh | 7 +++++-- framework/webtools/webapp/webtools/entity/CheckDb.ftl | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh b/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh index 26ed0b7035..50c3c3b188 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh @@ -58,10 +58,13 @@ if (security.hasPermission("ENTITY_MAINT", session)) { } else if ("removetables".equals(option)) { Iterator modelEntityNameIter = modelEntityNames.iterator(); while (modelEntityNameIter.hasNext()) { - String modelEntityName = (String) modelEntityNameIter.next(); - ModelEntity modelEntity = (ModelEntity) modelEntities.get(modelEntityName); + String modelEntityName = (String) modelEntityNameIter.next(); + ModelEntity modelEntity = (ModelEntity) modelEntities.get(modelEntityName); dbUtil.deleteTable(modelEntity, messages); } + } else if ("removetable".equals(option)) { + ModelEntity modelEntity = (ModelEntity) modelEntities.get(entityName); + dbUtil.deleteTable(modelEntity, messages); } else if ("removepks".equals(option)) { Iterator modelEntityNameIter = modelEntityNames.iterator(); while (modelEntityNameIter.hasNext()) { diff --git a/framework/webtools/webapp/webtools/entity/CheckDb.ftl b/framework/webtools/webapp/webtools/entity/CheckDb.ftl index 7239c3944d..2dff8ffc00 100644 --- a/framework/webtools/webapp/webtools/entity/CheckDb.ftl +++ b/framework/webtools/webapp/webtools/entity/CheckDb.ftl @@ -40,9 +40,15 @@ under the License.
${uiLabelMap.WebtoolsGroupName}: - +
+
+ + ${uiLabelMap.WebtoolsGroupName}: + ${uiLabelMap.WebtoolsEntityName}: + +

${uiLabelMap.WebtoolsCreateRemoveAllPrimaryKeys}