Spring Framework CustomDateEditor - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework CustomDateEditor class.

This code example shows how to use the following methods:
 
	@Override 
	protected void initBinder(HttpServletRequest request,
			ServletRequestDataBinder binder) throws Exception {
		 
		binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy"),true) );
		 
	} 
 
    @Override 
      protected ModelAndView onCancel(Object command) throws Exception {
          return new ModelAndView(new RedirectView(getCancelView(),true));
     } 
 
 
	 
	 
	@Override 
	protected Map referenceData(HttpServletRequest request) throws Exception {
		log.debug("referenceData called.");
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
			ServletRequestDataBinder binder) throws Exception {
		 
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ");
		df.setLenient(false);
		 
		binder.registerCustomEditor(Date.class, new CustomDateEditor(df,true) );
		 
	} 
	 
 
 
	 
	protected Object formBackingObject(HttpServletRequest request) 			throws Exception {
		 
		SynchConfigurationCommand cmd = new SynchConfigurationCommand();
 
		HttpSession session =  request.getSession();
		String userId = (String)session.getAttribute("userId");
		 
		String configId = request.getParameter("objId");
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    private CollectionService collectionService;
 
    @InitBinder 
    public void initBinder(WebDataBinder binder) {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
    } 
 
    @RequestMapping(value = "/start.action", method = RequestMethod.POST)
    @Consumes(MediaType.APPLICATION_JSON) 
    @ResponseBody 
    public Map<String,Object> saveStart(@RequestBody final String jsonString) throws Exception {
        // 
       // logger.info("saveStart CeaController  : "+jsonString); 
        try{ 
            if(jsonString == null){
                return getUIWrapper(false); 
            } 
 
            if(JsonDataValidator.isValidCeaJSON(jsonString)){
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    private CollectionLogService collectionLogService;
 
    @InitBinder 
    public void initBinder(WebDataBinder binder) {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
    } 
 
    @RequestMapping(value = "/save.action", method = {RequestMethod.POST})
    @ResponseBody 
    public Map<String, Object> save(AidrCollectionLog collectionLog) throws Exception {
        logger.info("Save AidrCollectionLog to Database for collection with ID: " + collectionLog.getCollectionID());
        try { 
            collectionLogService.create(collectionLog);
            return getUIWrapper(true); 
        } catch (Exception e) {
            logger.error("Error while saving AidrCollectionLog Info to database", e);
            return getUIWrapper(false); 
        } 
    } 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
    @Override 
    protected void initBinder(HttpServletRequest request,
                              ServletRequestDataBinder binder) throws Exception {
 
        binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy"), true));
    } 
 
    public ItPolicyReportController() { 
        super(); 
    } 
 
 
    @Override 
    protected Map referenceData(HttpServletRequest request) throws Exception {
 
        System.out.println("referenceData called.");
        request.getSession().removeAttribute("userList");
 
        List<Organization> deptList = orgManager.allDepartments(null);
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    private CollectionService collectionService;
 
    @InitBinder 
    public void initBinder(WebDataBinder binder) {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
    } 
 
 
    @RequestMapping(value = "/updateTemplate.action", method = {RequestMethod.POST})
    @ResponseBody 
    public Map<String, Object> updateTemplate(UITemplateRequest uiTemplateRequest) {
        logger.info("Creating new label in uiTemplate");
 
        try { 
            UITemplateRequest response = uiTemplateService.updateTemplate(uiTemplateRequest);
            if (response != null){
                return getUIWrapper(response, true);
            } else { 
                return getUIWrapper(false, "Error while creating new ui template in uiTemplate"); 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
			ServletRequestDataBinder binder) throws Exception {
		 
		SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy");
		df.setLenient(false);
		 
		binder.registerCustomEditor(Date.class, new CustomDateEditor(df,true) );
 
	} 
	 
 
	protected Map referenceData(HttpServletRequest request) throws Exception {
		 
		log.debug("referenceData called.");
		List<SynchConfig> configList =  synchConfig.getAllConfig().getConfigList();
		 
		Map model = new HashMap();
		model.put("configList", configList);
		 
		return model;
	} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        //set up the parameters to take part in filtering 
        ServletRequestDataBinder dataBinder = new ServletRequestDataBinder(new SdvFilterDataBean()); 
        dataBinder.setAllowedFields(new String[] { "study_subject_id", "studyEventDefinition", "studyEventStatus", "eventCRFStatus", "sdvRequirement", 
            "eventcrfSDVStatus", "startUpdatedDate", "endDate", "eventCRFName" }); 
 
        dataBinder.registerCustomEditor(java.util.Date.class, new CustomDateEditor(sdf, true)); 
        dataBinder.bind(request); 
        BindingResult bindingResult = dataBinder.getBindingResult(); 
        //  eventCRFBeans = sdvUtil.filterEventCRFs(eventCRFBeans,bindingResult); 
 
        //set up request attributes for sidebar 
        //Not necessary when using old page design... 
        // setUpSidebar(request); 
 
        request.setAttribute("studyId", studyId); 
        //We need a study subject id for the first tab; take it somewhat arbitrarily from the first study event bean 
 
        /* int studySubjectId = 0; 
 
        StudyEventBean studyBeanUrl = studyEventBeans.get(0); 
2
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
    @Override 
    protected void initBinder(HttpServletRequest request, 
                              ServletRequestDataBinder binder) throws Exception { 
 
        binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy"), true)); 
    } 
 
 
    protected ModelAndView onCancel(Object command) throws Exception { 
        return new ModelAndView(new RedirectView("/welcomePage.selfserve", true)); 
 
 
    } 
 
 
    @Override 
    protected Map referenceData(HttpServletRequest request) throws Exception { 
        Map model = new HashMap(); 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
                                    new ByteArrayMultipartFileEditor()); 
        SimpleDateFormat dateFormat =  
            new SimpleDateFormat(getText("date.format", request.getLocale())); 
        dateFormat.setLenient(false); 
        binder.registerCustomEditor(Date.class, null,  
                                    new CustomDateEditor(dateFormat, true)); 
    } 
 
    /** 
     * Convenience message to send messages to users, includes app URL as footer. 
     * @param user the user to send a message to. 
     * @param msg the message to send. 
     * @param url the URL of the application. 
     */ 
    protected void sendUserMessage(User user, String msg, String url) { 
        if (log.isDebugEnabled()) { 
            log.debug("sending e-mail to user [" + user.getEmail() + "]..."); 
        } 
 
        message.setTo(user.getFullName() + "<" + user.getEmail() + ">"); 
4
CodeRank
Experience pair programming with AI  Get Codota for Java