You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Gareth Carter (JIRA)" <ji...@apache.org> on 2015/10/29 17:21:27 UTC

[jira] [Updated] (OFBIZ-6705) some files set viewIndex to 1 by default rather than 0

     [ https://issues.apache.org/jira/browse/OFBIZ-6705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gareth Carter updated OFBIZ-6705:
---------------------------------
    Description: 
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

  was:
The following files set viewIndex to 1

./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);

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


> 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)