1 /** 2 * Copyright 2005-2012 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.container; 17 18 import org.kuali.rice.krad.uif.component.Component; 19 import org.kuali.rice.krad.uif.widget.Reorderer; 20 21 import java.util.List; 22 23 /** 24 * Group implementation that supports reordering of the group items 25 * 26 * <p> 27 * Uses a {@link org.kuali.rice.krad.uif.widget.Reorderer} widget to perform the reordering client side 28 * </p> 29 * 30 * @author Kuali Rice Team (rice.collab@kuali.org) 31 */ 32 public class ReorderingGroup extends Group { 33 private static final long serialVersionUID = -9069458348367183223L; 34 35 private Reorderer reorderer; 36 37 public ReorderingGroup() { 38 super(); 39 } 40 41 /** 42 * @see org.kuali.rice.krad.uif.component.ComponentBase#getComponentsForLifecycle() 43 */ 44 @Override 45 public List<Component> getComponentsForLifecycle() { 46 List<Component> components = super.getComponentsForLifecycle(); 47 48 components.add(reorderer); 49 50 return components; 51 } 52 53 /** 54 * Widget that will perform the reordering of the group's items client side 55 * 56 * @return Reorderer widget instance 57 */ 58 public Reorderer getReorderer() { 59 return reorderer; 60 } 61 62 /** 63 * Setter for the groups reorderer widget 64 * 65 * @param reorderer 66 */ 67 public void setReorderer(Reorderer reorderer) { 68 this.reorderer = reorderer; 69 } 70 }