You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2011/01/29 03:35:22 UTC
svn commit: r1064944 - in /ofbiz/trunk/framework: common/webcommon/includes/
webtools/webapp/webtools/WEB-INF/actions/entity/
webtools/webapp/webtools/entity/ webtools/widget/
Author: adrianc
Date: Sat Jan 29 02:35:22 2011
New Revision: 1064944
URL: http://svn.apache.org/viewvc?rev=1064944&view=rev
Log:
Fixed Freemarker-generated list navigation introduced in rev 930660. That code never worked. Also fixed some Webtools FindGeneric screen issues.
Modified:
ofbiz/trunk/framework/common/webcommon/includes/htmlTemplate.ftl
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy
ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl
ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl
ofbiz/trunk/framework/webtools/widget/EntityScreens.xml
Modified: ofbiz/trunk/framework/common/webcommon/includes/htmlTemplate.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/htmlTemplate.ftl?rev=1064944&r1=1064943&r2=1064944&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/htmlTemplate.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/htmlTemplate.ftl Sat Jan 29 02:35:22 2011
@@ -61,21 +61,18 @@ under the License.
<#if (!previousUrl?has_content)>
<#local previousUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexPrevious}"/>
</#if>
- <#if (!firstUrl?has_content)>
+ <#if (!nextUrl?has_content)>
<#local nextUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexNext}"/>
</#if>
- <#if (!firstUrl?has_content)>
+ <#if (!lastUrl?has_content)>
<#local lastUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexLast}"/>
</#if>
- <#if (!firstUrl?has_content)>
+ <#if (!selectUrl?has_content)>
<#local selectUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX="/>
</#if>
- <#if (!firstUrl?has_content)>
+ <#if (!selectSizeUrl?has_content)>
<#local selectSizeUrl=commonUrl+"VIEW_SIZE='+this.value+'&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>
\ No newline at end of file
Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy?rev=1064944&r1=1064943&r2=1064944&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy Sat Jan 29 02:35:22 2011
@@ -246,3 +246,6 @@ if (resultPartialList != null) {
}
}
context.records = records;
+context.lowCount = lowIndex;
+context.highCount = lowIndex + records.size() - 1;
+context.total = arraySize;
Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl?rev=1064944&r1=1064943&r2=1064944&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl Sat Jan 29 02:35:22 2011
@@ -18,22 +18,21 @@ under the License.
-->
<form method="post" action="<@o...@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> </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}, ${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>
Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl?rev=1064944&r1=1064943&r2=1064944&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl Sat Jan 29 02:35:22 2011
@@ -18,7 +18,7 @@ under the License.
-->
<#if (arraySize > 0)>
<#assign commonUrl="FindGeneric?${curFindString}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default(\"false\")}&"/>
- <@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">
Modified: ofbiz/trunk/framework/webtools/widget/EntityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/EntityScreens.xml?rev=1064944&r1=1064943&r2=1064944&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/widget/EntityScreens.xml (original)
+++ ofbiz/trunk/framework/webtools/widget/EntityScreens.xml Sat Jan 29 02:35:22 2011
@@ -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>