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/AssemblyController.java | ||
---|---|---|
142 | 142 |
|
143 | 143 |
modelMap.addAttribute("configuration", configuration); |
144 | 144 |
modelMap.addAttribute("comparator", comparator); |
145 |
modelMap.addAttribute("formAction", "/assembly?assemblyID=" + assembly.getId()); |
|
145 | 146 |
|
146 | 147 |
return modelAndView; |
147 | 148 |
} |
... | ... | |
155 | 156 |
* @return ModelAndView for assembly. |
156 | 157 |
*/ |
157 | 158 |
@PostMapping("/assembly") |
158 |
public ModelAndView assemblyPost(@Valid Assembly assembly, BindingResult bindingResult, RedirectAttributes atts) { |
|
159 |
ModelAndView modelAndView = new ModelAndView(); |
|
159 |
public ModelAndView assemblyPost(Assembly assembly, |
|
160 |
BindingResult bindingResult, |
|
161 |
RedirectAttributes atts, |
|
162 |
@RequestParam("assemblyID") String id, |
|
163 |
@RequestParam(required=false, value="generateTable") String generateTable, |
|
164 |
@RequestParam(required=false, value="exportXls") String exportXls, |
|
165 |
@RequestParam(required=false, value="exportPdf") String exportPdf, |
|
166 |
@RequestParam(required=false, value="saveConfiguration") String saveConfiguration) |
|
167 |
{ |
|
168 |
if (generateTable != null) |
|
169 |
{ |
|
170 |
System.out.println("Generuj tabulku"); |
|
171 |
} |
|
172 |
else if (exportXls != null) |
|
173 |
{ |
|
174 |
System.out.println("Generuj XLS"); |
|
175 |
} |
|
176 |
else if (exportPdf != null) |
|
177 |
{ |
|
178 |
System.out.println("Generuj PDF"); |
|
179 |
} |
|
180 |
else if (saveConfiguration != null) |
|
181 |
{ |
|
182 |
System.out.println("ulož konfiguraci"); |
|
183 |
} |
|
184 |
|
|
160 | 185 |
|
186 |
|
|
187 |
ModelAndView modelAndView = new ModelAndView("redirect:/assembly?assemblyID=" + id); |
|
188 |
|
|
189 |
return modelAndView; |
|
190 |
/* |
|
161 | 191 |
ModelMap modelMap = modelAndView.getModelMap(); |
162 | 192 |
|
163 | 193 |
long assemblyID = assembly.getId(); |
... | ... | |
170 | 200 |
modelMap.addAttribute("contingencyTableRows", this.sqlQueryManager.getContingencyTableRow(assembly2.getSQLQuery())); |
171 | 201 |
|
172 | 202 |
return modelAndView; |
203 |
|
|
204 |
*/ |
|
173 | 205 |
} |
174 | 206 |
|
175 | 207 |
/** |
Také k dispozici: Unified diff
re #8102 - indication submit button in post