View Javadoc
1   /**
2    * Copyright 2005-2014 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  @BeanTag(name = "accordion-bean", parent = "Uif-Accordion")
25  public class Accordion extends WidgetBase {
26  
27      private static final long serialVersionUID = 8156445677141475527L;
28      private String active;
29  
30      /**
31       * The active option determines which accordion item is open by default.  Set "false" as the string for
32       * no item open, use zero-based index to select an item to be open by default.
33       *
34       * @return the accordion item that is open by default, "false" if no items open
35       */
36      @BeanTagAttribute(name = "active")
37      public String getActive() {
38          return active;
39      }
40  
41      /**
42       * Set the accordion item open by default (zero-based index), "false" if no item should be open.
43       *
44       * @param active true if the accoridion item should be open by default
45       */
46      public void setActive(String active) {
47          this.active = active;
48      }
49  }