1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.web.struts.action;
17
18 import org.apache.commons.beanutils.BeanComparator;
19 import org.apache.commons.lang.StringUtils;
20 import org.apache.struts.action.ActionForm;
21 import org.apache.struts.action.ActionForward;
22 import org.apache.struts.action.ActionMapping;
23 import org.kuali.rice.core.api.util.RiceConstants;
24 import org.kuali.rice.kns.lookup.HtmlData;
25 import org.kuali.rice.kns.lookup.LookupResultsService;
26 import org.kuali.rice.kns.lookup.LookupUtils;
27 import org.kuali.rice.kns.lookup.Lookupable;
28 import org.kuali.rice.kns.service.KNSServiceLocator;
29 import org.kuali.rice.kns.web.struts.form.MultipleValueLookupForm;
30 import org.kuali.rice.kns.web.ui.Column;
31 import org.kuali.rice.kns.web.ui.ResultRow;
32 import org.kuali.rice.krad.lookup.CollectionIncomplete;
33 import org.kuali.rice.krad.service.KRADServiceLocator;
34 import org.kuali.rice.krad.service.SequenceAccessorService;
35 import org.kuali.rice.krad.util.GlobalVariables;
36 import org.kuali.rice.krad.util.KRADConstants;
37 import org.kuali.rice.krad.util.UrlFactory;
38
39 import javax.servlet.ServletException;
40 import javax.servlet.http.HttpServletRequest;
41 import javax.servlet.http.HttpServletResponse;
42 import java.io.IOException;
43 import java.util.ArrayList;
44 import java.util.Collection;
45 import java.util.Collections;
46 import java.util.HashMap;
47 import java.util.List;
48 import java.util.Map;
49 import java.util.Properties;
50 import java.util.Set;
51
52
53
54
55
56
57 @Deprecated
58 public class KualiMultipleValueLookupAction extends KualiLookupAction implements KualiTableRenderAction {
59 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(KualiMultipleValueLookupAction.class);
60
61
62
63
64
65
66
67 public static final int DEFAULT_MAX_ROWS_PER_PAGE = 50;
68
69
70
71
72
73
74
75
76
77
78
79
80 @Override
81 public ActionForward search(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
82 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
83
84
85 String methodToCall = findMethodToCall(form, request);
86 if (methodToCall.equalsIgnoreCase("search")) {
87 GlobalVariables.getUserSession().removeObjectsByPrefix(KRADConstants.SEARCH_METHOD);
88 }
89
90 Lookupable kualiLookupable = multipleValueLookupForm.getLookupable();
91 if (kualiLookupable == null) {
92 LOG.error("Lookupable is null.");
93 throw new RuntimeException("Lookupable is null.");
94 }
95
96 Collection displayList = new ArrayList();
97 ArrayList<ResultRow> resultTable = new ArrayList<ResultRow>();
98
99
100 kualiLookupable.validateSearchParameters(multipleValueLookupForm.getFields());
101
102 boolean bounded = true;
103
104 displayList = performMultipleValueLookup(multipleValueLookupForm, resultTable, getMaxRowsPerPage(multipleValueLookupForm), bounded);
105 if (kualiLookupable.isSearchUsingOnlyPrimaryKeyValues()) {
106 multipleValueLookupForm.setSearchUsingOnlyPrimaryKeyValues(true);
107 multipleValueLookupForm.setPrimaryKeyFieldLabels(kualiLookupable.getPrimaryKeyFieldLabels());
108 }
109 else {
110 multipleValueLookupForm.setSearchUsingOnlyPrimaryKeyValues(false);
111 multipleValueLookupForm.setPrimaryKeyFieldLabels(KRADConstants.EMPTY_STRING);
112 }
113
114
115
116 if ( displayList instanceof CollectionIncomplete ){
117 request.setAttribute("reqSearchResultsActualSize", ((CollectionIncomplete) displayList).getActualSizeIfTruncated());
118 } else {
119 request.setAttribute("reqSearchResultsActualSize", displayList.size() );
120 }
121
122 request.setAttribute("reqSearchResults", resultTable);
123
124
125
126 if ( displayList instanceof CollectionIncomplete ){
127 multipleValueLookupForm.setResultsActualSize((int) ((CollectionIncomplete) displayList).getActualSizeIfTruncated().longValue());
128 } else {
129 multipleValueLookupForm.setResultsActualSize(displayList.size());
130 }
131
132
133 multipleValueLookupForm.setResultsLimitedSize(resultTable.size());
134
135 if (request.getParameter(KRADConstants.SEARCH_LIST_REQUEST_KEY) != null) {
136 GlobalVariables.getUserSession().removeObject(request.getParameter(KRADConstants.SEARCH_LIST_REQUEST_KEY));
137 }
138 request.setAttribute(KRADConstants.SEARCH_LIST_REQUEST_KEY, GlobalVariables.getUserSession().addObjectWithGeneratedKey(resultTable, KRADConstants.SEARCH_LIST_KEY_PREFIX));
139
140 request.getParameter(KRADConstants.REFRESH_CALLER);
141
142 return mapping.findForward(RiceConstants.MAPPING_BASIC);
143 }
144
145
146
147
148
149
150
151
152
153
154
155 @Override
156 public ActionForward switchToPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
157 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
158 List<ResultRow> resultTable = switchToPage(multipleValueLookupForm, getMaxRowsPerPage(multipleValueLookupForm));
159 request.setAttribute("reqSearchResults", resultTable);
160 return mapping.findForward(RiceConstants.MAPPING_BASIC);
161 }
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178 @Override
179 public ActionForward sort(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
180 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
181 List<ResultRow> resultTable = sort(multipleValueLookupForm, getMaxRowsPerPage(multipleValueLookupForm));
182 request.setAttribute("reqSearchResults", resultTable);
183 return mapping.findForward(RiceConstants.MAPPING_BASIC);
184 }
185
186
187
188
189
190
191
192
193
194
195
196 public ActionForward prepareToReturnSelectedResults(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
197 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
198 if (StringUtils.isBlank(multipleValueLookupForm.getLookupResultsSequenceNumber())) {
199
200 return prepareToReturnNone(mapping, form, request, response);
201 }
202
203 prepareToReturnSelectedResultBOs(multipleValueLookupForm);
204
205
206 Properties parameters = new Properties();
207 parameters.put(KRADConstants.LOOKUP_RESULTS_BO_CLASS_NAME, multipleValueLookupForm.getBusinessObjectClassName());
208 parameters.put(KRADConstants.LOOKUP_RESULTS_SEQUENCE_NUMBER, multipleValueLookupForm.getLookupResultsSequenceNumber());
209 parameters.put(KRADConstants.DOC_FORM_KEY, multipleValueLookupForm.getFormKey());
210 parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.RETURN_METHOD_TO_CALL);
211 parameters.put(KRADConstants.REFRESH_CALLER, KRADConstants.MULTIPLE_VALUE);
212 parameters.put(KRADConstants.ANCHOR, multipleValueLookupForm.getLookupAnchor());
213 parameters.put(KRADConstants.LOOKED_UP_COLLECTION_NAME, multipleValueLookupForm.getLookedUpCollectionName());
214 if(multipleValueLookupForm.getDocNum() != null){
215 parameters.put(KRADConstants.DOC_NUM, multipleValueLookupForm.getDocNum());
216 }
217
218
219 String backUrl = UrlFactory.parameterizeUrl(multipleValueLookupForm.getBackLocation(), parameters);
220 return new ActionForward(backUrl, true);
221 }
222
223
224
225
226
227
228
229
230
231
232 public ActionForward selectAll(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
233 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
234 List<ResultRow> resultTable = selectAll(multipleValueLookupForm, getMaxRowsPerPage(multipleValueLookupForm));
235 request.setAttribute("reqSearchResults", resultTable);
236 return mapping.findForward(RiceConstants.MAPPING_BASIC);
237 }
238
239
240
241
242
243
244
245
246
247
248
249 public ActionForward unselectAll(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
250 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
251 List<ResultRow> resultTable = unselectAll(multipleValueLookupForm, getMaxRowsPerPage(multipleValueLookupForm));
252 request.setAttribute("reqSearchResults", resultTable);
253 return mapping.findForward(RiceConstants.MAPPING_BASIC);
254 }
255
256
257
258
259
260
261 @Override
262 public ActionForward cancel(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
263 return prepareToReturnNone(mapping, form, request, response);
264 }
265
266
267
268
269
270
271
272
273
274
275
276 public ActionForward prepareToReturnNone(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
277 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
278 prepareToReturnNone(multipleValueLookupForm);
279
280
281 Properties parameters = new Properties();
282 parameters.put(KRADConstants.DOC_FORM_KEY, multipleValueLookupForm.getFormKey());
283 parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.RETURN_METHOD_TO_CALL);
284 parameters.put(KRADConstants.REFRESH_CALLER, KRADConstants.MULTIPLE_VALUE);
285 parameters.put(KRADConstants.ANCHOR, multipleValueLookupForm.getLookupAnchor());
286 if(multipleValueLookupForm.getDocNum() != null){
287 parameters.put(KRADConstants.DOC_NUM, multipleValueLookupForm.getDocNum());
288 }
289 String backUrl = UrlFactory.parameterizeUrl(multipleValueLookupForm.getBackLocation(), parameters);
290 return new ActionForward(backUrl, true);
291 }
292
293
294
295
296
297
298
299
300
301
302
303
304 public ActionForward export(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
305 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
306 List<ResultRow> resultTable = prepareToExport(multipleValueLookupForm);
307 request.setAttribute("reqSearchResults", resultTable);
308 return mapping.findForward(RiceConstants.MAPPING_BASIC);
309 }
310
311
312
313
314
315
316
317
318
319
320
321 protected Collection performMultipleValueLookup(MultipleValueLookupForm multipleValueLookupForm, List<ResultRow> resultTable, int maxRowsPerPage, boolean bounded) {
322 Lookupable lookupable = multipleValueLookupForm.getLookupable();
323 Collection displayList = lookupable.performLookup(multipleValueLookupForm, resultTable, bounded);
324
325 List defaultSortColumns = lookupable.getDefaultSortColumns();
326 if (defaultSortColumns != null && !defaultSortColumns.isEmpty() && resultTable != null && !resultTable.isEmpty()) {
327
328 String firstSortColumn = (String) defaultSortColumns.get(0);
329
330
331 int firstSortColumnIdx = -1;
332 List<Column> columnsForFirstResultRow = resultTable.get(0).getColumns();
333 for (int i = 0; i < columnsForFirstResultRow.size(); i++) {
334 if (StringUtils.equals(firstSortColumn, columnsForFirstResultRow.get(i).getPropertyName())) {
335 firstSortColumnIdx = i;
336 break;
337 }
338 }
339 multipleValueLookupForm.setColumnToSortIndex(firstSortColumnIdx);
340 }
341 else {
342
343 multipleValueLookupForm.setColumnToSortIndex(-1);
344 }
345
346
347 multipleValueLookupForm.jumpToFirstPage(resultTable.size(), maxRowsPerPage);
348
349 SequenceAccessorService sas = KNSServiceLocator.getSequenceAccessorService();
350 Long nextSeq = sas.getNextAvailableSequenceNumber(KRADConstants.LOOKUP_RESULTS_SEQUENCE);
351 String lookupResultsSequenceNumber = nextSeq.toString();
352 multipleValueLookupForm.setLookupResultsSequenceNumber(lookupResultsSequenceNumber);
353 try {
354 LookupResultsService lookupResultsService = KNSServiceLocator.getLookupResultsService();
355 lookupResultsService.persistResultsTable(lookupResultsSequenceNumber, resultTable,
356 GlobalVariables.getUserSession().getPerson().getPrincipalId());
357 }
358 catch (Exception e) {
359 LOG.error("error occured trying to persist multiple lookup results", e);
360 throw new RuntimeException("error occured trying to persist multiple lookup results");
361 }
362
363
364 multipleValueLookupForm.setCompositeObjectIdMap(new HashMap<String, String>());
365
366 return displayList;
367 }
368
369
370
371
372
373
374
375 protected List<ResultRow> switchToPage(MultipleValueLookupForm multipleValueLookupForm, int maxRowsPerPage) {
376 String lookupResultsSequenceNumber = multipleValueLookupForm.getLookupResultsSequenceNumber();
377
378 List<ResultRow> resultTable = null;
379 try {
380 resultTable = KNSServiceLocator.getLookupResultsService().retrieveResultsTable(lookupResultsSequenceNumber, GlobalVariables.getUserSession().getPerson().getPrincipalId());
381 }
382 catch (Exception e) {
383 LOG.error("error occured trying to retrieve multiple lookup results", e);
384 throw new RuntimeException("error occured trying to retrieve multiple lookup results");
385 }
386
387 multipleValueLookupForm.jumpToPage(multipleValueLookupForm.getSwitchToPageNumber(), resultTable.size(), maxRowsPerPage);
388
389 multipleValueLookupForm.setColumnToSortIndex(Integer.parseInt(multipleValueLookupForm.getPreviouslySortedColumnIndex()));
390 Map<String, String> selectedIds = LookupUtils.generateCompositeSelectedObjectIds(multipleValueLookupForm.getPreviouslySelectedObjectIdSet(),
391 multipleValueLookupForm.getDisplayedObjectIdSet(), multipleValueLookupForm.getSelectedObjectIdSet());
392
393 multipleValueLookupForm.setCompositeObjectIdMap(selectedIds);
394
395
396 for (ResultRow row : resultTable) {
397 String objId = row.getObjectId();
398 for (Map.Entry<String, String> entry : selectedIds.entrySet()) {
399 String selectedId = entry.getValue();
400 if (objId.equalsIgnoreCase(selectedId)) {
401 HtmlData.InputHtmlData returnUrl = (HtmlData.InputHtmlData) row.getReturnUrlHtmlData();
402 returnUrl.setChecked(HtmlData.InputHtmlData.CHECKBOX_CHECKED_VALUE);
403 row.setReturnUrl(returnUrl.constructCompleteHtmlTag());
404 }
405 }
406 }
407 return resultTable;
408 }
409
410
411
412
413
414
415
416
417 protected List<ResultRow> sort(MultipleValueLookupForm multipleValueLookupForm, int maxRowsPerPage) {
418 String lookupResultsSequenceNumber = multipleValueLookupForm.getLookupResultsSequenceNumber();
419
420 LookupResultsService lookupResultsService = KNSServiceLocator.getLookupResultsService();
421
422 List<ResultRow> resultTable = null;
423 try {
424 resultTable = lookupResultsService.retrieveResultsTable(lookupResultsSequenceNumber, GlobalVariables.getUserSession().getPerson().getPrincipalId());
425 }
426 catch (Exception e) {
427 LOG.error("error occured trying to retrieve multiple lookup results", e);
428 throw new RuntimeException("error occured trying to retrieve multiple lookup results");
429 }
430
431 int columnToSortOn = multipleValueLookupForm.getColumnToSortIndex();
432 int columnCurrentlySortedOn = Integer.parseInt(multipleValueLookupForm.getPreviouslySortedColumnIndex());
433
434
435
436
437 if (columnToSortOn == columnCurrentlySortedOn) {
438
439 Collections.reverse(resultTable);
440 }
441 else {
442
443
444
445
446 Collections.sort(resultTable, new BeanComparator("columns[" + columnToSortOn + "].propertyValue", LookupUtils.findBestValueComparatorForColumn(resultTable, columnToSortOn)));
447 }
448
449
450 try {
451 lookupResultsService.persistResultsTable(lookupResultsSequenceNumber, resultTable,
452 GlobalVariables.getUserSession().getPerson().getPrincipalId());
453 }
454 catch (Exception e) {
455 LOG.error("error occured trying to persist multiple lookup results", e);
456 throw new RuntimeException("error occured trying to persist multiple lookup results");
457 }
458
459
460 multipleValueLookupForm.jumpToFirstPage(resultTable.size(), maxRowsPerPage);
461
462 multipleValueLookupForm.setCompositeObjectIdMap(LookupUtils.generateCompositeSelectedObjectIds(multipleValueLookupForm.getPreviouslySelectedObjectIdSet(),
463 multipleValueLookupForm.getDisplayedObjectIdSet(), multipleValueLookupForm.getSelectedObjectIdSet()));
464 return resultTable;
465 }
466
467
468
469
470
471
472
473 protected void prepareToReturnSelectedResultBOs(MultipleValueLookupForm multipleValueLookupForm) {
474 String lookupResultsSequenceNumber = multipleValueLookupForm.getLookupResultsSequenceNumber();
475 if (StringUtils.isBlank(lookupResultsSequenceNumber)) {
476
477 return;
478 }
479 Map<String, String> compositeObjectIdMap = LookupUtils.generateCompositeSelectedObjectIds(multipleValueLookupForm.getPreviouslySelectedObjectIdSet(),
480 multipleValueLookupForm.getDisplayedObjectIdSet(), multipleValueLookupForm.getSelectedObjectIdSet());
481 Set<String> compositeObjectIds = compositeObjectIdMap.keySet();
482 try {
483 LookupResultsService lookupResultsService = KNSServiceLocator.getLookupResultsService();
484 lookupResultsService.persistSelectedObjectIds(lookupResultsSequenceNumber, compositeObjectIds,
485 GlobalVariables.getUserSession().getPerson().getPrincipalId());
486 }
487 catch (Exception e) {
488 LOG.error("error occured trying to retrieve selected multiple lookup results", e);
489 throw new RuntimeException("error occured trying to retrieve selected multiple lookup results");
490 }
491 }
492
493
494
495
496
497
498 protected void prepareToReturnNone(MultipleValueLookupForm multipleValueLookupForm) {
499 String lookupResultsSequenceNumber = multipleValueLookupForm.getLookupResultsSequenceNumber();
500 try {
501 if (StringUtils.isNotBlank(lookupResultsSequenceNumber)) {
502
503 LookupResultsService lookupResultsService = KNSServiceLocator.getLookupResultsService();
504 lookupResultsService.clearPersistedLookupResults(lookupResultsSequenceNumber);
505 multipleValueLookupForm.setLookupResultsSequenceNumber(null);
506 }
507 }
508 catch (Exception e) {
509
510 LOG.error("error occured trying to clear lookup results seq nbr " + lookupResultsSequenceNumber, e);
511 }
512 }
513
514
515
516
517
518
519
520
521
522
523 protected List<ResultRow> prepareToExport(MultipleValueLookupForm multipleValueLookupForm) {
524 String lookupResultsSequenceNumber = multipleValueLookupForm.getLookupResultsSequenceNumber();
525
526 List<ResultRow> resultTable = null;
527 try {
528 LookupResultsService lookupResultsService = KNSServiceLocator.getLookupResultsService();
529 resultTable = lookupResultsService.retrieveResultsTable(lookupResultsSequenceNumber, GlobalVariables.getUserSession().getPerson().getPrincipalId());
530 }
531 catch (Exception e) {
532 LOG.error("error occured trying to export multiple lookup results", e);
533 throw new RuntimeException("error occured trying to export multiple lookup results");
534 }
535 return resultTable;
536 }
537
538
539
540
541
542
543
544
545 protected List<ResultRow> selectAll(MultipleValueLookupForm multipleValueLookupForm, int maxRowsPerPage) {
546 String lookupResultsSequenceNumber = multipleValueLookupForm.getLookupResultsSequenceNumber();
547
548 List<ResultRow> resultTable = null;
549 try {
550 LookupResultsService lookupResultsService = KNSServiceLocator.getLookupResultsService();
551 resultTable = lookupResultsService.retrieveResultsTable(lookupResultsSequenceNumber, GlobalVariables.getUserSession().getPerson().getPrincipalId());
552 }
553 catch (Exception e) {
554 LOG.error("error occured trying to export multiple lookup results", e);
555 throw new RuntimeException("error occured trying to export multiple lookup results");
556 }
557
558 Map<String, String> selectedObjectIds = new HashMap<String, String>();
559 for (ResultRow row : resultTable) {
560 String objId = row.getObjectId();
561 HtmlData.InputHtmlData returnUrl = (HtmlData.InputHtmlData) row.getReturnUrlHtmlData();
562 returnUrl.setChecked(HtmlData.InputHtmlData.CHECKBOX_CHECKED_VALUE);
563 row.setReturnUrl(returnUrl.constructCompleteHtmlTag());
564 if(objId != null){
565 selectedObjectIds.put(objId, objId);
566 }
567 }
568
569 multipleValueLookupForm.jumpToPage(multipleValueLookupForm.getViewedPageNumber(), resultTable.size(), maxRowsPerPage);
570 multipleValueLookupForm.setColumnToSortIndex(Integer.parseInt(multipleValueLookupForm.getPreviouslySortedColumnIndex()));
571 multipleValueLookupForm.setCompositeObjectIdMap(selectedObjectIds);
572
573 return resultTable;
574 }
575
576 @Override
577 public ActionForward clearValues(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
578 MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
579
580
581 prepareToReturnNone(multipleValueLookupForm);
582
583 return super.clearValues(mapping, form, request, response);
584 }
585
586
587
588
589
590
591
592 protected List<ResultRow> unselectAll(MultipleValueLookupForm multipleValueLookupForm, int maxRowsPerPage) {
593 String lookupResultsSequenceNumber = multipleValueLookupForm.getLookupResultsSequenceNumber();
594
595 List<ResultRow> resultTable = null;
596 try {
597 LookupResultsService lookupResultsService = KNSServiceLocator.getLookupResultsService();
598 resultTable = lookupResultsService.retrieveResultsTable(lookupResultsSequenceNumber, GlobalVariables.getUserSession().getPerson().getPrincipalId());
599 }
600 catch (Exception e) {
601 LOG.error("error occured trying to export multiple lookup results", e);
602 throw new RuntimeException("error occured trying to export multiple lookup results");
603 }
604
605 Map<String, String> selectedObjectIds = new HashMap<String, String>();
606
607
608 multipleValueLookupForm.jumpToPage(multipleValueLookupForm.getViewedPageNumber(), resultTable.size(), maxRowsPerPage);
609 multipleValueLookupForm.setColumnToSortIndex(Integer.parseInt(multipleValueLookupForm.getPreviouslySortedColumnIndex()));
610 multipleValueLookupForm.setCompositeObjectIdMap(selectedObjectIds);
611
612 return resultTable;
613 }
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628 protected int getMaxRowsPerPage(MultipleValueLookupForm multipleValueLookupForm) {
629 Integer appMaxRowsPerPage = LookupUtils.getApplicationMaximumSearchResulsPerPageForMultipleValueLookups();
630 if (appMaxRowsPerPage == null) {
631 LOG.warn("Couldn't find application results per page for MV lookups. Using default of " + DEFAULT_MAX_ROWS_PER_PAGE);
632 appMaxRowsPerPage = new Integer(DEFAULT_MAX_ROWS_PER_PAGE);
633 }
634 return appMaxRowsPerPage;
635 }
636 }
637