View Javadoc

1   package org.kuali.student.enrollment.class2.courseoffering.keyvalue;
2   
3   import org.kuali.rice.core.api.util.ConcreteKeyValue;
4   import org.kuali.rice.core.api.util.KeyValue;
5   import org.kuali.rice.krad.uif.control.UifKeyValuesFinderBase;
6   import org.kuali.rice.krad.uif.view.ViewModel;
7   
8   import java.io.Serializable;
9   import java.util.ArrayList;
10  import java.util.List;
11  
12  /**
13   * This is a dummy class to fix the Rice 2.2 M4 issue... when we use finalizeMethodToCall() with
14   * Multi select controls, it results in NPE. To fix the NPE (KSENROLL-3423), created this dummy
15   * values finder which would return a single element. This has been already fixed at the rice
16   * trunk. So, the rice upgrade should fix this issue..
17   *
18   * @author venkat
19   */
20  public class DummyKeyValue extends UifKeyValuesFinderBase implements Serializable {
21  
22      @Override
23      public List<KeyValue> getKeyValues(ViewModel model) {
24          ConcreteKeyValue dummy = new ConcreteKeyValue("", "");
25          List<KeyValue> keyValueList = new ArrayList<KeyValue>();
26          keyValueList.add(dummy);
27  
28          return keyValueList;
29      }
30  }