1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.container;
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.view.View;
23 import org.kuali.rice.krad.uif.widget.Accordion;
24
25 import java.util.HashSet;
26 import java.util.List;
27 import java.util.Set;
28
29
30
31
32 @BeanTags({@BeanTag(name = "accordionGroup-bean", parent = "Uif-AccordionGroup"),
33 @BeanTag(name = "accordionSection-bean", parent = "Uif-AccordionSection"),
34 @BeanTag(name = "accordionSubSection-bean", parent = "Uif-AccordionSubSection"),
35 @BeanTag(name = "disclosure-accordionSection-bean", parent = "Uif-Disclosure-AccordionSection"),
36 @BeanTag(name = "disclosure-accordionSubSection-bean", parent = "Uif-Disclosure-AccordionSubSection")})
37 public class AccordionGroup extends Group {
38
39 private static final long serialVersionUID = 7230145606607506418L;
40
41 private Accordion accordionWidget;
42
43
44
45
46 @Override
47 public List<Component> getComponentsForLifecycle() {
48 List<Component> components = super.getComponentsForLifecycle();
49
50 components.add(accordionWidget);
51
52 return components;
53 }
54
55
56
57
58
59 @Override
60 public void performFinalize(View view, Object model, Component parent) {
61 super.performFinalize(view, model, parent);
62 this.addDataAttribute("type", "Uif-AccordionGroup");
63 }
64
65
66
67
68
69
70 @Override
71 public Set<Class<? extends Component>> getSupportedComponents() {
72 Set<Class<? extends Component>> supportedComponents = new HashSet<Class<? extends Component>>();
73 supportedComponents.add(Group.class);
74
75 return supportedComponents;
76 }
77
78
79
80
81
82
83
84 @BeanTagAttribute(name = "accordionWidget", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
85 public Accordion getAccordionWidget() {
86 return this.accordionWidget;
87 }
88
89
90
91
92
93
94 public void setAccordionWidget(Accordion accordionWidget) {
95 this.accordionWidget = accordionWidget;
96 }
97 }