1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.layout;
17
18 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
20 import org.kuali.rice.krad.datadictionary.parse.BeanTags;
21 import org.kuali.rice.krad.uif.component.Component;
22 import org.kuali.rice.krad.uif.component.ListAware;
23 import org.kuali.rice.krad.uif.container.Group;
24 import org.kuali.rice.krad.uif.util.LifecycleElement;
25
26
27
28
29
30
31
32 @BeanTags({@BeanTag(name = "listLayout", parent = "Uif-ListLayout"),
33 @BeanTag(name = "orderedListLayout", parent = "Uif-OrderedListLayout")})
34 public class ListLayoutManager extends LayoutManagerBase {
35 private static final long serialVersionUID = -8611267646944565117L;
36
37 private boolean orderedList;
38
39 public ListLayoutManager() {
40 super();
41 }
42
43
44
45
46
47
48 @Override
49 public void performApplyModel(Object model, LifecycleElement component) {
50 super.performApplyModel(model, component);
51
52 Group parentGroup = (Group) component;
53
54 for (Component item : parentGroup.getItems()) {
55 if (ListAware.class.isAssignableFrom(item.getClass())) {
56 ((ListAware) item).setRenderedInList(true);
57 }
58 }
59 }
60
61
62
63
64
65
66 @BeanTagAttribute
67 public boolean isOrderedList() {
68 return orderedList;
69 }
70
71
72
73
74
75 public void setOrderedList(boolean orderedList) {
76 this.orderedList = orderedList;
77 }
78
79 }