Class AdminBasicEntityController

Direct Known Subclasses:
AdminAssetController, AdminCategoryController, AdminFieldController, AdminOfferController, AdminOrderController, AdminPageController, AdminProductController, AdminStructuredContentController, AdminUserManagementController

@Controller("blAdminBasicEntityController") @RequestMapping("/{sectionKey:.+}") public class AdminBasicEntityController extends AdminAbstractController
The default implementation of the AdminAbstractController. This delegates every call to super and does not provide any custom-tailored functionality. It is responsible for rendering the admin for every entity that is not explicitly customized by its own controller.
Author:
Andre Azzolini (apazzolini), Jeff Fischer
  • Field Details

  • Constructor Details

    • AdminBasicEntityController

      public AdminBasicEntityController()
  • Method Details

    • viewEntityList

      @RequestMapping(value="", method=GET) public String viewEntityList(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Renders the main entity listing for the specified class, which is based on the current sectionKey with some optional criteria.
      Parameters:
      request -
      response -
      model -
      pathVars -
      requestParams - a Map of property name -> list critiera values
      Returns:
      the return view path
      Throws:
      Exception
    • setupViewEntityListBasicModel

      protected void setupViewEntityListBasicModel(jakarta.servlet.http.HttpServletRequest request, ClassMetadata cmd, String sectionKey, String sectionClassName, org.springframework.ui.Model model, org.springframework.util.MultiValueMap<String,String> requestParams)
    • viewEntityListSelectize

      @RequestMapping(value="/selectize", method=GET) @ResponseBody public Map<String,Object> viewEntityListSelectize(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Throws:
      Exception
    • getCustomCriteria

      protected String[] getCustomCriteria(Map<String,List<String>> requestParams)
      Obtains the requested criteria parameter
      Parameters:
      requestParams -
      Returns:
    • addAddActionIfAllowed

      protected void addAddActionIfAllowed(String sectionClassName, ClassMetadata cmd, List<EntityFormAction> mainActions)
      Adds the "Add" button to the main entity form if the current user has permissions to create new instances of the entity and all of the fields in the entity aren't marked as read only.
      Parameters:
      sectionClassName -
      cmd -
      mainActions -
    • isAddActionAllowed

      protected boolean isAddActionAllowed(String sectionClassName, ClassMetadata cmd)
    • isNotReadOnly

      protected boolean isNotReadOnly(ClassMetadata cmd)
    • viewAddEntityForm

      @RequestMapping(value="/add", method=GET) public String viewAddEntityForm(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @RequestParam(defaultValue="") String entityType) throws Exception
      Renders the modal form that is used to add a new parent level entity. Note that this form cannot render any subcollections as operations on those collections require the parent level entity to first be saved and have and id. Once the entity is initially saved, we will redirect the user to the normal manage entity screen where they can then perform operations on sub collections.
      Parameters:
      request -
      response -
      model -
      pathVars -
      entityType -
      Returns:
      the return view path
      Throws:
      Exception
    • determineEntityType

      protected String determineEntityType(String entityType, ClassMetadata cmd) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • addEntity

      @RequestMapping(value="/add", method=POST) public String addEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
      Processes the request to add a new entity. If successful, returns a redirect to the newly created entity.
      Parameters:
      request -
      response -
      model -
      pathVars -
      entityForm -
      result -
      Returns:
      the return view path
      Throws:
      Exception
    • duplicateEntity

      @RequestMapping(value="/{id}/duplicate", method=POST) public String duplicateEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
      Throws:
      Exception
    • getErrorDuplicatingResponse

      protected String getErrorDuplicatingResponse(jakarta.servlet.http.HttpServletResponse response, String code)
    • viewEntityForm

      @RequestMapping(value="/{id}", method=GET) public String viewEntityForm(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id) throws Exception
      Renders the main entity form for the specified entity
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      Returns:
      the return view path
      Throws:
      Exception
    • getViewSubRecords

      protected Map<String,DynamicResultSet> getViewSubRecords(jakarta.servlet.http.HttpServletRequest request, Map<String,String> pathVars, ClassMetadata cmd, Entity entity, List<SectionCrumb> crumbs) throws Exception
      Throws:
      Exception
    • viewEntityTab

      @RequestMapping(value="/{id}/{tab:[0-9]+}/{tabName}", method=POST) public String viewEntityTab(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("tabName") String tabName, @ModelAttribute("entityForm") EntityForm entityForm, @ModelAttribute("entity") Entity entity) throws Exception
      Attempts to get the List Grid for the selected tab.
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      tabName -
      entityForm -
      entity -
      Returns:
      the return view path
      Throws:
      Exception
    • saveEntityJson

      @RequestMapping(value="/{id}", method=POST, produces="application/json") public String saveEntityJson(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra) throws Exception
      Builds JSON that looks like this:
       {"errors":
            [{"message":"This field is Required",
              "code": "requiredValidationFailure"
              "field":"defaultSku--name",
              "errorType", "field",
              "tab": "General"
              },
              {"message":"This field is Required",
              "code": "requiredValidationFailure"
              "field":"defaultSku--name",
              "errorType", "field",
              "tab": "General"
              }]
       }
       
      Throws:
      Exception
    • buildDirtyList

      public List<String> buildDirtyList(Map<String,String> pathVars, jakarta.servlet.http.HttpServletRequest request, String id) throws ServiceException
      Throws:
      ServiceException
    • saveEntity

      @RequestMapping(value="/{id}", method=POST) public String saveEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra) throws Exception
      Attempts to save the given entity. If validation is unsuccessful, it will re-render the entity form with error fields highlighted. On a successful save, it will refresh the entity page.
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      entityForm -
      result -
      Returns:
      the return view path
      Throws:
      Exception
    • modifyEntityForm

      protected void modifyEntityForm(Entity entity, EntityForm entityForm, Map<String,String> pathVars) throws Exception
      Throws:
      Exception
    • resolveAppropriateEntityView

      protected String resolveAppropriateEntityView(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, @ModelAttribute("entityForm") EntityForm entityForm)
    • removeEntity

      @RequestMapping(value="/{id}/delete", method=POST) public String removeEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra) throws Exception
      Attempts to remove the given entity.
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      Returns:
      the return view path
      Throws:
      Exception
    • getCollectionValueDetails

      @RequestMapping(value="/{collectionField:.*}/details", method=GET) @ResponseBody public Map<String,String> getCollectionValueDetails(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("collectionField") String collectionField, @RequestParam String ids, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Throws:
      Exception
    • viewCollectionItemDetails

      @RequestMapping(value="/{collectionField:.*}/{id}/view", method=GET) public String viewCollectionItemDetails(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("collectionField") String collectionField, @PathVariable("id") String id) throws Exception
      Shows the modal popup for the current selected "to-one" field. For instance, if you are viewing a list of products then this method is invoked when a user clicks on the name of the default category field.
      Parameters:
      request -
      response -
      model -
      pathVars -
      collectionField -
      id -
      Returns:
      Throws:
      Exception
    • viewCollectionItemTab

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/{tab:[0-9]+}/{tabName}", method=POST) public String viewCollectionItemTab(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @PathVariable("tabName") String tabName, @ModelAttribute("entityForm") EntityForm entityForm) throws Exception
      Throws:
      Exception
    • viewReadOnlyCollectionItemTab

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/view/{tab:[0-9]+}/{tabName}", method=POST) public String viewReadOnlyCollectionItemTab(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @PathVariable("tabName") String tabName, @ModelAttribute("entityForm") EntityForm entityForm) throws Exception
      Throws:
      Exception
    • getCollectionFieldRecords

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}", method=GET) public String getCollectionFieldRecords(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Returns the records for a given collectionField filtered by a particular criteria
      Parameters:
      request -
      response -
      model -
      pathVars -
      collectionField -
      requestParams -
      Returns:
      the return view path
      Throws:
      Exception
    • showAddCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/add", method=GET) public String showAddCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Shows the modal dialog that is used to add an item to a given collection. There are several possible outcomes of this call depending on the type of the specified collection field.
      • Basic Collection (Persist) - Renders a blank form for the specified target entity so that the user may enter information and associate the record with this collection. Used by fields such as ProductAttribute.
      • Basic Collection (Lookup) - Renders a list grid that allows the user to click on an entity and select it. Used by fields such as "allParentCategories".
      • Adorned Collection (without form) - Renders a list grid that allows the user to click on an entity and select it. The view rendered by this is identical to basic collection (lookup), but will perform the operation on an adorned field, which may carry extra meta-information about the created relationship, such as order.
      • Adorned Collection (with form) - Renders a list grid that allows the user to click on an entity and select it. Once the user selects the entity, he will be presented with an empty form based on the specified "maintainedAdornedTargetFields" for this field. Used by fields such as "crossSellProducts", which in addition to linking an entity, provide extra fields, such as a promotional message.
      • Map Collection - Renders a form for the target entity that has an additional key field. This field is populated either from the configured map keys, or as a result of a lookup in the case of a key based on another entity. Used by fields such as the mediaMap on a Sku.
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      requestParams -
      Returns:
      the return view path
      Throws:
      Exception
    • getModalForBlankEntityType

      protected String getModalForBlankEntityType(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, String sectionKey, ClassMetadata cmd)
    • addCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/add/{collectionItemId}/verify", method=POST) @ResponseBody public Map<String,Object> addCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId) throws Exception
      Throws:
      Exception
    • getSelectizeCollectionOptions

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/selectize", method=GET) @ResponseBody public Map<String,Object> getSelectizeCollectionOptions(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      requestParams -
      Returns:
      Json collection data
      Throws:
      Exception
    • buildSelectizeCustomCriteria

      protected String[] buildSelectizeCustomCriteria()
    • addSelectizeCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/selectize-add", method=POST) @ResponseBody public Map<String,Object> addSelectizeCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
      Adds the requested collection item via Selectize
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      entityForm -
      Returns:
      the return view path
      Throws:
      Exception
    • declareShouldIgnoreAdditionStatusFilter

      protected void declareShouldIgnoreAdditionStatusFilter()
    • addCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/add", method=POST) public String addCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
      Adds the requested collection item
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      entityForm -
      Returns:
      the return view path
      Throws:
      Exception
    • addEmptyCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/addEmpty", method=POST) @ResponseBody public String addEmptyCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
      Throws:
      Exception
    • buildAddCollectionItemModel

      protected String buildAddCollectionItemModel(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String id, String collectionField, String sectionKey, Property collectionProperty, FieldMetadata md, PersistencePackageRequest ppr, EntityForm entityForm, Entity entity) throws ServiceException
      Builds out all of the model information needed for showing the add modal for collection items on both the initial GET as well as after a POST with validation errors
      Parameters:
      request -
      model -
      id -
      collectionField -
      sectionKey -
      collectionProperty -
      md -
      ppr -
      Returns:
      the appropriate view to display for the modal
      Throws:
      ServiceException
    • showUpdateCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/{alternateId}", method=GET) public String showUpdateCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @PathVariable("alternateId") String alternateId) throws Exception
      Shows the appropriate modal dialog to edit the selected collection item
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      collectionItemId -
      Returns:
      the return view path
      Throws:
      Exception
    • showUpdateCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}", method=GET) public String showUpdateCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId) throws Exception
      Throws:
      Exception
    • showViewCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/{alternateId}/view", method=GET) public String showViewCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @PathVariable("alternateId") String alternateId) throws Exception
      Shows the appropriate modal dialog to view the selected collection item. This will display the modal as readonly
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      collectionItemId -
      Returns:
      the return view path
      Throws:
      Exception
    • showViewCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/view", method=GET) public String showViewCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId) throws Exception
      Throws:
      Exception
    • showViewUpdateCollection

      protected String showViewUpdateCollection(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, String collectionItemId, String alternateId, String modalHeaderType) throws ServiceException
      Throws:
      ServiceException
    • showViewUpdateCollection

      protected String showViewUpdateCollection(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, String collectionItemId, String modalHeaderType) throws ServiceException
      Throws:
      ServiceException
    • showViewUpdateCollection

      protected String showViewUpdateCollection(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, String collectionItemId, String modalHeaderType, EntityForm entityForm, Entity entity) throws ServiceException
      Throws:
      ServiceException
    • showViewUpdateCollection

      protected String showViewUpdateCollection(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, String collectionItemId, String alternateId, String modalHeaderType, EntityForm entityForm, Entity entity) throws ServiceException
      Shows the view and populates the model for updating a collection item. You can also pass in an entityform and entity which are optional. If they are not passed in then they are automatically looked up
      Parameters:
      request -
      model -
      pathVars -
      id -
      collectionField -
      collectionItemId -
      modalHeaderType -
      entityForm -
      entity -
      Returns:
      Throws:
      ServiceException
    • reinitializeEntityForm

      protected EntityForm reinitializeEntityForm(EntityForm entityForm, ClassMetadata collectionMetadata, Entity entity, Map<String,DynamicResultSet> subRecordsMap, List<SectionCrumb> sectionCrumbs) throws ServiceException
      Throws:
      ServiceException
    • updateCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}", method=POST) public String updateCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @ModelAttribute("entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
      Updates the specified collection item
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      collectionItemId - the collection primary key value (in the case of adorned target collection, this is the primary key value of the target entity)
      entityForm -
      result -
      Returns:
      the return view path
      Throws:
      Exception
    • updateCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/{alternateId}", method=POST) public String updateCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @ModelAttribute("entityForm") EntityForm entityForm, @PathVariable("alternateId") String alternateId, org.springframework.validation.BindingResult result) throws Exception
      Updates the specified collection item
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      collectionItemId - the collection primary key value (in the case of adorned target collection, this is the primary key value of the target entity)
      entityForm -
      alternateId - in the case of adorned target collections, this is the primary key value of the collection member
      result -
      Returns:
      the return view path
      Throws:
      Exception
    • updateCollectionItemSequence

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/sequence", method=POST) @ResponseBody public Map<String,Object> updateCollectionItemSequence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @RequestParam("newSequence") String newSequence) throws Exception
      Throws:
      Exception
    • updateCollectionItemSequence

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/{alternateId}/sequence", method=POST) @ResponseBody public Map<String,Object> updateCollectionItemSequence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @RequestParam("newSequence") String newSequence, @PathVariable("alternateId") String alternateId) throws Exception
      Updates the given collection item's sequence. This should only be triggered for adorned target collections where a sort field is specified -- any other invocation is incorrect and will result in an exception.
      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      collectionItemId -
      Returns:
      an object explaining the state of the operation
      Throws:
      Exception
    • removeCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/delete", method=POST) public String removeCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId) throws Exception
      Removes the requested collection item

      Note that the request must contain a parameter called "key" when attempting to remove a collection item from a map collection.

      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      collectionItemId -
      Returns:
      the return view path
      Throws:
      Exception
    • removeCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}/{alternateId}/delete", method=POST) public String removeCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId, @PathVariable("alternateId") String alternateId) throws Exception
      Removes the requested collection item

      Note that the request must contain a parameter called "key" when attempting to remove a collection item from a map collection.

      Parameters:
      request -
      response -
      model -
      pathVars -
      id -
      collectionField -
      collectionItemId -
      Returns:
      the return view path
      Throws:
      Exception
    • addAuditableDisplayFields

      public void addAuditableDisplayFields(EntityForm entityForm)
    • addAuditableDisplayField

      protected void addAuditableDisplayField(EntityForm entityForm, Field userField)
    • buildAuditableDisplayField

      protected Field buildAuditableDisplayField(Field auditableField)
    • getCurrentTabName

      protected String getCurrentTabName(Map<String,String> pathVars, ClassMetadata cmd)
    • getCurrentFolderId

      protected String getCurrentFolderId(jakarta.servlet.http.HttpServletRequest request)
    • setTypedEntityModelAttributes

      protected void setTypedEntityModelAttributes(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model)
    • initBinder

      @InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
      Invoked on every request to provide the ability to register specific binders for Spring's binding process. By default, we register a binder that treats empty Strings as null and a Boolean editor that supports either true or false. If the value is passed in as null, it will treat it as false.
      Parameters:
      binder -