Fixed Freemarker-generated list navigation introduced in rev 930660. That code never worked. Also fixed some Webtools FindGeneric screen issues.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1064944 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrian Crum
2011-01-29 02:35:22 +00:00
parent 6b0c0c461d
commit 2e1ad5b135
5 changed files with 18 additions and 17 deletions
@@ -61,21 +61,18 @@ under the License.
<#if (!previousUrl?has_content)>
<#local previousUrl=commonUrl+"VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndexPrevious}"/>
</#if>
<#if (!firstUrl?has_content)>
<#if (!nextUrl?has_content)>
<#local nextUrl=commonUrl+"VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndexNext}"/>
</#if>
<#if (!firstUrl?has_content)>
<#if (!lastUrl?has_content)>
<#local lastUrl=commonUrl+"VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndexLast}"/>
</#if>
<#if (!firstUrl?has_content)>
<#if (!selectUrl?has_content)>
<#local selectUrl=commonUrl+"VIEW_SIZE=${viewSize}&amp;VIEW_INDEX="/>
</#if>
<#if (!firstUrl?has_content)>
<#if (!selectSizeUrl?has_content)>
<#local selectSizeUrl=commonUrl+"VIEW_SIZE='+this.value+'&amp;VIEW_INDEX=0"/>
</#if>
</#if>
<#if (!commonDisplaying?has_content)>
<#local commonDisplaying="${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}"/>
</#if>
<@renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel />
<@renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl uiLabelMap.CommonFirst paginatePreviousStyle ajaxPreviousUrl previousUrl uiLabelMap.CommonPrevious uiLabelMap.CommonPage ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl uiLabelMap.CommonNext paginateLastStyle ajaxLastUrl lastUrl uiLabelMap.CommonLast uiLabelMap.CommonItemsPerPage/>
</#macro>
@@ -246,3 +246,6 @@ if (resultPartialList != null) {
}
}
context.records = records;
context.lowCount = lowIndex;
context.highCount = lowIndex + records.size() - 1;
context.total = arraySize;
@@ -18,22 +18,21 @@ under the License.
-->
<form method="post" action="<@ofbizUrl>FindGeneric?entityName=${entityName}</@ofbizUrl>">
<input type="hidden" name="find" value="true"/>
<table class="basic-table hover-bar" cellspacing="0">
<input type="hidden" name="searchOptions_collapsed" value="true"/>
<table class="basic-table" cellspacing="0">
<tr class="header-row-2">
<td>${uiLabelMap.WebtoolsFieldName}</td>
<td>${uiLabelMap.WebtoolsPk}</td>
<td>${uiLabelMap.WebtoolsFieldType}</td>
<td>&nbsp;</td>
</tr>
<#assign alt_row = false>
<#list fieldList as field>
<tr<#if alt_row> class="alternate-row"</#if>>
<tr>
<td>${field.name}</td>
<td><#if field.isPk == 'Y'>*</#if></td>
<td>${field.javaType},&nbsp;${field.sqlType}</td>
<td><input type="text" name="${field.name}" value="${field.param}" size="40"/></td>
</tr>
<#assign alt_row = !alt_row>
</#list>
<tr>
<td colspan="3"><h3>${uiLabelMap.WebtoolsToFindAll} ${entityName}, ${uiLabelMap.WebtoolsLeaveAllEntriesBlank}</h3></td>
@@ -18,7 +18,7 @@ under the License.
-->
<#if (arraySize > 0)>
<#assign commonUrl="FindGeneric?${curFindString}&amp;searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default(\"false\")}&amp;"/>
<@htmlTemplate.nextPrev commonUrl=commonUrl listSize=arraySize viewSize=viewSize viewIndex=viewIndex highIndex=highIndex />
<@htmlTemplate.nextPrev commonUrl=commonUrl listSize=arraySize viewSize=viewSize viewIndex=viewIndex highIndex=highIndex commonDisplaying=commonDisplaying/>
</#if>
<table class="basic-table hover-bar" cellspacing="0">
<tr class="header-row-2">
+6 -4
View File
@@ -159,20 +159,22 @@ under the License.
</condition>
<actions>
<script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap"/>
<property-map resource="WebtoolsUiLabels" map-name="uiLabelMap"/>
<set field="title" value="${uiLabelMap.WebtoolsFindValues} ${uiLabelMap.WebtoolsForEntity}: ${entityName}"/>
<set field="commonDisplaying" value="${uiLabelMap.CommonDisplaying}"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="menu-bar">
<container style="button-bar">
<link target="entitymaint" text="${uiLabelMap.WebtoolsBackToEntityList}" style="buttontext"/>
<link target="ViewRelations" text="${uiLabelMap.WebtoolsViewRelations}" style="buttontext">
<container style="button-bar button-style-1">
<link target="entitymaint" text="${uiLabelMap.WebtoolsBackToEntityList}"/>
<link target="ViewRelations" text="${uiLabelMap.WebtoolsViewRelations}">
<parameter param-name="entityName" from-field="entityName"/>
</link>
<link target="ViewGeneric" text="${uiLabelMap.CommonCreateNew}" style="buttontext create">
<link target="ViewGeneric" text="${uiLabelMap.CommonCreateNew}" style="create">
<parameter param-name="entityName" from-field="entityName"/>
<parameter param-name="enableEdit" value="true"/>
</link>