Revize 15c7afbe
Přidáno uživatelem Vojtěch Danišík před téměř 4 roky(ů)
src/main/java/vldc/aswi/web/controller/AssemblyController.java | ||
---|---|---|
175 | 175 |
|
176 | 176 |
if (generateTable != null) |
177 | 177 |
{ |
178 |
Assembly assembly = this.assemblyManager.getAssemblyById(Long.parseLong(id)); |
|
179 |
newConfiguration.setAssembly(assembly); |
|
180 |
newConfiguration.setTableName(assembly.getName()); |
|
181 |
|
|
182 |
// If configuration name is empty, then replace it by assembly name. |
|
183 |
if (newConfiguration.getName().equals("")) { |
|
184 |
newConfiguration.setName(assembly.getName()); |
|
185 |
} |
|
186 |
|
|
178 | 187 |
System.out.println("Generuj tabulku"); |
179 | 188 |
prepareForTable(newConfiguration); |
180 | 189 |
System.out.println("Generuj tabulku"); |
... | ... | |
183 | 192 |
modelMap.addAttribute("contingencyTableRows", this.sqlQueryManager.getContingencyTableRow(newConfiguration)); |
184 | 193 |
Comparator<ParameterInConfiguration> comparator = Comparator.comparingInt(o -> o.getParameter().getParameterOrder()); |
185 | 194 |
initializeFields(newConfiguration); |
195 |
|
|
186 | 196 |
modelMap.addAttribute("configuration", newConfiguration); |
187 | 197 |
modelMap.addAttribute("comparator", comparator); |
188 | 198 |
modelMap.addAttribute("formAction", "/assembly?assemblyID=" + newConfiguration.getAssembly().getId()); |
... | ... | |
310 | 320 |
|
311 | 321 |
// TODO: chybí defaultValue. |
312 | 322 |
Long assemblyID = this.assemblyManager.updateAssembly(assembly); |
323 |
|
|
313 | 324 |
this.parameterManager.updateParameters(assemblyID, assembly.getParameters()); |
314 | 325 |
Assembly updatedAssembly = this.assemblyManager.getAssemblyById(assemblyID); |
315 | 326 |
|
Také k dispozici: Unified diff
re #8153 Assembly -> Configuration synchronization