1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.uif.form;
17
18 import edu.sampleu.demo.kitchensink.UITestObject;
19 import org.apache.commons.lang.StringUtils;
20 import org.kuali.rice.kim.api.identity.Person;
21 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
22 import org.kuali.rice.krad.web.form.UifFormBase;
23
24 import java.util.ArrayList;
25 import java.util.List;
26
27
28
29
30
31
32 public class KradSampleAppForm extends UifFormBase {
33 private static final long serialVersionUID = -7525378097732916418L;
34 private String themeName;
35 private String exampleShown;
36 private String currentExampleIndex;
37
38
39
40
41 private String inputField1;
42 private String inputField2;
43 private String inputField3;
44 private String inputField4;
45 private String inputField5;
46 private String inputField6;
47 private String inputField7;
48 private String inputField8;
49 private String inputField9;
50 private String inputField10;
51 private String inputField11;
52 private String inputField12;
53 private String inputField13;
54 private String inputField14;
55 private String inputField15;
56 private String inputField16;
57 private String inputField17;
58 private String inputField18;
59 private String inputField19;
60 private String inputField20;
61 private String inputField21;
62 private String inputField22;
63 private String inputField23;
64 private String inputField24;
65 private String inputField25;
66
67 private boolean booleanField1 = false;
68 private boolean booleanField2 = false;
69 private boolean booleanField3 = false;
70
71 private List<String> checkboxesField1;
72 private List<String> checkboxesField2;
73 private List<String> checkboxesField3;
74 private List<String> checkboxesField4;
75 private List<String> multiSelectField1;
76
77 private String testPersonId;
78 private Person testPerson;
79
80 private String testGroupId;
81
82
83 private String messageField1;
84 private String richMessageField = "[color=green][b]Message[/b][/color]";
85
86
87 private List<UITestObject> collection1 = new ArrayList<UITestObject>();
88 private List<UITestObject> collection1_2 = new ArrayList<UITestObject>();
89 private List<UITestObject> collection1_3 = new ArrayList<UITestObject>();
90 private List<UITestObject> collection1_4 = new ArrayList<UITestObject>();
91 private List<UITestObject> collection1_5 = new ArrayList<UITestObject>();
92 private List<UITestObject> collection1_6 = new ArrayList<UITestObject>();
93 private List<UITestObject> collection1_7 = new ArrayList<UITestObject>();
94 private List<UITestObject> collection1_8 = new ArrayList<UITestObject>();
95 private List<UITestObject> collection1_9 = new ArrayList<UITestObject>();
96 private List<UITestObject> collection2 = new ArrayList<UITestObject>();
97 private List<UITestObject> collection3 = new ArrayList<UITestObject>();
98 private List<UITestObject> collection4 = new ArrayList<UITestObject>();
99 private List<UITestObject> collection5 = new ArrayList<UITestObject>();
100
101 private List<UITestObject> groupedCollection1 = new ArrayList<UITestObject>();
102 private List<UITestObject> groupedCollection2 = new ArrayList<UITestObject>();
103 private List<UITestObject> groupedCollection3 = new ArrayList<UITestObject>();
104 private List<UITestObject> doubleGroupedCollection = new ArrayList<UITestObject>();
105
106 private String fakeTotal = "123(server value)";
107
108 public KradSampleAppForm() {
109 super();
110
111 messageField1 = "fruits";
112
113 getCollection1().add(new UITestObject("13", "14", "15", "16"));
114 getCollection1().add(new UITestObject("17", "18", "19", "20"));
115 getCollection1().add(new UITestObject("5", "6", "7", "8"));
116 getCollection1().add(new UITestObject("1", "2", "3", "4"));
117 getCollection1().add(new UITestObject("9", "10", "11", "12"));
118 getCollection1().add(new UITestObject("13", "14", "15", "16"));
119 getCollection1().add(new UITestObject("213", "143", "151", "126"));
120 getCollection1().add(new UITestObject("133", "144", "155", "156"));
121 getCollection1().add(new UITestObject("25", "14", "15", "15"));
122 getCollection1().add(new UITestObject("1", "5", "5", "4"));
123 getCollection1().add(new UITestObject("5", "5", "5", "5"));
124 getCollection1().add(new UITestObject("5", "7", "3", "1"));
125
126 collection1_2.addAll(collection1);
127 collection1_3.addAll(collection1);
128 collection1_4.addAll(collection1);
129 collection1_5.addAll(collection1);
130 collection1_6.addAll(collection1);
131 collection1_7.addAll(collection1);
132 collection1_8.addAll(collection1);
133 collection1_9.addAll(collection1);
134
135 getCollection2().add(new UITestObject("A", "B", "C", "D"));
136 getCollection2().add(new UITestObject("1", "2", "3", "4"));
137 getCollection2().add(new UITestObject("W", "X", "Y", "Z"));
138 collection2.add(new UITestObject("a", "b", "c", "d"));
139 collection2.add(new UITestObject("a", "s", "d", "f"));
140
141 collection3.add(new UITestObject("A", "B", "C", "D"));
142 collection3.get(0).getSubList().add(new UITestObject("A", "B", "C", "D"));
143 collection3.get(0).getSubList().add(new UITestObject("1", "2", "3", "4"));
144 collection3.get(0).getSubList().add(new UITestObject("W", "X", "Y", "Z"));
145 collection3.add(new UITestObject("1", "2", "3", "4"));
146 collection3.get(1).getSubList().add(new UITestObject("A", "B", "C", "D"));
147 collection3.get(1).getSubList().add(new UITestObject("1", "2", "3", "4"));
148 collection3.add(new UITestObject("W", "X", "Y", "Z"));
149 collection3.get(2).getSubList().add(new UITestObject("W", "X", "Y", "Z"));
150
151 collection4.add(new UITestObject("A", "B", "C", "D"));
152 collection4.get(0).getSubList().add(new UITestObject("A", "B", "C", "D"));
153 collection4.get(0).getSubList().add(new UITestObject("1", "2", "3", "4"));
154 collection4.get(0).getSubList().add(new UITestObject("W", "X", "Y", "Z"));
155 collection4.add(new UITestObject("1", "2", "3", "4"));
156 collection4.get(1).getSubList().add(new UITestObject("a", "b", "C", "D"));
157 collection4.get(1).getSubList().add(new UITestObject("a", "s", "D", "F"));
158
159
160 collection5.add(new UITestObject("a", "a", "a", "a"));
161 collection5.get(0).getSubList().add(new UITestObject("A", "B", "C", "D"));
162 collection5.get(0).getSubList().get(0).getSubList().add(new UITestObject("a3", "3", "3", "3"));
163 collection5.get(0).getSubList().get(0).getSubList().add(new UITestObject("a3", "3", "3", "3"));
164 collection5.get(0).getSubList().add(new UITestObject("1", "2", "3", "4"));
165 collection5.get(0).getSubList().get(1).getSubList().add(new UITestObject("b3", "3", "3", "3"));
166 collection5.get(0).getSubList().get(1).getSubList().add(new UITestObject("b3", "3", "3", "3"));
167 collection5.get(0).getSubList().get(1).getSubList().add(new UITestObject("b3", "3", "3", "3"));
168 collection5.add(new UITestObject("b", "b", "b", "b"));
169 collection5.get(1).getSubList().add(new UITestObject("a", "b", "C", "D"));
170 collection5.get(1).getSubList().get(0).getSubList().add(new UITestObject("a23", "3", "3", "3"));
171 collection5.get(1).getSubList().get(0).getSubList().add(new UITestObject("a23", "3", "3", "3"));
172 collection5.get(1).getSubList().add(new UITestObject("a", "s", "D", "F"));
173 collection5.get(1).getSubList().get(1).getSubList().add(new UITestObject("b23", "3", "3", "3"));
174 collection5.get(1).getSubList().get(1).getSubList().add(new UITestObject("b23", "3", "3", "3"));
175
176 groupedCollection1.add(new UITestObject("A", "100", "200", "300"));
177 groupedCollection1.add(new UITestObject("A", "101", "200", "300"));
178 groupedCollection1.add(new UITestObject("A", "102", "200", "300"));
179 groupedCollection1.add(new UITestObject("A", "103", "200", "300"));
180 groupedCollection1.add(new UITestObject("A", "104", "200", "300"));
181
182 groupedCollection1.add(new UITestObject("B", "100", "200", "300"));
183 groupedCollection1.add(new UITestObject("B", "101", "200", "300"));
184 groupedCollection1.add(new UITestObject("B", "102", "200", "300"));
185
186 groupedCollection1.add(new UITestObject("C", "100", "200", "300"));
187 groupedCollection1.add(new UITestObject("C", "101", "200", "300"));
188 groupedCollection1.add(new UITestObject("C", "102", "200", "300"));
189 groupedCollection1.add(new UITestObject("C", "103", "200", "300"));
190
191 groupedCollection1.add(new UITestObject("D", "100", "200", "300"));
192 groupedCollection1.add(new UITestObject("D", "101", "200", "300"));
193 groupedCollection1.add(new UITestObject("D", "102", "200", "300"));
194 groupedCollection1.add(new UITestObject("D", "103", "200", "300"));
195 groupedCollection1.add(new UITestObject("D", "100", "200", "300"));
196 groupedCollection1.add(new UITestObject("D", "101", "200", "300"));
197 groupedCollection1.add(new UITestObject("D", "102", "200", "300"));
198 groupedCollection1.add(new UITestObject("D", "103", "200", "300"));
199 groupedCollection1.add(new UITestObject("D", "100", "200", "300"));
200 groupedCollection1.add(new UITestObject("D", "101", "200", "300"));
201 groupedCollection1.add(new UITestObject("D", "102", "200", "300"));
202 groupedCollection1.add(new UITestObject("D", "103", "200", "300"));
203 groupedCollection1.add(new UITestObject("D", "100", "200", "300"));
204 groupedCollection1.add(new UITestObject("D", "101", "200", "300"));
205 groupedCollection1.add(new UITestObject("D", "102", "200", "300"));
206 groupedCollection1.add(new UITestObject("D", "103", "200", "300"));
207 groupedCollection1.add(new UITestObject("D", "100", "200", "300"));
208 groupedCollection1.add(new UITestObject("D", "101", "200", "300"));
209 groupedCollection1.add(new UITestObject("D", "102", "200", "300"));
210 groupedCollection1.add(new UITestObject("D", "103", "200", "300"));
211 groupedCollection1.add(new UITestObject("D", "100", "200", "300"));
212 groupedCollection1.add(new UITestObject("D", "101", "200", "300"));
213 groupedCollection1.add(new UITestObject("D", "102", "200", "300"));
214 groupedCollection1.add(new UITestObject("D", "103", "200", "300"));
215
216 groupedCollection2.addAll(groupedCollection1);
217 groupedCollection3.addAll(groupedCollection1);
218
219 doubleGroupedCollection.add(new UITestObject("Fall", "2001", "AAA123", "2"));
220 doubleGroupedCollection.add(new UITestObject("Fall", "2001", "BBB123", "3"));
221 doubleGroupedCollection.add(new UITestObject("Fall", "2001", "CCC123", "4"));
222 doubleGroupedCollection.add(new UITestObject("Fall", "2001", "DDD123", "3"));
223
224 doubleGroupedCollection.add(new UITestObject("Fall", "2002", "AAA123", "3"));
225 doubleGroupedCollection.add(new UITestObject("Fall", "2002", "BBB123", "2"));
226 doubleGroupedCollection.add(new UITestObject("Fall", "2002", "CCC123", "3"));
227
228 doubleGroupedCollection.add(new UITestObject("Fall", "2003", "AAA123", "3"));
229 doubleGroupedCollection.add(new UITestObject("Fall", "2003", "CCC123", "3"));
230
231 doubleGroupedCollection.add(new UITestObject("Spring", "2001", "AAA123", "3"));
232 doubleGroupedCollection.add(new UITestObject("Spring", "2001", "BBB123", "3"));
233 doubleGroupedCollection.add(new UITestObject("Spring", "2001", "CCC123", "3"));
234
235 doubleGroupedCollection.add(new UITestObject("Spring", "2002", "AAA123", "4"));
236 doubleGroupedCollection.add(new UITestObject("Spring", "2002", "BBB123", "4"));
237 doubleGroupedCollection.add(new UITestObject("Spring", "2002", "CCC123", "2"));
238
239 doubleGroupedCollection.add(new UITestObject("Spring", "2003", "AAA123", "4"));
240 doubleGroupedCollection.add(new UITestObject("Spring", "2003", "BBB123", "3"));
241 doubleGroupedCollection.add(new UITestObject("Spring", "2003", "CCC123", "3"));
242 doubleGroupedCollection.add(new UITestObject("Spring", "2003", "DDD123", "2"));
243 }
244
245
246
247
248
249
250 public String getThemeName() {
251 return themeName;
252 }
253
254
255
256
257 public void setThemeName(String themeName) {
258 this.themeName = themeName;
259 }
260
261
262
263
264
265
266 public String getExampleShown() {
267 return exampleShown;
268 }
269
270
271
272
273
274
275 public void setExampleShown(String exampleShown) {
276 this.exampleShown = exampleShown;
277 }
278
279
280
281
282
283
284 public String getCurrentExampleIndex() {
285 return currentExampleIndex;
286 }
287
288
289
290
291
292
293 public void setCurrentExampleIndex(String currentExampleIndex) {
294 this.currentExampleIndex = currentExampleIndex;
295 }
296
297
298
299
300
301 public String getInputField1() {
302 return inputField1;
303 }
304
305 public void setInputField1(String inputField1) {
306 this.inputField1 = inputField1;
307 }
308
309 public String getInputField2() {
310 return inputField2;
311 }
312
313 public void setInputField2(String inputField2) {
314 this.inputField2 = inputField2;
315 }
316
317 public String getInputField3() {
318
319 return inputField3;
320 }
321
322 public void setInputField3(String inputField3) {
323 this.inputField3 = inputField3;
324 }
325
326 public String getInputField4() {
327 return inputField4;
328 }
329
330 public void setInputField4(String inputField4) {
331 this.inputField4 = inputField4;
332 }
333
334 public String getInputField5() {
335 return inputField5;
336 }
337
338 public void setInputField5(String inputField5) {
339 this.inputField5 = inputField5;
340 }
341
342 public String getInputField6() {
343 return inputField6;
344 }
345
346 public void setInputField6(String inputField6) {
347 this.inputField6 = inputField6;
348 }
349
350 public String getInputField7() {
351 return inputField7;
352 }
353
354 public void setInputField7(String inputField7) {
355 this.inputField7 = inputField7;
356 }
357
358 public String getInputField8() {
359 return inputField8;
360 }
361
362 public void setInputField8(String inputField8) {
363 this.inputField8 = inputField8;
364 }
365
366 public String getInputField9() {
367 return inputField9;
368 }
369
370 public void setInputField9(String inputField9) {
371 this.inputField9 = inputField9;
372 }
373
374 public String getInputField10() {
375 return inputField10;
376 }
377
378 public void setInputField10(String inputField10) {
379 this.inputField10 = inputField10;
380 }
381
382 public String getInputField11() {
383 return inputField11;
384 }
385
386 public void setInputField11(String inputField11) {
387 this.inputField11 = inputField11;
388 }
389
390 public String getInputField12() {
391 return inputField12;
392 }
393
394 public void setInputField12(String inputField12) {
395 this.inputField12 = inputField12;
396 }
397
398 public String getInputField13() {
399 return inputField13;
400 }
401
402 public void setInputField13(String inputField13) {
403 this.inputField13 = inputField13;
404 }
405
406 public String getInputField14() {
407 return inputField14;
408 }
409
410 public void setInputField14(String inputField14) {
411 this.inputField14 = inputField14;
412 }
413
414 public String getInputField15() {
415 return inputField15;
416 }
417
418 public void setInputField15(String inputField15) {
419 this.inputField15 = inputField15;
420 }
421
422 public String getInputField16() {
423 return inputField16;
424 }
425
426 public void setInputField16(String inputField16) {
427 this.inputField16 = inputField16;
428 }
429
430 public String getInputField17() {
431 return inputField17;
432 }
433
434 public void setInputField17(String inputField17) {
435 this.inputField17 = inputField17;
436 }
437
438 public String getInputField18() {
439 return inputField18;
440 }
441
442 public void setInputField18(String inputField18) {
443 this.inputField18 = inputField18;
444 }
445
446 public String getInputField19() {
447 return inputField19;
448 }
449
450 public void setInputField19(String inputField19) {
451 this.inputField19 = inputField19;
452 }
453
454 public String getInputField20() {
455 return inputField20;
456 }
457
458 public void setInputField20(String inputField20) {
459 this.inputField20 = inputField20;
460 }
461
462 public String getInputField21() {
463 return inputField21;
464 }
465
466 public void setInputField21(String inputField21) {
467 this.inputField21 = inputField21;
468 }
469
470 public String getInputField22() {
471 return inputField22;
472 }
473
474 public void setInputField22(String inputField22) {
475 this.inputField22 = inputField22;
476 }
477
478 public String getInputField23() {
479 return inputField23;
480 }
481
482 public void setInputField23(String inputField23) {
483 this.inputField23 = inputField23;
484 }
485
486 public String getInputField24() {
487 return inputField24;
488 }
489
490 public void setInputField24(String inputField24) {
491 this.inputField24 = inputField24;
492 }
493
494 public String getInputField25() {
495 return inputField25;
496 }
497
498 public void setInputField25(String inputField25) {
499 this.inputField25 = inputField25;
500 }
501
502 public String getMessageField1() {
503 return messageField1;
504 }
505
506 public void setMessageField1(String messageField1) {
507 this.messageField1 = messageField1;
508 }
509
510 public String getTestPersonId() {
511 return testPersonId;
512 }
513
514 public void setTestPersonId(String testPersonId) {
515 this.testPersonId = testPersonId;
516 }
517
518 public Person getTestPerson() {
519 if ((testPerson == null) || !StringUtils.equals(testPerson.getPrincipalId(), getTestPersonId())) {
520 testPerson = KimApiServiceLocator.getPersonService().getPerson(getTestPersonId());
521
522 if (testPerson == null) {
523 try {
524 testPerson = KimApiServiceLocator.getPersonService().getPersonImplementationClass().newInstance();
525 } catch (Exception e) {
526 throw new RuntimeException(e);
527 }
528 }
529 }
530
531 return testPerson;
532 }
533
534 public void setTestPerson(Person testPerson) {
535 this.testPerson = testPerson;
536 }
537
538 public String getTestGroupId() {
539 return testGroupId;
540 }
541
542 public void setTestGroupId(String testGroupId) {
543 this.testGroupId = testGroupId;
544 }
545
546 public List<UITestObject> getCollection1() {
547 return collection1;
548 }
549
550 public void setCollection1(List<UITestObject> collection1) {
551 this.collection1 = collection1;
552 }
553
554 public List<UITestObject> getCollection1_2() {
555 return collection1_2;
556 }
557
558 public void setCollection1_2(List<UITestObject> collection1_2) {
559 this.collection1_2 = collection1_2;
560 }
561
562 public List<UITestObject> getCollection1_3() {
563 return collection1_3;
564 }
565
566 public void setCollection1_3(List<UITestObject> collection1_3) {
567 this.collection1_3 = collection1_3;
568 }
569
570 public List<UITestObject> getCollection1_4() {
571 return collection1_4;
572 }
573
574 public void setCollection1_4(List<UITestObject> collection1_4) {
575 this.collection1_4 = collection1_4;
576 }
577
578 public List<UITestObject> getCollection1_5() {
579 return collection1_5;
580 }
581
582 public void setCollection1_5(List<UITestObject> collection1_5) {
583 this.collection1_5 = collection1_5;
584 }
585
586 public List<UITestObject> getCollection1_6() {
587 return collection1_6;
588 }
589
590 public void setCollection1_6(List<UITestObject> collection1_6) {
591 this.collection1_6 = collection1_6;
592 }
593
594 public List<UITestObject> getCollection1_7() {
595 return collection1_7;
596 }
597
598 public void setCollection1_7(List<UITestObject> collection1_7) {
599 this.collection1_7 = collection1_7;
600 }
601
602 public List<UITestObject> getCollection1_8() {
603 return collection1_8;
604 }
605
606 public void setCollection1_8(List<UITestObject> collection1_8) {
607 this.collection1_8 = collection1_8;
608 }
609
610 public List<UITestObject> getCollection1_9() {
611 return collection1_9;
612 }
613
614 public void setCollection1_9(List<UITestObject> collection1_9) {
615 this.collection1_9 = collection1_9;
616 }
617
618 public List<UITestObject> getCollection2() {
619 return collection2;
620 }
621
622 public void setCollection2(List<UITestObject> collection2) {
623 this.collection2 = collection2;
624 }
625
626 public List<UITestObject> getCollection3() {
627 return collection3;
628 }
629
630 public void setCollection3(List<UITestObject> collection3) {
631 this.collection3 = collection3;
632 }
633
634 public List<UITestObject> getCollection4() {
635 return collection4;
636 }
637
638 public void setCollection4(List<UITestObject> collection4) {
639 this.collection4 = collection4;
640 }
641
642 public List<UITestObject> getCollection5() {
643 return collection5;
644 }
645
646 public void setCollection5(List<UITestObject> collection5) {
647 this.collection5 = collection5;
648 }
649
650 public List<UITestObject> getGroupedCollection1() {
651 return groupedCollection1;
652 }
653
654 public void setGroupedCollection1(List<UITestObject> groupedCollection1) {
655 this.groupedCollection1 = groupedCollection1;
656 }
657
658 public List<UITestObject> getGroupedCollection2() {
659 return groupedCollection2;
660 }
661
662 public void setGroupedCollection2(List<UITestObject> groupedCollection2) {
663 this.groupedCollection2 = groupedCollection2;
664 }
665
666 public List<UITestObject> getGroupedCollection3() {
667 return groupedCollection3;
668 }
669
670 public void setGroupedCollection3(List<UITestObject> groupedCollection3) {
671 this.groupedCollection3 = groupedCollection3;
672 }
673
674 public List<UITestObject> getDoubleGroupedCollection() {
675 return doubleGroupedCollection;
676 }
677
678 public void setDoubleGroupedCollection(List<UITestObject> doubleGroupedCollection) {
679 this.doubleGroupedCollection = doubleGroupedCollection;
680 }
681
682 public String getFakeTotal() {
683 return fakeTotal;
684 }
685
686 public void setFakeTotal(String fakeTotal) {
687 this.fakeTotal = fakeTotal;
688 }
689
690 public String getRichMessageField() {
691 return richMessageField;
692 }
693
694 public void setRichMessageField(String richMessageField) {
695 this.richMessageField = richMessageField;
696 }
697
698 public List<String> getCheckboxesField1() {
699 return checkboxesField1;
700 }
701
702 public void setCheckboxesField1(List<String> checkboxesField1) {
703 this.checkboxesField1 = checkboxesField1;
704 }
705
706 public List<String> getCheckboxesField2() {
707 return checkboxesField2;
708 }
709
710 public void setCheckboxesField2(List<String> checkboxesField2) {
711 this.checkboxesField2 = checkboxesField2;
712 }
713
714 public List<String> getCheckboxesField3() {
715 return checkboxesField3;
716 }
717
718 public void setCheckboxesField3(List<String> checkboxesField3) {
719 this.checkboxesField3 = checkboxesField3;
720 }
721
722 public List<String> getCheckboxesField4() {
723 return checkboxesField4;
724 }
725
726 public void setCheckboxesField4(List<String> checkboxesField4) {
727 this.checkboxesField4 = checkboxesField4;
728 }
729
730 public List<String> getMultiSelectField1() {
731 return multiSelectField1;
732 }
733
734 public void setMultiSelectField1(List<String> multiSelectField1) {
735 this.multiSelectField1 = multiSelectField1;
736 }
737
738 public boolean isBooleanField1() {
739 return booleanField1;
740 }
741
742 public void setBooleanField1(boolean booleanField1) {
743 this.booleanField1 = booleanField1;
744 }
745
746 public boolean isBooleanField2() {
747 return booleanField2;
748 }
749
750 public void setBooleanField2(boolean booleanField2) {
751 this.booleanField2 = booleanField2;
752 }
753
754 public boolean isBooleanField3() {
755 return booleanField3;
756 }
757
758 public void setBooleanField3(boolean booleanField3) {
759 this.booleanField3 = booleanField3;
760 }
761 }