View Javadoc
1   /**
2    * Copyright 2005-2015 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.uif.widget;
17  
18  import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19  import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
20  
21  /**
22   * Accordion widget class used to create an accordion based layout.
23   *
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  @BeanTag(name = "accordion", parent = "Uif-Accordion")
27  public class Accordion extends WidgetBase {
28      private static final long serialVersionUID = 8156445677141475527L;
29  
30      private String active;
31  
32      /**
33       * The active option determines which accordion item is open by default.  Set "false" as the string for
34       * no item open, use zero-based index to select an item to be open by default.
35       *
36       * @return the accordion item that is open by default, "false" if no items open
37       */
38      @BeanTagAttribute
39      public String getActive() {
40          return active;
41      }
42  
43      /**
44       * Set the accordion item open by default (zero-based index), "false" if no item should be open.
45       *
46       * @param active true if the accoridion item should be open by default
47       */
48      public void setActive(String active) {
49          this.active = active;
50      }
51  }