2d part and end of an effort to remove trailing spaces

[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2009-04-08 10:54:51 +00:00
parent af6b6e5187
commit b9c3ddef08
2213 changed files with 21453 additions and 21464 deletions
@@ -49,7 +49,7 @@ if (security.hasPermission("ENTITY_MAINT", session)) {
entity.setTableName(ModelUtil.javaNameToDbName(entity.getEntityName()));
reader.getEntityCache().put(entity.getEntityName(), entity);
entityName = entity.getEntityName();
String entityGroup = request.getParameter("entityGroup");
delegator.getModelGroupReader().getGroupCache().put(entityName, entityGroup);
}
@@ -132,7 +132,7 @@ if (security.hasPermission("ENTITY_MAINT", session)) {
int kmNum = Integer.parseInt(request.getParameter("kmNum"));
String fieldName = request.getParameter("fieldName");
String relFieldName = request.getParameter("relFieldName");
ModelRelation relation = entity.getRelation(relNum);
ModelEntity relEntity = reader.getModelEntity(relation.getRelEntityName());
ModelKeyMap keyMap = relation.getKeyMap(kmNum);
@@ -479,11 +479,11 @@ A.listtext:hover {color:red;}
</td>
<td>
<INPUT type=SUBMIT value='Set'>
</td>
</td>
<TD><A href='<ofbiz:url>/view/EditEntity?entityName=<%=entityName%>&relNum=<%=r%>&kmNum=<%=km%>&event=removeKeyMap</ofbiz:url>'>Remove</A></TD>
</FORM>
</tr>
<%}%>
<%}%>
<%}%>
</TABLE>
@@ -20,7 +20,7 @@ under the License.
<h1>${uiLabelMap.WebtoolsExportFromDataSource}</h1>
<br />
<p>
${uiLabelMap.WebtoolsXMLExportInfo}
${uiLabelMap.WebtoolsXMLExportInfo}
</p>
<#if results?has_content>
<hr/>
@@ -22,7 +22,7 @@ under the License.
<li class="h3">${uiLabelMap.WebtoolsEntityDataMaintenance}</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<p>
<form target="<@ofbizUrl>/entitymaint</@ofbizUrl>">
@@ -48,7 +48,7 @@ under the License.
<#assign anchor="">
<#assign alt_row = false>
<#assign right_col = false>
<#list entitiesList as entity>
<#if entity.entityName?substring(0, 1) != firstChar>
<#assign firstChar = entity.entityName?substring(0, 1)>
@@ -62,7 +62,7 @@ under the License.
<li class="h3">${uiLabelMap.WebtoolsEntitiesAlpha}</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<#assign firstChar = "*">
<table class="basic-table hover-bar" cellspacing='0'>
@@ -89,7 +89,7 @@ under the License.
<#if !right_col>
<tr<#if alt_row> class="alternate-row"</#if>>
</#if>
<td<#if anchor?has_content> ${anchor}</#if>>${entity.entityName}<#if entity.viewEntity == 'Y'>&nbsp;(${uiLabelMap.WebtoolsEntityView})</#if></td>
<#assign anchor="">
<td class="button-col">
@@ -48,7 +48,7 @@ under the License.
<a href="<@ofbizUrl>ModelGroupWriter?savetofile=true</@ofbizUrl>" target='_blank'>Save Entity Group XML to File</A><BR>
-->
<a href="<@ofbizUrl>view/ModelInduceFromDb</@ofbizUrl>" target='_blank'>${uiLabelMap.WebtoolsInduceModelXMLFromDatabase}</A><BR>
</#if>
</#if>
<#if packageNames?has_content>
<hr/>
<div class="section-header">${uiLabelMap.WebtoolsEntityPackages}</div>
@@ -52,10 +52,10 @@ under the License.
</div>
<#assign numberShowed = 0>
<#list packagesList as package>
<hr/><div id='${package.packageName}' class='packagetext'>${package.packageName}</div><hr/>
<hr/><div id='${package.packageName}' class='packagetext'>${package.packageName}</div><hr/>
<#list package.entitiesList as entity>
<table width="95%" border="1" cellpadding='2' cellspacing='0'>
<tr class='entityheader'>
<tr class='entityheader'>
<td colspan="5">
<div id='${entity.entityName}' class="titletext">
${uiLabelMap.WebtoolsEntity}: ${entity.entityName}
@@ -69,8 +69,8 @@ under the License.
<a target='main' href="<@ofbizUrl>ArtifactInfo?name=${entity.entityName}&type=entity</@ofbizUrl>">[${uiLabelMap.WebtoolsArtifactInfo}]</a>
</#if>
</div>
<#if entity.description?has_content &&
!entity.description.equalsIgnoreCase("NONE") &&
<#if entity.description?has_content &&
!entity.description.equalsIgnoreCase("NONE") &&
!entity.description.equalsIgnoreCase("")>
<div>${entity.description}</div>
</#if>
@@ -109,16 +109,16 @@ under the License.
</tr>
</#list>
<#if entity.relationsList?has_content>
<tr class='entityheader'>
<tr class='entityheader'>
<td colspan="5"><hr/></td>
</tr>
<tr class='headertext'>
<tr class='headertext'>
<th>${uiLabelMap.WebtoolsRelation}</th>
<th colspan='4'>${uiLabelMap.WebtoolsRelationType}</th>
</tr>
<#list entity.relationsList as relation>
<tr class='relationtext'>
<td>
<tr class='relationtext'>
<td>
<#if relation.title?has_content><b>${relation.title}</b> </#if><a href='#${relation.relEntity}'>${relation.relEntity}</a>
<#if relation.fkName?has_content>
<br/>${uiLabelMap.WebtoolsFKName}: ${relation.fkName}
@@ -133,7 +133,7 @@ under the License.
&nbsp;
</#if>
<#if relation.keysList?has_content>
<#list relation.keysList as keyList>
<#list relation.keysList as keyList>
<br/>&nbsp;&nbsp;${keyList.row})&nbsp;
<#if keyList.fieldName == keyList.relFieldName>
${keyList.fieldName}
@@ -143,31 +143,31 @@ under the License.
</#list>
</#if>
</td>
</tr>
</tr>
</#list>
</#if>
<#if entity.indexList?has_content>
<tr class='entityheader'>
<tr class='entityheader'>
<td colspan="5"><hr/></td>
</tr>
<tr class='headertext'>
<tr class='headertext'>
<th>${uiLabelMap.WebtoolsIndexName}</th>
<th colspan='4'>${uiLabelMap.WebtoolsIndexFieldList}</th>
</tr>
<#list entity.indexList as index>
<tr class='relationtext'>
<tr class='relationtext'>
<td>${index.name}</td>
<td width="60%" colspan='4'>
<#list index.fieldNameList as fieldName>
${fieldName}
</#list>
</td>
</tr>
</tr>
</#list>
</#if>
</table>
<br/>
<#assign numberShowed = numberShowed + 1>
<br/>
<#assign numberShowed = numberShowed + 1>
</#list>
</#list>
<div align="center">
@@ -30,7 +30,7 @@ under the License.
<#-- bookmark section -->
<fo:bookmark-tree>
<#list packagesList as package>
<#assign packageName = package.packageName/>
<#assign packageName = package.packageName/>
<fo:bookmark internal-destination="${packageName}">
<fo:bookmark-title>${packageName}</fo:bookmark-title>
<#list package.entitiesList as entity>
@@ -41,13 +41,13 @@ under the License.
</fo:bookmark>
</#list>
</fo:bookmark-tree>
<#-- report section -->
<#list packagesList as package>
<#assign packageName = package.packageName/>
<#assign newPackage = true/>
<#list package.entitiesList as entity>
<fo:page-sequence master-reference="letter-portrait">
<#-- header -->
<fo:static-content flow-name="xsl-region-before">
@@ -154,7 +154,7 @@ under the License.
<fo:block>
${relation.type}:
<#if relation.keysList?has_content>
<#list relation.keysList as keyList>
<#list relation.keysList as keyList>
${keyList.row}
<#if keyList.fieldName == keyList.relFieldName>
${keyList.fieldName}
@@ -22,7 +22,7 @@ under the License.
<li class="h3">${uiLabelMap.WebtoolsSqlProcessor}</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<form method="post" action="EntitySQLProcessor" name="EntitySQLCommand">
<table class="basic-table" cellspacing="0">
@@ -70,13 +70,13 @@ under the License.
<li class="h3">${uiLabelMap.WebtoolsResults}</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<#if resultMessage?has_content>
${resultMessage}
<br />
</#if>
<#if columns?has_content>
<table class="basic-table hover-bar" cellspacing="0">
<tr class="header-row">
@@ -22,7 +22,7 @@ under the License.
<li class="h3">${uiLabelMap.WebtoolsFindValues}</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<h2>${uiLabelMap.WebtoolsForEntity}: ${entityName}</h2>
<br/>
@@ -41,7 +41,7 @@ under the License.
<li class="h3">${uiLabelMap.WebtoolsToFindAll} ${entityName}, ${uiLabelMap.WebtoolsLeaveAllEntriesBlank}.</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<form method="post" action="<@ofbizUrl>FindGeneric?entityName=${entityName}</@ofbizUrl>">
<input type="hidden" name="find" value="true">
@@ -69,19 +69,19 @@ under the License.
</table>
</form>
<br/>
<#if hasCreatePermission == 'Y'>
<div class="button-bar">
<a href='<@ofbizUrl>ViewGeneric?entityName=${entityName}</@ofbizUrl>' class="smallSubmit">${uiLabelMap.CommonCreateNew} ${entityName}</a>
</div>
</#if>
<#macro tableNav>
<div class="button-bar">
<ul>
<#if (viewIndex > 0)>
<li><a href='<@ofbizUrl>FindGeneric?${curFindString}&amp;VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndexFirst}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonFirst}</a></li>
<li>|</li>
<li>|</li>
<li><a href='<@ofbizUrl>FindGeneric?${curFindString}&amp;VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndexPrevious}</@ofbizUrl>' class="nav-previous">${uiLabelMap.CommonPrevious}</a></li>
<li>|</li>
</#if>
@@ -91,7 +91,7 @@ under the License.
<#if (arraySize > highIndex)>
<li>|</li>
<li><a href='<@ofbizUrl>FindGeneric?${curFindString}&amp;VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndexNext}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonNext}</a></li>
<li>|</li>
<li>|</li>
<li><a href='<@ofbizUrl>FindGeneric?${curFindString}&amp;VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndexLast}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonLast}</a></li>
</#if>
</ul>
@@ -109,7 +109,7 @@ under the License.
<li class="h3">${uiLabelMap.WebtoolsFindValuesResults}</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<table class="basic-table hover-bar" cellspacing="0">
<tr class="header-row">
@@ -142,11 +142,11 @@ under the License.
</tr>
</#if>
</table>
<#if (arraySize > 0)>
<@tableNav/>
</#if>
<#if hasCreatePermission == 'Y'>
<a href='<@ofbizUrl>ViewGeneric?entityName=${entityName}</@ofbizUrl>' class="smallSubmit">${uiLabelMap.CommonCreateNew} ${entityName}</a>
<#else>
@@ -78,7 +78,7 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<%
<%
ModelReader reader = delegator.getModelReader();
ModelGroupReader groupReader = delegator.getModelGroupReader();
@@ -96,7 +96,7 @@ under the License.
<!-- ========================================================= -->
<!-- No Package Name -->
<!-- ========================================================= -->
<%
<%
Iterator ecIter = newEntList.iterator();
while(ecIter.hasNext()) {
ModelEntity entity = (ModelEntity) ecIter.next();
@@ -137,7 +137,7 @@ under the License.
</entitymodel>
<%
}
}
}
}
else {
%>ERROR: You do not have permission to use this page (ENTITY_MAINT needed)<%
@@ -55,7 +55,7 @@ if (security.hasPermission("ENTITY_MAINT", session) || request.getParameter("ori
<%=url.toString()%>?originalLoaderName=<%=resourceHandler.getLoaderName()%>&originalLocation=<%=resourceHandler.getLocation()%>
<%
} else {
%>Cannot write to location <%=resourceHandler.getLocation()%> from
%>Cannot write to location <%=resourceHandler.getLocation()%> from
loader <%=resourceHandler.getLoaderName()%>, it is not a file.<%
}
}
@@ -85,7 +85,7 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<%
<%
//GenericDelegator delegator = GenericHelperFactory.getDefaultHelper();
ModelReader reader = delegator.getModelReader();
Map packages = new HashMap();
@@ -23,7 +23,7 @@ under the License.
.topcontainerhidden { POSITION: absolute; VISIBILITY: hidden; }
</style>
<script language="JavaScript" type="text/javascript">
<script language="JavaScript" type="text/javascript">
var numTabs=${(entity.getRelationsSize()+1)};
function ShowTab(lname) {
for(inc=1; inc <= numTabs; inc++) {
@@ -38,7 +38,7 @@ function ShowTab(lname) {
<li class="h3">${uiLabelMap.WebtoolsViewValue}</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<h2>${uiLabelMap.WebtoolsForEntity}: ${entityName}</h2>
<h2>${uiLabelMap.WebtoolsWithPk}: ${findByPk}</h2>
@@ -49,13 +49,13 @@ function ShowTab(lname) {
<#if hasCreatePermission>
<a href='<@ofbizUrl>ViewGeneric?entityName=${entityName}&enableEdit=true</@ofbizUrl>' class="smallSubmit">${uiLabelMap.CommonCreateNew}</a>
<a href=<@ofbizUrl>ViewGeneric?${curFindString}&enableEdit=true</@ofbizUrl> class="smallSubmit">${uiLabelMap.CommonEdit}</a>
</#if>
</#if>
<#if value?has_content>
<#if hasDeletePermission>
<a href='<@ofbizUrl>UpdateGeneric?UPDATE_MODE=DELETE&${curFindString}</@ofbizUrl>' class="smallSubmit">${uiLabelMap.WebtoolsDeleteThisValue}</a>
</#if>
</#if>
</#if>
</#if>
</#if>
</div>
<#if value?has_content>
<form name="relationForm">
@@ -68,15 +68,15 @@ function ShowTab(lname) {
</select>
</form>
<br/>
</#if>
</#if>
<div id="area1" class="screenlet">
<div class="screenlet-title-bar">
<h3>${uiLabelMap.WebtoolsEntityCurrentValue}</h3>
</div>
<#if value?has_content>
<#if value?has_content>
<#assign alt_row = false>
<table class="basic-table" cellspacing="0">
<#list fields as field>
<#list fields as field>
<tr<#if alt_row> class="alternate-row"</#if>>
<td class="label">${field.name}</td>
<td>${field.value}</td>
@@ -102,11 +102,11 @@ function ShowTab(lname) {
<#assign showFields = true>
<#assign alt_row = false>
<table class="basic-table" cellspacing="0">
<#if value?has_content>
<#if value?has_content>
<#if hasUpdatePermission>
<#if newFieldPkList?has_content>
<input type="hidden" name="UPDATE_MODE" value="UPDATE"/>
<#list newFieldPkList as field>
<#list newFieldPkList as field>
<tr<#if alt_row> class="alternate-row"</#if>>
<td class="label">${field.name}</td>
<td>
@@ -120,37 +120,37 @@ function ShowTab(lname) {
<#else>
${uiLabelMap.WebtoolsEntityCretePermissionError} ${entityName} ${plainTableName}
<#assign showFields = false>
</#if>
</#if>
<#else>
<#if hasCreatePermission>
<#if newFieldPkList?has_content>
<p>${uiLabelMap.WebtoolsYouMayCreateAnEntity}</p>
<input type="hidden" name="UPDATE_MODE" value="CREATE"/>
<#list newFieldPkList as field>
<#list newFieldPkList as field>
<tr<#if alt_row> class="alternate-row"</#if>>
<td class="label">${field.name}</td>
<td>
<#if field.fieldType == 'DateTime'>
<#if field.fieldType == 'DateTime'>
DateTime(YYYY-MM-DD HH:mm:SS.sss):<input type="text" name="${field.name}" size="24" value="${field.value}">
<a href="javascript:call_cal(document.updateForm.${field.name}, '${field.value}');" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Click here For Calendar'></a>
<#elseif field.fieldType == 'Date'>
<#elseif field.fieldType == 'Date'>
Date(YYYY-MM-DD):<input type="text" name="${field.name}" size="11" value="${field.value}">
<a href="javascript:call_cal(document.updateForm.${field.name}, '${field.value}');" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Click here For Calendar'></a>
<#elseif field.fieldType == 'Time'>
<#elseif field.fieldType == 'Time'>
Time(HH:mm:SS.sss):<input type="text" size="6" maxlength="10" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Integer'>
<#elseif field.fieldType == 'Integer'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Long'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Double'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Float'>
<#elseif field.fieldType == 'Long'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'StringOneRow'>
<#elseif field.fieldType == 'Double'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Float'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'StringOneRow'>
<input type="text" size="${field.stringLength}" maxlength="${field.stringLength}" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'String'>
<#elseif field.fieldType == 'String'>
<input type="text" size="80" maxlength="${field.stringLength}" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Textarea'>
<#elseif field.fieldType == 'Textarea'>
<textarea cols="60" rows="3" maxlength="${field.stringLength}" name="${field.name}">${field.value}</textarea>
</#if>
</td>
@@ -161,36 +161,36 @@ function ShowTab(lname) {
<#else>
<p>${uiLabelMap.WebtoolsEntityCretePermissionError} ${entityName} ${plainTableName}</p>
<#assign showFields = false>
</#if>
</#if>
</#if>
<#if showFields>
<#if newFieldNoPkList?has_content>
<#assign alt_row = false>
<#list newFieldNoPkList as field>
<#list newFieldNoPkList as field>
<tr<#if alt_row> class="alternate-row"</#if>>
<td class="label">${field.name}</td>
<td>
<#if field.fieldType == 'DateTime'>
<#if field.fieldType == 'DateTime'>
DateTime(YYYY-MM-DD HH:mm:SS.sss):<input type="text" name="${field.name}" size="24" value="${field.value}">
<a href="javascript:call_cal(document.updateForm.${field.name}, '${field.value}');" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Click here For Calendar'></a>
<#elseif field.fieldType == 'Date'>
<#elseif field.fieldType == 'Date'>
Date(YYYY-MM-DD):<input type="text" name="${field.name}" size="11" value="${field.value}">
<a href="javascript:call_cal(document.updateForm.${field.name}, '${field.value}');" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Click here For Calendar'></a>
<#elseif field.fieldType == 'Time'>
<#elseif field.fieldType == 'Time'>
Time(HH:mm:SS.sss):<input type="text" size="6" maxlength="10" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Integer'>
<#elseif field.fieldType == 'Integer'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Long'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Double'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Float'>
<#elseif field.fieldType == 'Long'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'StringOneRow'>
<#elseif field.fieldType == 'Double'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Float'>
<input type="text" size="20" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'StringOneRow'>
<input type="text" size="${field.stringLength}" maxlength="${field.stringLength}" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'String'>
<#elseif field.fieldType == 'String'>
<input type="text" size="80" maxlength="${field.stringLength}" name="${field.name}" value="${field.value}">
<#elseif field.fieldType == 'Textarea'>
<#elseif field.fieldType == 'Textarea'>
<textarea cols="60" rows="3" maxlength="${field.stringLength}" name="${field.name}">${field.value}</textarea>
</#if>
</td>
@@ -225,7 +225,7 @@ function ShowTab(lname) {
<li><a href="<@ofbizUrl>FindGeneric?${relation.encodeRelatedEntityFindString}&amp;find=true</@ofbizUrl>">${uiLabelMap.CommonFind}</a></li>
<#if relation.valueRelated?has_content>
<li><a href="<@ofbizUrl>ViewGeneric?${relation.encodeRelatedEntityFindString}</@ofbizUrl>">${uiLabelMap.CommonView}</a></li>
</#if>
</#if>
<#if hasAllCreate || relCreate>
<li><a href="<@ofbizUrl>ViewGeneric?${relation.encodeRelatedEntityFindString}&amp;enableEdit=true</@ofbizUrl>">${uiLabelMap.CommonCreate}</a></li>
</#if>
@@ -243,7 +243,7 @@ function ShowTab(lname) {
<tr<#if alt_row> class="alternate-row"</#if>>
<td class="label">${relatedField.name}</td>
<td>${relatedField.value}</td>
</tr>
</tr>
<#assign alt_row = !alt_row>
</#list>
</table>
@@ -254,7 +254,7 @@ function ShowTab(lname) {
<a href="<@ofbizUrl>FindGeneric?${relation.encodeRelatedEntityFindString}&amp;find=true</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonFind}</a>
</#if>
</#if>
</div>
</div>
</#list>
</#if>
</div>
@@ -22,7 +22,7 @@ under the License.
<li class="h3">${uiLabelMap.WebtoolsRelations}</li>
</ul>
<br class="clear"/>
</div>
</div>
<div class="screenlet-body">
<#if hasViewPermission>
<br/>
@@ -36,7 +36,7 @@ INSERT INTO SECURITY_GROUP_PERMISSION (GROUP_ID,PERMISSION_ID) VALUES ('FLEXADMI
INSERT INTO SECURITY_GROUP_PERMISSION (GROUP_ID,PERMISSION_ID) VALUES ('FLEXADMIN','<%=entity.getPlainTableName()%>_DELETE');
<%
}
}
}
else {
%>ERROR: You do not have permission to use this page (ENTITY_MAINT needed)<%
}
@@ -23,9 +23,9 @@ if(security.hasPermission("ENTITY_MAINT", session)) {
TreeSet entities = new TreeSet(ec);
Iterator classNamesIterator = entities.iterator();
while(classNamesIterator != null && classNamesIterator.hasNext()) { ModelEntity entity = reader.getModelEntity((String)classNamesIterator.next());%>
DROP TABLE IF EXISTS <%=entity.getPlainTableName()%>;<%}%>
DROP TABLE IF EXISTS <%=entity.getPlainTableName()%>;<%}%>
<%
}
}
else {
%>ERROR: You do not have permission to use this page (ENTITY_MAINT needed)<%
}
@@ -23,9 +23,9 @@ if(security.hasPermission("ENTITY_MAINT", session)) {
TreeSet entities = new TreeSet(ec);
Iterator classNamesIterator = entities.iterator();
while(classNamesIterator != null && classNamesIterator.hasNext()) { ModelEntity entity = reader.getModelEntity((String)classNamesIterator.next());%>
DROP TABLE <%=entity.getPlainTableName()%>;<%}%>
DROP TABLE <%=entity.getPlainTableName()%>;<%}%>
<%
}
}
else {
%>ERROR: You do not have permission to use this page (ENTITY_MAINT needed)<%
}
@@ -27,9 +27,9 @@ CREATE TABLE <%=entity.getPlainTableName()%> (<%for(int i=0;i<entity.fields.size
<%=field.colName%> <%=type.sqlType%> NOT NULL,<%}else{%>
<%=field.colName%> <%=type.sqlType%>,<%}%><%}%>
CONSTRAINT PK_<%=entity.getPlainTableName()%> PRIMARY KEY (<%=entity.colNameString(entity.pks)%>));
<%}%>
<%}%>
<%
}
}
else {
%>ERROR: You do not have permission to use this page (ENTITY_MAINT needed)<%
}
@@ -52,9 +52,9 @@ under the License.
<#else>
<p>${uiLabelMap.WebtoolsNoFilenameSpecified}</p>
</#if>
<hr/>
<h2>${uiLabelMap.WebtoolsExport}:</h2>
<form method="post" action="<@ofbizUrl>xmldsdump</@ofbizUrl>" name="entityExport">
<table class="basic-table">
@@ -51,7 +51,7 @@ under the License.
passedEntityNames.add(entityName[inc]);
}
}
String preConfiguredSetName = request.getParameter("preConfiguredSetName");
if ("Product1".equals(preConfiguredSetName)) {
passedEntityNames = new LinkedHashSet();
@@ -162,7 +162,7 @@ under the License.
}
boolean checkAll = "true".equals(request.getParameter("checkAll"));
boolean tobrowser = request.getParameter("tobrowser")!=null?true:false;
EntityExpr entityFromCond = null;
EntityExpr entityThruCond = null;
EntityExpr entityDateCond = null;
@@ -179,12 +179,12 @@ under the License.
} else if(entityThruCond!=null) {
entityDateCond = entityThruCond;
}
%>
<%if (tobrowser) {
session.setAttribute("xmlrawdump_entitylist", entityName);
session.setAttribute("entityDateCond", entityDateCond);
%>
%>
<div class="head1">XML Export from DataSource(s)</div>
<div class="tabletext">This page can be used to export data from the database. The exported documents will have a root tag of "&lt;entity-engine-xml&gt;".</div>
<hr/>
@@ -202,7 +202,7 @@ under the License.
int numberOfEntities = passedEntityNames.size();
long numberWritten = 0;
// single file
if(filename != null && filename.length() > 0 && numberOfEntities > 0) {
PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), "UTF-8")));
@@ -210,7 +210,7 @@ under the License.
writer.println("<entity-engine-xml>");
Iterator i = passedEntityNames.iterator();
while(i.hasNext()) {
while(i.hasNext()) {
boolean beganTransaction = TransactionUtil.begin(3600);
try {
String curEntityName = (String)i.next();
@@ -262,7 +262,7 @@ under the License.
boolean beganTransaction = false;
try{
beganTransaction = TransactionUtil.begin(3600);
ModelEntity me = delegator.getModelEntity(curEntityName);
if (me instanceof ModelViewEntity) {
results.add("["+fileNumber +"] [vvv] " + curEntityName + " skipping view entity");
@@ -339,7 +339,7 @@ under the License.
<hr/>
<%if(security.hasPermission("ENTITY_MAINT", session)) {%>
<div class="head2">Results:</div>
<%if(filename != null && filename.length() > 0 && numberOfEntities > 0) {%>
<div class="tabletext">Wrote XML for all data in <%=numberOfEntities%> entities.</div>
<div class="tabletext">Wrote <%=numberWritten%> records to XML file <%=filename%></div>
@@ -351,15 +351,15 @@ under the License.
<%} else {%>
<div class="tabletext">No filename specified or no entity names specified, doing nothing.</div>
<%}%>
<hr/>
<div class="head2">Export:</div>
<form method="post" action="<ofbiz:url>/xmldsdump</ofbiz:url>" name="entityExport">
<div class="tabletext">Output Directory&nbsp;: <input type="text" class="inputBox" size="60" name="outpath" value="<%=UtilFormatOut.checkNull(outpath)%>"/></div>
<div class="tabletext">Max Records Per File&nbsp;: <input type="text" class="inputBox" size="10" name="maxrecords"/></div>
<div class="tabletext">Single Filename&nbsp;&nbsp;: <input type="text" class="inputBox" size="60" name="filename" value="<%=UtilFormatOut.checkNull(filename)%>"/></div>
<div class="tabletext">Records Updated Since&nbsp;&nbsp;:
<input type="text" class="inputBox" size="25" name="entityFrom" />
<a href="javascript:call_cal(document.entityExport.entityFrom, null);"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Click here For Calendar'></a>
@@ -407,7 +407,7 @@ under the License.
<%}%>
</tr>
</table>
<input type="submit" value="Export">
<A href="<ofbiz:url>/xmldsdump?checkAll=true</ofbiz:url>" class="buttontext">Check All</A>
<A href="<ofbiz:url>/xmldsdump</ofbiz:url>" class="buttontext">Un-Check All</A>
@@ -35,7 +35,7 @@ under the License.
if(passedEntityNames.size() > 0) {
numberOfEntities = passedEntityNames.size();
PrintWriter writer = null;
ServletContext context = pageContext.getServletContext();
if (UtilJ2eeCompat.useOutputStreamNotWriter(context)) {
@@ -52,7 +52,7 @@ under the License.
beganTransaction = TransactionUtil.begin();
Iterator i = passedEntityNames.iterator();
while(i.hasNext()) {
while(i.hasNext()) {
String curEntityName = (String)i.next();
ModelEntity me = reader.getModelEntity(curEntityName);
@@ -90,7 +90,7 @@ under the License.
writer.println("</entity-engine-xml>");
}
} else {%>
ERROR: No entityName list was found in the session, go back to the export page and try again.
<%}%>