1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.demo.layout;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.rice.krad.uif.component.Component;
22 import org.kuali.rice.krad.uif.container.PageGroup;
23 import org.kuali.rice.krad.uif.control.Control;
24 import org.kuali.rice.krad.uif.field.InputField;
25 import org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl;
26 import org.kuali.rice.krad.uif.util.ComponentFactory;
27
28
29
30
31 public class UifGeneratedTestViewHelperServiceImpl extends ViewHelperServiceImpl {
32
33 private static final long serialVersionUID = 1594814355163875742L;
34
35 @Override
36 public void performCustomInitialization(Component component) {
37 super.performCustomInitialization(component);
38 List<Component> fields = new ArrayList<Component>();
39 if(component instanceof PageGroup && component.getId().equals("UifGeneratedFields-Page1")){
40 for(int i=0; i < 400; i++){
41 InputField field = ComponentFactory.getInputField();
42 Control control = ComponentFactory.getTextControl();
43 field.setControl(control);
44 field.setPropertyName("field1");
45 field.setLabel("Field");
46 field.setRequired(true);
47 fields.add(field);
48 }
49 ((PageGroup) component).setItems(fields);
50 }
51
52 }
53 }