1 package org.kuali.ole.select.lookup;
2
3 import org.kuali.rice.kns.lookup.KualiLookupableImpl;
4 import org.kuali.rice.kns.web.struts.form.LookupForm;
5 import org.kuali.rice.kns.web.ui.Field;
6 import org.kuali.rice.kns.web.ui.Row;
7
8 import java.util.Iterator;
9
10
11
12
13
14
15
16
17 public class OLEPurchaseOrderItemLookupableImpl extends KualiLookupableImpl{
18
19
20
21
22
23 @Override
24 public void performClear(LookupForm lookupForm) {
25 for (Iterator iter = this.getRows().iterator(); iter.hasNext();) {
26 Row row = (Row) iter.next();
27 for (Iterator iterator = row.getFields().iterator(); iterator.hasNext();) {
28 Field field = (Field) iterator.next();
29 if (!field.getPropertyName().equalsIgnoreCase("vendorHeaderGeneratedIdentifier") &&
30 !field.getPropertyName().equalsIgnoreCase("vendorDetailAssignedIdentifier")) {
31 if (field.isSecure()) {
32 field.setSecure(false);
33 field.setDisplayMaskValue(null);
34 field.setEncryptedValue(null);
35 }
36
37 if (!field.getFieldType().equals(Field.RADIO)) {
38 field.setPropertyValue(field.getDefaultValue());
39 if (field.getFieldType().equals(Field.MULTISELECT)) {
40 field.setPropertyValues(null);
41 }
42 }
43 }
44 }
45 }
46 }
47 }