View Javadoc
1   package org.kuali.ole.krad;
2   
3   import java.util.List;
4   
5   import org.kuali.rice.krad.uif.component.Component;
6   import org.kuali.rice.krad.uif.container.Group;
7   import org.kuali.rice.krad.uif.container.PageGroup;
8   
9   public class OlePageGroup extends PageGroup {
10  
11  	private static final long serialVersionUID = 8060450970054897968L;
12  
13  	@Override
14  	public List<? extends Component> getItems() {
15  		synchronized (this) {
16  			return super.getItems();
17  		}
18  	}
19  
20  	/**
21  	 * Filters {@link OleComponent} instances based on
22  	 * {@link OleComponent#getFilterModelProperty()}, if the current model is
23  	 * available.
24  	 */
25  	@Override
26  	protected <T> void copyProperties(T component) {
27  		
28  		List<? extends Component> srcitems;
29  		synchronized (this) {
30  			srcitems = getItems();
31  			try {
32  				// prevent super() from copying items
33  				setItems(null);
34  				super.copyProperties(component);
35  			} finally {
36  				setItems(srcitems);
37  			}
38  		}
39  		
40  		Group groupCopy = (Group) component;
41  		groupCopy.setItems(OleComponentUtils.filterItems(srcitems));
42  	}
43  
44  }
45