@Controller(value="blAdminBasicEntityController") @RequestMapping(value="/{sectionKey:.+}") public class AdminBasicEntityController extends AdminAbstractController
#BroadleafAdminAbstractEntityController
. 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 static org.apache.commons.logging.Log |
LOG |
adminNavigationService, adminRemoteSecurityService, entityConfiguration, entityFormValidator, FILTER_VALUE_SEPARATOR, FILTER_VALUE_SEPARATOR_REGEX, formService, mainEntityActionsExtensionManager, service
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.
|
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
|
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.
|
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
|
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) |
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.
|
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 |
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)
Attempts to remove the given entity.
|
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 |
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 |
showSelectCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String owningClass,
String collectionField,
org.springframework.util.MultiValueMap<String,String> requestParams)
Shows the modal dialog that is used to select a "to-one" collection item.
|
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)
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)
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)
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
|
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)
Updates the given colleciton 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 |
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.
|
attachSectionSpecificInfo, extractDynamicFormFields, getAddEntityTypes, getBlankDynamicFieldTemplateForm, getBlankDynamicFieldTemplateForm, getClassNameForSection, getCollectionListGrid, getCriteria, getDefaultEntityType, getDynamicFieldTemplateForm, getDynamicForm, getMaxIndex, getSectionCustomCriteria, getSectionKey, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, setModelAttributes
getContextPath, isAjaxRequest
@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
- criteria
- a Map of property name -> list critiera valuesException
protected void addAddActionIfAllowed(String sectionClassName, ClassMetadata cmd, List<EntityFormAction> mainActions)
sectionClassName
- cmd
- mainActions
- @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
@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}", 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
- modal
- - whether or not to show the entity in a read-only modalException
@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
@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) throws Exception
request
- response
- model
- pathVars
- id
- Exception
@RequestMapping(value="/{owningClass:.*}/{collectionField:.*}/select", method=GET) public String showSelectCollectionItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="owningClass") String owningClass, @PathVariable(value="collectionField") String collectionField, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
request
- response
- model
- pathVars
- owningClass
- collectionField
- 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:.*}", 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
- criteriaForm
- 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
- sectionKey
- id
- collectionField
- requestParams
- Exception
@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
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}", 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
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
request
- response
- model
- pathVars
- id
- collectionField
- collectionItemId
- 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 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
request
- model
- pathVars
- id
- collectionField
- collectionItemId
- modalHeaderType
- ef
- entity
- 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
- entityForm
- 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
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
@InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
binder
- Copyright © 2014. All rights reserved.