Search in sources :

Example 1 with OcppTagBatchInsertForm

use of de.rwth.idsg.steve.web.dto.OcppTagBatchInsertForm in project steve by RWTH-i5-IDSG.

the class OcppTagsController method addSinglePost.

@RequestMapping(params = "add", value = ADD_SINGLE_PATH, method = RequestMethod.POST)
public String addSinglePost(@Valid @ModelAttribute("ocppTagForm") OcppTagForm ocppTagForm, BindingResult result, Model model) {
    if (result.hasErrors()) {
        setTags(model);
        model.addAttribute("batchInsertForm", new OcppTagBatchInsertForm());
        return "data-man/ocppTagAdd";
    }
    ocppTagRepository.addOcppTag(ocppTagForm);
    return toOverview();
}
Also used : OcppTagBatchInsertForm(de.rwth.idsg.steve.web.dto.OcppTagBatchInsertForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with OcppTagBatchInsertForm

use of de.rwth.idsg.steve.web.dto.OcppTagBatchInsertForm in project steve by RWTH-i5-IDSG.

the class OcppTagsController method addGet.

@RequestMapping(value = ADD_PATH, method = RequestMethod.GET)
public String addGet(Model model) {
    setTags(model);
    model.addAttribute("ocppTagForm", new OcppTagForm());
    model.addAttribute("batchInsertForm", new OcppTagBatchInsertForm());
    return "data-man/ocppTagAdd";
}
Also used : OcppTagForm(de.rwth.idsg.steve.web.dto.OcppTagForm) OcppTagBatchInsertForm(de.rwth.idsg.steve.web.dto.OcppTagBatchInsertForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

OcppTagBatchInsertForm (de.rwth.idsg.steve.web.dto.OcppTagBatchInsertForm)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 OcppTagForm (de.rwth.idsg.steve.web.dto.OcppTagForm)1