1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.impl.peopleflow; |
17 | |
|
18 | |
import org.apache.commons.lang.StringUtils; |
19 | |
import org.kuali.rice.krad.web.controller.MaintenanceDocumentController; |
20 | |
import org.kuali.rice.krad.web.form.MaintenanceForm; |
21 | |
import org.kuali.rice.krad.web.form.UifFormBase; |
22 | |
import org.springframework.stereotype.Controller; |
23 | |
import org.springframework.validation.BindingResult; |
24 | |
import org.springframework.web.bind.annotation.ModelAttribute; |
25 | |
import org.springframework.web.bind.annotation.RequestMapping; |
26 | |
import org.springframework.web.servlet.ModelAndView; |
27 | |
|
28 | |
import javax.servlet.http.HttpServletRequest; |
29 | |
import javax.servlet.http.HttpServletResponse; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
@Controller |
37 | |
@RequestMapping(value = "/peopleFlowMaintenance") |
38 | 0 | public class PeopleFlowController extends MaintenanceDocumentController { |
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
@RequestMapping(params = "methodToCall=" + "prepareTypeAttributes") |
44 | |
public ModelAndView prepareTypeAttributes(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result, |
45 | |
HttpServletRequest request, HttpServletResponse response) throws Exception { |
46 | 0 | MaintenanceForm maintenanceForm = (MaintenanceForm) form; |
47 | |
|
48 | 0 | PeopleFlowBo peopleFlow = |
49 | |
(PeopleFlowBo) maintenanceForm.getDocument().getNewMaintainableObject().getDataObject(); |
50 | 0 | if (StringUtils.isNotBlank(peopleFlow.getTypeId())) { |
51 | 0 | peopleFlow.rebuildTypeAttributes(); |
52 | |
} |
53 | |
|
54 | 0 | return super.updateComponent(form, result, request, response); |
55 | |
} |
56 | |
|
57 | |
} |