org.broadleafcommerce.admin.web.controller.entity
Class AdminOfferController
java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
org.broadleafcommerce.admin.web.controller.entity.AdminOfferController
@Controller(value="blAdminOfferController")
@RequestMapping(value="/offer")
public class AdminOfferController
- extends AdminBasicEntityController
Handles admin operations for the Offer entity. Certain Offer fields should only render when specific values
are set for other fields; we provide the support for that in this controller.
- Author:
- Andre Azzolini (apazzolini)
|
Method Summary |
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)
|
protected String |
getSectionKey(Map<String,String> pathVars)
|
protected void |
modifyModelAttributes(org.springframework.ui.Model model)
Offer field visibility is dependent on other fields in the entity. |
String |
viewAddEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String entityType)
|
String |
viewEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
String id)
|
| Methods inherited from class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController |
addAddActionIfAllowed, addCollectionItem, buildAddCollectionItemModel, getCollectionFieldRecords, getCollectionValueDetails, initBinder, removeCollectionItem, removeEntity, saveEntity, showAddCollectionItem, showSelectCollectionItem, showUpdateCollectionItem, showViewCollectionItem, showViewUpdateCollection, showViewUpdateCollection, updateCollectionItem, updateCollectionItemSequence, viewCollectionItemDetails, viewEntityList |
| Methods inherited from class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController |
attachSectionSpecificInfo, extractDynamicFormFields, getAddEntityTypes, getBlankDynamicFieldTemplateForm, getBlankDynamicFieldTemplateForm, getClassNameForSection, getCollectionListGrid, getCriteria, getDefaultEntityType, getDynamicFieldTemplateForm, getDynamicForm, getMaxIndex, getSectionCustomCriteria, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, setModelAttributes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SECTION_KEY
protected static final String SECTION_KEY
- See Also:
- Constant Field Values
AdminOfferController
public AdminOfferController()
getSectionKey
protected String getSectionKey(Map<String,String> pathVars)
- Overrides:
getSectionKey in class AdminAbstractController
viewEntityForm
@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
- Overrides:
viewEntityForm in class AdminBasicEntityController
- Throws:
Exception
viewAddEntityForm
@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
- Overrides:
viewAddEntityForm in class AdminBasicEntityController
- Throws:
Exception
addEntity
@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
- Overrides:
addEntity in class AdminBasicEntityController
- Throws:
Exception
modifyModelAttributes
protected void modifyModelAttributes(org.springframework.ui.Model model)
- Offer field visibility is dependent on other fields in the entity. Mark the form with the appropriate class
so that the Javascript will know to handle this form.
We also want to tell the UI to make item target criteria required. We cannot manage this at the entity level via an
Copyright © 2013. All Rights Reserved.