Revize 1d00b6ee
Přidáno uživatelem Jan Čarnogurský před asi 4 roky(ů)
- ID 1d00b6ee972a1a7be011e8727eef19373112df3e
- Rodič f09d9a1f
src/main/java/vldc/aswi/web/controller/ConfigurationController.java | ||
---|---|---|
68 | 68 |
|
69 | 69 |
modelMap.addAttribute("configuration", configuration); |
70 | 70 |
modelMap.addAttribute("comparator", comparator); |
71 |
modelMap.addAttribute("formAction", "/configuration?configurationID=" + configuration.getId()); |
|
71 | 72 |
|
72 | 73 |
return modelAndView; |
73 | 74 |
} |
... | ... | |
80 | 81 |
* @return modelAndView with redirection |
81 | 82 |
*/ |
82 | 83 |
@PostMapping("/configuration") |
83 |
public ModelAndView configurationPost(@Valid Configuration newConfiguration, BindingResult bindingResult, |
|
84 |
@RequestParam("configurationID") String id) { |
|
84 |
public ModelAndView configurationPost( Configuration newConfiguration, |
|
85 |
BindingResult bindingResult, |
|
86 |
@RequestParam("configurationID") String id, |
|
87 |
@RequestParam(required=false, value="generateTable") String generateTable, |
|
88 |
@RequestParam(required=false, value="exportXls") String exportXls, |
|
89 |
@RequestParam(required=false, value="exportPdf") String exportPdf, |
|
90 |
@RequestParam(required=false, value="saveConfiguration") String saveConfiguration) |
|
91 |
{ |
|
92 |
if (generateTable != null) |
|
93 |
{ |
|
94 |
System.out.println("Generuj tabulku"); |
|
95 |
} |
|
96 |
else if (exportXls != null) |
|
97 |
{ |
|
98 |
System.out.println("Generuj XLS"); |
|
99 |
} |
|
100 |
else if (exportPdf != null) |
|
101 |
{ |
|
102 |
System.out.println("Generuj PDF"); |
|
103 |
} |
|
104 |
else if (saveConfiguration != null) |
|
105 |
{ |
|
106 |
System.out.println("ulož konfiguraci"); |
|
107 |
} |
|
108 |
|
|
109 |
|
|
85 | 110 |
ModelAndView modelAndView = new ModelAndView(); |
86 | 111 |
|
87 | 112 |
if (bindingResult.hasErrors()) { |
Také k dispozici: Unified diff
re #8102 - indication submit button in post