Inconsistent VIEW_INDEX handling in ModelForm and PartyServices
---------------------------------------------------------------
Key: OFBIZ-371
URL: http://issues.apache.org/jira/browse/OFBIZ-371
Project: OFBiz (The Open for Business Project)
Issue Type: Bug
Components: framework, party
Affects Versions: SVN trunk
Reporter: Illya Kysil
The handling of the VIEW_INDEX field is inconsistent in ModelForm and
PartyServices.findParty. ModelForm assumes zero-based VIEW_INDEX while
PartyServices.findParty assumes one-based VIEW_INDEX.
ModelForm:
1752 public int getPaginateIndex(Map context) {
1753 String field = this.getPaginateIndexField(context);
1754
1755 int viewIndex = 0;
....
1985 lowIndex = viewIndex * viewSize;
1986 highIndex = (viewIndex + 1) * viewSize;
PartyServices.findParty method:
992 // set the page parameters
993 int viewIndex = 1;
994 try {
995 viewIndex = Integer.parseInt((String) context.get("VIEW_INDEX"));
996 } catch (Exception e) {
997 viewIndex = 1;
998 }
999 result.put("viewIndex", new Integer(viewIndex));
.....
1288 lowIndex = (((viewIndex - 1) * viewSize) + 1);
1289 highIndex = viewIndex * viewSize;
The bug manifest itself if you try to render a result of findParty service
invocation using <form type="list" ...> form. The resulting table is empty
regardless of VIEW_INDEX parameter value.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira