| olstore.controller.CreateTypeController
CreateTypeController | public class CreateTypeController extends SimpleFormController (Code) | | A simple form controller to handle creating a new type.
|
Constructor Summary | |
public | CreateTypeController() Creates a new controller and sets the class to use as a backing object
as well as views, and validation. |
CreateTypeController | public CreateTypeController()(Code) | | Creates a new controller and sets the class to use as a backing object
as well as views, and validation.
|
formBackingObject | protected Object formBackingObject(HttpServletRequest request) throws Exception(Code) | | Returns the object that will be used as the form's backing object.
Parameters: request - the HttpServletRequest object. the object that this form will use as its backing object. |
isFormChangeRequest | protected boolean isFormChangeRequest(HttpServletRequest request)(Code) | | Checks to see if the request is to change the form, or an actual submit.
Parameters: request - the HttpServletRequest true if the request is to change the form, false otherwise. |
onBindAndValidate | protected void onBindAndValidate(HttpServletRequest request, Object command, BindException errors) throws Exception(Code) | | Sets what validation is to be done on the command object's fields.
Parameters: request - the HttpServletRequest Parameters: command - the command object used as the backing object. Parameters: errors - where the errors are reported if validation fails. |
onFormChange | protected void onFormChange(HttpServletRequest request, HttpServletResponse response, Object command) throws Exception(Code) | | Called when the form is changed so that if a new property is needed
it can be properly added to the backing command object.
Parameters: request - the HttpServletRequest. Parameters: response - the HttpServletResponse Parameters: command - the backing objecdt of this form. |
onSubmit | protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception(Code) | | Handles the submission of the simple form object, and returns a new
model and view to represent the changes.
Parameters: request - the HttpServletRequest Parameters: response - the HttpServletResponse Parameters: command - the backing object of this form. Parameters: errors - the errors to report for this form's validation. a new model and view to represent the form. |
referenceData | protected Map referenceData(HttpServletRequest request) throws Exception(Code) | | The initial model to be used in this form.
Parameters: request - the HttpServletRequest object. a map that represents the model to be used in the view. |
setOlstore | public void setOlstore(OlstoreFacade olstore)(Code) | | Spring method for dependency injection.
Parameters: olstore - supplied via spring. |
|
|