@RequestMapping(value="/pages/{typeKey}")
public class AdminAdvancedPageController
extends org.broadleafcommerce.cms.admin.web.controller.AdminPageController
AdminPageController
will drive the dynamic form fields for a
Page
based on the PageType
associated with the Page instead of the PageTemplate.
Since we are not using the actual "pageTemplate" field from Page but are leveraging the page controller and
custom persistence handler, we massage the data necessary in this class to achieve it. For example, the dynamic forms
are still driven by the "pageTemplate" field, but the value of the field corresponds to the value of the PageType that
is associated instead. We determine this scenario by using the "constructForm-pageType" custom criteria instead of the
normal "constructForm" criteria.Modifier and Type | Field and Description |
---|---|
protected com.broadleafcommerce.theme.service.PageTypeService |
pageTypeService |
SECTION_KEY
adminUserDao, adornedTargetAutoPopulateExtensionManager, ALTERNATE_ID_PROPERTY, CUSTOM_CRITERIA, duplicator, dynamicEntityDao, genericEntityService, IS_SELECTIZE_REQUEST, LOG, rowLevelSecurityService, 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 |
---|
AdminAdvancedPageController() |
Modifier and Type | Method and Description |
---|---|
String |
addEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm,
org.springframework.validation.BindingResult result) |
protected void |
addOnChangeTrigger(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef) |
protected org.broadleafcommerce.openadmin.web.form.entity.DynamicEntityFormInfo |
getDynamicForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef,
String id) |
String |
getDynamicForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String propertyName,
String propertyTypeId) |
protected com.broadleafcommerce.theme.domain.page.PageType |
getPageType(Map<String,String> pathVars) |
protected String[] |
getSectionCustomCriteria() |
protected String |
getSectionKey(Map<String,String> pathVars) |
protected boolean |
isBasicPage(Map<String,String> pathVars) |
protected void |
modifyAddEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef,
Map<String,String> pathVars) |
protected void |
modifyEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef,
Map<String,String> pathVars) |
String |
saveEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id,
org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm,
org.springframework.validation.BindingResult result,
org.springframework.web.servlet.mvc.support.RedirectAttributes ra) |
String |
viewAddEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String entityType) |
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) |
attachSectionSpecificInfo, viewEntityForm
addAddActionIfAllowed, addAuditableDisplayFields, addCollectionItem, addCollectionItem, addEmptyCollectionItem, addSelectizeCollectionItem, buildAddCollectionItemModel, buildDirtyList, buildSelectizeCustomCriteria, declareShouldIgnoreAdditionStatusFilter, determineEntityType, duplicateEntity, getCollectionFieldRecords, getCollectionValueDetails, getCurrentTabName, getCustomCriteria, getErrorDuplicatingResponse, getModalForBlankEntityType, getSelectizeCollectionOptions, getViewSubRecords, initBinder, isAddActionAllowed, isNotReadOnly, modifyEntityForm, reinitializeEntityForm, removeCollectionItem, removeCollectionItem, removeEntity, resolveAppropriateEntityView, saveEntityJson, setTypedEntityModelAttributes, setupViewEntityListBasicModel, showAddCollectionItem, showUpdateCollectionItem, showUpdateCollectionItem, showViewCollectionItem, showViewCollectionItem, showViewUpdateCollection, showViewUpdateCollection, showViewUpdateCollection, showViewUpdateCollection, updateCollectionItem, updateCollectionItem, updateCollectionItemSequence, updateCollectionItemSequence, viewCollectionItemDetails, viewCollectionItemTab, viewEntityListSelectize, viewEntityTab
attachSectionSpecificInfo, createSectionCrumb, extractDynamicFormFields, getAddEntityTypes, getClassNameForSection, getCollectionListGrid, getCollectionListGrid, getCriteria, getDefaultEntityType, getDynamicFieldTemplateForm, getDynamicForm, getEntityForm, getEntityForm, getEntityForm, getFirstId, getLastId, getLowerCount, getMaxIndex, getMaxResults, getPageSize, getPersistencePackageRequest, getSectionCrumbs, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, getUpperCount, modifyCriteria, populateJsonValidationErrors, setModelAttributes, setSpecializedNameForFields, translateErrorMessage
protected com.broadleafcommerce.theme.service.PageTypeService pageTypeService
protected com.broadleafcommerce.theme.domain.page.PageType getPageType(Map<String,String> pathVars)
protected String getSectionKey(Map<String,String> pathVars)
getSectionKey
in class org.broadleafcommerce.cms.admin.web.controller.AdminPageController
protected org.broadleafcommerce.openadmin.web.form.entity.DynamicEntityFormInfo getDynamicForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, String id)
getDynamicForm
in class org.broadleafcommerce.cms.admin.web.controller.AdminPageController
protected void addOnChangeTrigger(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef)
addOnChangeTrigger
in class org.broadleafcommerce.cms.admin.web.controller.AdminPageController
protected void modifyAddEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, Map<String,String> pathVars)
modifyAddEntityForm
in class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
protected void modifyEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, Map<String,String> pathVars)
modifyEntityForm
in class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
@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
viewEntityList
in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
Exception
@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
viewAddEntityForm
in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
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") org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
addEntity
in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
Exception
@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") org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra) throws Exception
saveEntity
in class org.broadleafcommerce.cms.admin.web.controller.AdminPageController
Exception
@RequestMapping(value="/{propertyName}/dynamicForm", method=GET) public String getDynamicForm(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable(value="propertyName") String propertyName, @RequestParam(value="propertyTypeId") String propertyTypeId) throws Exception
getDynamicForm
in class org.broadleafcommerce.cms.admin.web.controller.AdminPageController
Exception
protected String[] getSectionCustomCriteria()
getSectionCustomCriteria
in class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
Copyright © 2020. All rights reserved.