Return-Path: X-Original-To: apmail-ofbiz-dev-archive@www.apache.org Delivered-To: apmail-ofbiz-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 285F117EDD for ; Mon, 2 Nov 2015 12:18:28 +0000 (UTC) Received: (qmail 64510 invoked by uid 500); 2 Nov 2015 12:18:27 -0000 Delivered-To: apmail-ofbiz-dev-archive@ofbiz.apache.org Received: (qmail 64482 invoked by uid 500); 2 Nov 2015 12:18:27 -0000 Mailing-List: contact dev-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list dev@ofbiz.apache.org Received: (qmail 64457 invoked by uid 99); 2 Nov 2015 12:18:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2015 12:18:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id AF29F2C14DC for ; Mon, 2 Nov 2015 12:18:27 +0000 (UTC) Date: Mon, 2 Nov 2015 12:18:27 +0000 (UTC) From: "Gareth Carter (JIRA)" To: dev@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OFBIZ-6705) some files set viewIndex to 1 by default rather than 0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)