Author: jonesde
Date: Mon Jan 29 20:01:03 2007 New Revision: 501304 URL: http://svn.apache.org/viewvc?view=rev&rev=501304 Log: Added formlet to remove a single table for an entity Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh ofbiz/trunk/framework/webtools/webapp/webtools/entity/CheckDb.ftl Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh?view=diff&rev=501304&r1=501303&r2=501304 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.bsh Mon Jan 29 20:01:03 2007 @@ -58,10 +58,13 @@ } 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()) { Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/CheckDb.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/CheckDb.ftl?view=diff&rev=501304&r1=501303&r2=501304 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/entity/CheckDb.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/CheckDb.ftl Mon Jan 29 20:01:03 2007 @@ -40,8 +40,14 @@ <form method="post" action="${encodeURLCheckDb}" name="TablesRemoveForm"> <input type="hidden" name="option" value="removetables"/> ${uiLabelMap.WebtoolsGroupName}: <input type="text" class="inputBox" name="groupName" value="${groupName}" size="40"/> - <input type="submit" value="${uiLabelMap.CommonRemove}" name="TablesRemoveButton" disabled/> + <input type="submit" value="${uiLabelMap.CommonRemove}" name="TablesRemoveButton" disabled="disabled"/> <input type="button" value="${uiLabelMap.WebtoolsEnable}" onClick="enableTablesRemove();"/> + </form> + <form method="post" action="${encodeURLCheckDb}" name="TableRemoveForm"> + <input type="hidden" name="option" value="removetable"/> + ${uiLabelMap.WebtoolsGroupName}: <input type="text" class="inputBox" name="groupName" value="${groupName}" size="20"/> + ${uiLabelMap.WebtoolsEntityName}: <input type="text" class="inputBox" name="entityName" value="${entityName}" size="20"/> + <input type="submit" value="${uiLabelMap.CommonRemove}" name="TablesRemoveButton"/> </form> <h3>${uiLabelMap.WebtoolsCreateRemoveAllPrimaryKeys}</h3> <form method="post" action="${encodeURLCheckDb}"> |
Free forum by Nabble | Edit this page |