ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gareth Carter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-6705) some files set viewIndex to 1 by default rather than 0
Date Mon, 02 Nov 2015 12:18:27 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-6705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14985131#comment-14985131
] 

Gareth Carter commented on OFBIZ-6705:
--------------------------------------

applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy

The above 2 just set the viewIndex in the context. FindOrders will filter to OrderLookupServices,
don't know about ListCommunications.groovy


applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy
specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy

These 3 files will calculate correctly (subtracting 1 from viewIndex) to get the startIndex.
Will have to update the code if we change viewIndex = 0

> some files set viewIndex to 1 by default rather than 0
> ------------------------------------------------------
>
>                 Key: OFBIZ-6705
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6705
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Gareth Carter
>            Priority: Minor
>
> The following files set viewIndex to 1
> {noformat}
> ./applications/order/src/org/ofbiz/order/order/OrderLookupServices.java:        if (viewIndex
== null) viewIndex = 1;
> ./applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl:        <#--assign
viewIndex = viewIndex - 1/-->
> ./applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy:viewIndex
= request.getParameter("viewIndex") ? Integer.valueOf(request.getParameter("viewIndex")) :
1;
> ./applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy:context.viewIndex
= 1;
> ./applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy:    viewIndex
= Integer.valueOf(parameters.VIEW_INDEX  ?: 1);
> ./specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy:
           viewIndex = Integer.valueOf(parameters.VIEW_INDEX  ?: 1);
> {noformat}
> I ran this command to get the output:
> grep -R --exclude-dir=.svn "viewIndex = " . | grep " 1"
> As far as I am aware, viewIndex starts from 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message