Class GenericEntityViewController

java.lang.Object
com.foreach.across.modules.entity.controllers.admin.GenericEntityViewController

@AdminWebController @RequestMapping("/entities/{entityConfig:.+}") @Controller public class GenericEntityViewController extends Object
Generic controller for building entity views of non-associated entities.
Since:
2.0.0
Author:
Arne Vandamme
  • Field Details

  • Constructor Details

    • GenericEntityViewController

      public GenericEntityViewController()
  • Method Details

    • createEntityViewRequest

      @ModelAttribute public void createEntityViewRequest(@PathVariable("entityConfig") String entityName, @PathVariable(value="entityId",required=false) Serializable entityId, @PathVariable(value="associatedConfig",required=false) String associationName, @PathVariable(value="associatedEntityId",required=false) Serializable associatedEntityId, @PathVariable(value="action",required=false) String action, org.springframework.http.HttpMethod httpMethod, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.ui.ModelMap model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      Responsible for building the initial EntityViewContext and EntityViewRequest.
    • registerWebResources

      @ModelAttribute public void registerWebResources(com.foreach.across.modules.web.resource.WebResourceRegistry webResourceRegistry)
    • initViewCommandBinder

      @InitBinder("entityViewCommand") public void initViewCommandBinder(org.springframework.web.bind.WebDataBinder dataBinder)
    • executeView

      @RequestMapping({"","/{entityId}","/{entityId}/{action:delete|update}","/{entityId}/associations/{associatedConfig:.+}","/{entityId}/associations/{associatedConfig:.+}/{associatedEntityId}","/{entityId}/associations/{associatedConfig:.+}/{associatedEntityId}/{action:delete|update}"}) public Object executeView(@NonNull @ModelAttribute("entityViewCommand") @NonNull EntityViewCommand command, org.springframework.validation.BindingResult bindingResult)