@Controller(value="blAdminBasicEntityController") @RequestMapping(value="/{sectionKey:.+}") public class AdminBasicEntityController extends AdminAbstractController
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.Modifier and Type | Field and Description |
---|---|
protected AdminUserDao |
adminUserDao |
protected AdornedTargetAutoPopulateExtensionManager |
adornedTargetAutoPopulateExtensionManager |
static String |
ALTERNATE_ID_PROPERTY |
static String |
CUSTOM_CRITERIA |
protected EntityDuplicator |
duplicator |
protected DynamicEntityDao |
dynamicEntityDao |
protected GenericEntityService |
genericEntityService |
static String |
IS_SELECTIZE_REQUEST |
protected static org.apache.commons.logging.Log |
LOG |
protected RowLevelSecurityService |
rowLevelSecurityService |
protected SandBoxHelper |
sandBoxHelper |
adminNavigationService, adminRemoteSecurityService, CURRENT_ADMIN_MODULE_ATTRIBUTE_NAME, CURRENT_ADMIN_SECTION_ATTRIBUTE_NAME, customCriteriaService, DEFAULT_CONTAINER_VIEW, entityConfiguration, entityFormValidator, extensionManager, FILTER_VALUE_SEPARATOR, FILTER_VALUE_SEPARATOR_REGEX, filterProductTypeExtensionManager, formService, MODAL_CONTAINER_VIEW, service, validationService
Constructor and Description |
---|
AdminBasicEntityController() |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
addAuditableDisplayFields(EntityForm entityForm) |
String |
addCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Adds the requested collection item
|
Map<String,Object> |
addCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId) |
String |
addEmptyCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
EntityForm entityForm,
org.springframework.validation.BindingResult result) |
String |
addEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Processes the request to add a new entity.
|
Map<String,Object> |
addSelectizeCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Adds the requested collection item via Selectize
|
protected String |
buildAddCollectionItemModel(javax.servlet.http.HttpServletRequest request,
javax.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)
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
|
List<String> |
buildDirtyList(Map<String,String> pathVars,
javax.servlet.http.HttpServletRequest request,
String id) |
protected String[] |
buildSelectizeCustomCriteria() |
protected void |
declareShouldIgnoreAdditionStatusFilter() |
protected String |
determineEntityType(String entityType,
ClassMetadata cmd) |
String |
duplicateEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
EntityForm entityForm,
org.springframework.validation.BindingResult result) |
String |
getCollectionFieldRecords(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
org.springframework.util.MultiValueMap<String,String> requestParams)
Returns the records for a given collectionField filtered by a particular criteria
|
Map<String,String> |
getCollectionValueDetails(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String collectionField,
String ids,
org.springframework.util.MultiValueMap<String,String> requestParams) |
protected String |
getCurrentTabName(Map<String,String> pathVars,
ClassMetadata cmd) |
protected String[] |
getCustomCriteria(Map<String,List<String>> requestParams)
Obtains the requested criteria parameter
|
protected String |
getErrorDuplicatingResponse(javax.servlet.http.HttpServletResponse response,
String code) |
protected String |
getModalForBlankEntityType(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
String sectionKey,
ClassMetadata cmd) |
Map<String,Object> |
getSelectizeCollectionOptions(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
org.springframework.util.MultiValueMap<String,String> requestParams) |
protected Map<String,DynamicResultSet> |
getViewSubRecords(javax.servlet.http.HttpServletRequest request,
Map<String,String> pathVars,
ClassMetadata cmd,
Entity entity,
List<SectionCrumb> crumbs) |
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.
|
protected boolean |
isAddActionAllowed(String sectionClassName,
ClassMetadata cmd) |
protected boolean |
isNotReadOnly(ClassMetadata cmd) |
protected void |
modifyEntityForm(Entity entity,
EntityForm entityForm,
Map<String,String> pathVars) |
protected EntityForm |
reinitializeEntityForm(EntityForm entityForm,
ClassMetadata collectionMetadata,
Entity entity,
Map<String,DynamicResultSet> subRecordsMap,
List<SectionCrumb> sectionCrumbs) |
String |
removeCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId)
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.
|
String |
removeCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
String alternateId)
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.
|
String |
removeEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
EntityForm entityForm,
org.springframework.validation.BindingResult result,
org.springframework.web.servlet.mvc.support.RedirectAttributes ra)
Attempts to remove the given entity.
|
protected String |
resolveAppropriateEntityView(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
EntityForm entityForm) |
String |
saveEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
EntityForm entityForm,
org.springframework.validation.BindingResult result,
org.springframework.web.servlet.mvc.support.RedirectAttributes ra)
Attempts to save the given entity.
|
String |
saveEntityJson(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
EntityForm entityForm,
org.springframework.validation.BindingResult result,
org.springframework.web.servlet.mvc.support.RedirectAttributes ra)
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"
}]
}
|
protected void |
setTypedEntityModelAttributes(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model) |
protected void |
setupViewEntityListBasicModel(javax.servlet.http.HttpServletRequest request,
ClassMetadata cmd,
String sectionKey,
String sectionClassName,
org.springframework.ui.Model model,
org.springframework.util.MultiValueMap<String,String> requestParams) |
String |
showAddCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
org.springframework.util.MultiValueMap<String,String> requestParams)
Shows the modal dialog that is used to add an item to a given collection.
|
String |
showUpdateCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId) |
String |
showUpdateCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
String alternateId)
Shows the appropriate modal dialog to edit the selected collection item
|
String |
showViewCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId) |
String |
showViewCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
String alternateId)
Shows the appropriate modal dialog to view the selected collection item.
|
protected String |
showViewUpdateCollection(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
String modalHeaderType) |
protected String |
showViewUpdateCollection(javax.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) |
protected String |
showViewUpdateCollection(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
String alternateId,
String modalHeaderType) |
protected String |
showViewUpdateCollection(javax.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)
Shows the view and populates the model for updating a collection item.
|
String |
updateCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Updates the specified collection item
|
String |
updateCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
EntityForm entityForm,
String alternateId,
org.springframework.validation.BindingResult result)
Updates the specified collection item
|
Map<String,Object> |
updateCollectionItemSequence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
String newSequence) |
Map<String,Object> |
updateCollectionItemSequence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
String newSequence,
String alternateId)
Updates the given collection item's sequence.
|
String |
viewAddEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String entityType)
Renders the modal form that is used to add a new parent level entity.
|
String |
viewCollectionItemDetails(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String collectionField,
String id)
Shows the modal popup for the current selected "to-one" field.
|
String |
viewCollectionItemTab(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String collectionField,
String collectionItemId,
String tabName,
EntityForm entityForm) |
String |
viewEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id)
Renders the main entity form for the specified entity
|
String |
viewEntityList(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
org.springframework.util.MultiValueMap<String,String> requestParams)
Renders the main entity listing for the specified class, which is based on the current sectionKey with some optional
criteria.
|
Map<String,Object> |
viewEntityListSelectize(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
org.springframework.util.MultiValueMap<String,String> requestParams) |
String |
viewEntityTab(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
String tabName,
EntityForm entityForm,
Entity entity)
Attempts to get the List Grid for the selected tab.
|
attachSectionSpecificInfo, attachSectionSpecificInfo, createSectionCrumb, extractDynamicFormFields, getAddEntityTypes, getClassNameForSection, getCollectionListGrid, getCollectionListGrid, getCriteria, getDefaultEntityType, getDynamicFieldTemplateForm, getDynamicForm, getEntityForm, getEntityForm, getEntityForm, getFirstId, getLastId, getLowerCount, getMaxIndex, getMaxResults, getPageSize, getPersistencePackageRequest, getSectionCrumbs, getSectionCustomCriteria, getSectionKey, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, getUpperCount, modifyAddEntityForm, modifyCriteria, modifyEntityForm, populateJsonValidationErrors, setModelAttributes, setSpecializedNameForFields, translateErrorMessage
addDeepLink, getContextPath, isAjaxRequest, jsonResponse
protected static final org.apache.commons.logging.Log LOG
public static final String ALTERNATE_ID_PROPERTY
public static final String CUSTOM_CRITERIA
public static final String IS_SELECTIZE_REQUEST
protected SandBoxHelper sandBoxHelper
protected AdminUserDao adminUserDao
protected DynamicEntityDao dynamicEntityDao
protected AdornedTargetAutoPopulateExtensionManager adornedTargetAutoPopulateExtensionManager
protected RowLevelSecurityService rowLevelSecurityService
protected EntityDuplicator duplicator
protected GenericEntityService genericEntityService
@RequestMapping(value="", method=GET) public String viewEntityList(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
request
- response
- model
- pathVars
- requestParams
- a Map of property name -> list critiera valuesException
protected void setupViewEntityListBasicModel(javax.servlet.http.HttpServletRequest request, ClassMetadata cmd, String sectionKey, String sectionClassName, org.springframework.ui.Model model, org.springframework.util.MultiValueMap<String,String> requestParams)
@RequestMapping(value="/selectize", method=GET) @ResponseBody public Map<String,Object> viewEntityListSelectize(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
Exception
protected String[] getCustomCriteria(Map<String,List<String>> requestParams)
requestParams
- protected void addAddActionIfAllowed(String sectionClassName, ClassMetadata cmd, List<EntityFormAction> mainActions)
sectionClassName
- cmd
- mainActions
- protected boolean isAddActionAllowed(String sectionClassName, ClassMetadata cmd)
protected boolean isNotReadOnly(ClassMetadata cmd)
@RequestMapping(value="/add", method=GET) public String viewAddEntityForm(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @RequestParam(defaultValue="") String entityType) throws Exception
request
- response
- model
- pathVars
- entityType
- Exception
protected String determineEntityType(String entityType, ClassMetadata cmd) throws UnsupportedEncodingException
UnsupportedEncodingException
@RequestMapping(value="/add", method=POST) public String addEntity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
request
- response
- model
- pathVars
- entityForm
- result
- Exception
@RequestMapping(value="/{id}/duplicate", method=POST) public String duplicateEntity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
Exception
protected String getErrorDuplicatingResponse(javax.servlet.http.HttpServletResponse response, String code)
@RequestMapping(value="/{id}", method=GET) public String viewEntityForm(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id) throws Exception
request
- response
- model
- pathVars
- id
- Exception
protected Map<String,DynamicResultSet> getViewSubRecords(javax.servlet.http.HttpServletRequest request, Map<String,String> pathVars, ClassMetadata cmd, Entity entity, List<SectionCrumb> crumbs) throws Exception
Exception
@RequestMapping(value="/{id}/{tab:[0-9]+}/{tabName}", method=POST) public String viewEntityTab(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="tabName") String tabName, @ModelAttribute(value="entityForm") EntityForm entityForm, @ModelAttribute(value="entity") Entity entity) throws Exception
request
- response
- model
- pathVars
- id
- tabName
- entityForm
- entity
- Exception
@RequestMapping(value="/{id}", method=POST, produces="application/json") public String saveEntityJson(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra) throws Exception
Exception
public List<String> buildDirtyList(Map<String,String> pathVars, javax.servlet.http.HttpServletRequest request, String id) throws ServiceException
ServiceException
@RequestMapping(value="/{id}", method=POST) public String saveEntity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra) throws Exception
request
- response
- model
- pathVars
- id
- entityForm
- result
- Exception
protected void modifyEntityForm(Entity entity, EntityForm entityForm, Map<String,String> pathVars) throws Exception
Exception
protected String resolveAppropriateEntityView(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, @ModelAttribute(value="entityForm") EntityForm entityForm)
@RequestMapping(value="/{id}/delete", method=POST) public String removeEntity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra) throws Exception
request
- response
- model
- pathVars
- id
- Exception
@RequestMapping(value="/{collectionField:.*}/details", method=GET) @ResponseBody public Map<String,String> getCollectionValueDetails(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="collectionField") String collectionField, @RequestParam String ids, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
Exception
@RequestMapping(value="/{collectionField:.*}/{id}/view", method=GET) public String viewCollectionItemDetails(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="id") String id) throws Exception
request
- response
- model
- pathVars
- collectionField
- id
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/{tab:[0-9]+}/{tabName}", method=POST) public String viewCollectionItemTab(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId, @PathVariable(value="tabName") String tabName, @ModelAttribute(value="entityForm") EntityForm entityForm) throws Exception
Exception
@RequestMapping(value="/{id}/{collectionField:.*}", method=GET) public String getCollectionFieldRecords(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
request
- response
- model
- pathVars
- collectionField
- requestParams
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/add", method=GET) public String showAddCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- requestParams
- Exception
protected String getModalForBlankEntityType(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, String sectionKey, ClassMetadata cmd)
@RequestMapping(value="/{id}/{collectionField:.*}/add/{collectionItemId}/verify", method=POST) @ResponseBody public Map<String,Object> addCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId) throws Exception
Exception
@RequestMapping(value="/{id}/{collectionField:.*}/selectize", method=GET) @ResponseBody public Map<String,Object> getSelectizeCollectionOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- requestParams
- Exception
protected String[] buildSelectizeCustomCriteria()
@RequestMapping(value="/{id}/{collectionField:.*}/selectize-add", method=POST) @ResponseBody public Map<String,Object> addSelectizeCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- entityForm
- Exception
protected void declareShouldIgnoreAdditionStatusFilter()
@RequestMapping(value="/{id}/{collectionField:.*}/add", method=POST) public String addCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- entityForm
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/addEmpty", method=POST) @ResponseBody public String addEmptyCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
Exception
protected String buildAddCollectionItemModel(javax.servlet.http.HttpServletRequest request, javax.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
request
- model
- id
- collectionField
- sectionKey
- collectionProperty
- md
- ppr
- ServiceException
#addCollectionItem(HttpServletRequest, HttpServletResponse, Model, Map, String, String, EntityForm, BindingResult)}
,
#showAddCollectionItem(HttpServletRequest, HttpServletResponse, Model, Map, String, String, MultiValueMap)}
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/{alternateId}", method=GET) public String showUpdateCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId, @PathVariable(value="alternateId") String alternateId) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- collectionItemId
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}", method=GET) public String showUpdateCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId) throws Exception
Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/{alternateId}/view", method=GET) public String showViewCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId, @PathVariable(value="alternateId") String alternateId) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- collectionItemId
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/view", method=GET) public String showViewCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId) throws Exception
Exception
protected String showViewUpdateCollection(javax.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
ServiceException
protected String showViewUpdateCollection(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, String collectionItemId, String modalHeaderType) throws ServiceException
ServiceException
protected String showViewUpdateCollection(javax.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
ServiceException
protected String showViewUpdateCollection(javax.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
request
- model
- pathVars
- id
- collectionField
- collectionItemId
- modalHeaderType
- entityForm
- entity
- ServiceException
protected EntityForm reinitializeEntityForm(EntityForm entityForm, ClassMetadata collectionMetadata, Entity entity, Map<String,DynamicResultSet> subRecordsMap, List<SectionCrumb> sectionCrumbs) throws ServiceException
ServiceException
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}", method=POST) public String updateCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
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
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/{alternateId}", method=POST) public String updateCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId, @ModelAttribute(value="entityForm") EntityForm entityForm, @PathVariable(value="alternateId") String alternateId, org.springframework.validation.BindingResult result) throws Exception
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 memberresult
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/sequence", method=POST) @ResponseBody public Map<String,Object> updateCollectionItemSequence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId, @RequestParam(value="newSequence") String newSequence) throws Exception
Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/{alternateId}/sequence", method=POST) @ResponseBody public Map<String,Object> updateCollectionItemSequence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId, @RequestParam(value="newSequence") String newSequence, @PathVariable(value="alternateId") String alternateId) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- collectionItemId
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/delete", method=POST) public String removeCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- collectionItemId
- Exception
@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/{alternateId}/delete", method=POST) public String removeCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="id") String id, @PathVariable(value="collectionField") String collectionField, @PathVariable(value="collectionItemId") String collectionItemId, @PathVariable(value="alternateId") String alternateId) throws Exception
request
- response
- model
- pathVars
- id
- collectionField
- collectionItemId
- Exception
public void addAuditableDisplayFields(EntityForm entityForm)
protected String getCurrentTabName(Map<String,String> pathVars, ClassMetadata cmd)
protected void setTypedEntityModelAttributes(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model)
@InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
binder
- Copyright © 2020. All rights reserved.