1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.salgroup.service;
17
18 import java.util.List;
19 import java.util.Properties;
20
21 import org.kuali.hr.time.HrEffectiveDateActiveLookupableHelper;
22 import org.kuali.hr.time.salgroup.SalGroup;
23 import org.kuali.rice.kns.lookup.HtmlData;
24 import org.kuali.rice.kns.lookup.HtmlData.AnchorHtmlData;
25 import org.kuali.rice.krad.bo.BusinessObject;
26 import org.kuali.rice.krad.util.KRADConstants;
27 import org.kuali.rice.krad.util.UrlFactory;
28
29 public class SalaryGroupLookupableHelper extends HrEffectiveDateActiveLookupableHelper {
30
31 private static final long serialVersionUID = 4826886027602440306L;
32
33 @Override
34 public List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames) {
35 List<HtmlData> customActionUrls = super.getCustomActionUrls(businessObject, pkNames);
36
37 SalGroup salGroup = (SalGroup) businessObject;
38 String hrSalGroupId = salGroup.getHrSalGroupId();
39
40 Properties params = new Properties();
41 params.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, getBusinessObjectClass().getName());
42 params.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.MAINTENANCE_NEW_METHOD_TO_CALL);
43 params.put("hrSalGroupId", hrSalGroupId);
44 AnchorHtmlData viewUrl = new AnchorHtmlData(UrlFactory.parameterizeUrl(KRADConstants.INQUIRY_ACTION, params), "view");
45 viewUrl.setDisplayText("view");
46 viewUrl.setTarget(AnchorHtmlData.TARGET_BLANK);
47 customActionUrls.add(viewUrl);
48
49 return customActionUrls;
50 }
51
52 }