Spring Framework StringTrimmerEditor - 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 StringTrimmerEditor class.

This code example shows how to use the following methods:
    @ManyToOne 
    private Empresa empresa;
     
    @InitBinder 
    public void inicializar(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
    } 
 
    public Long getId() {
        return id;
    } 
 
    public void setId(Long id) {
        this.id = id;
    } 
 
    public Integer getVersion() {
        return version;
    } 
 
3
CodeRank
This code example shows how to use the following methods:
        model.addAttribute("groups", groups);
    } 
 
    @InitBinder 
    protected void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
    } 
 
    @RequestMapping(value = "/list.htm", method = RequestMethod.GET)
    public String getDocuments(ModelMap model, HttpServletRequest request) {
        model.addAttribute("documents", this.docService.getGroupDocumentsByUser(currentUserName()));
        return "document/list"; 
    } 
 
    @RequestMapping(value = "/add.htm", method = RequestMethod.GET)
    public String addDocument(ModelMap model, HttpServletRequest request) {
        model.addAttribute("document", newDocument());
        return "document/add"; 
    } 
 
4
CodeRank
This code example shows how to use the following methods:
        binder.registerCustomEditor(String.class, "userSecurityDto.currentUserPassword", new DefaultStringEditor(true)); 
        binder.registerCustomEditor(String.class, "userSecurityDto.newUserPassword", new DefaultStringEditor(true)); 
        binder.registerCustomEditor(String.class, "userSecurityDto.newUserPasswordConfirm", 
                new DefaultStringEditor(true)); 
        binder.registerCustomEditor(Integer.class, "userProfileDto.pageSize", new PageSizeEditor()); 
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true)); 
        binder.registerCustomEditor(String.class, "avatar", new DefaultAvatarEditor(imageService)); 
    } 
 
    /** 
     * @param userService       to get current user and user by id 
     * @param breadcrumbBuilder the object which provides actions on {@link org.jtalks.jcommune.plugin.api.web.util.BreadcrumbBuilder} entity 
     * @param imageConverter    to prepare user avatar for view 
     * @param postService       to get all user's posts 
     * @param contactsService   for edit user contacts 
     * @param imageService      for DefaultAvatarEditor 
     */ 
    @Autowired 
    public UserProfileController(UserService userService, 
                                 BreadcrumbBuilder breadcrumbBuilder, 
3
CodeRank
This code example shows how to use the following methods:
    @Autowired WorkflowService workflowSrvc;
    @Autowired WorkflowBuilder workflowBldr;
 
    @InitBinder 
    protected void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
    } 
 
    @Override 
    @ModelAttribute 
    public void addModelInfo(ModelMap model, HttpServletRequest request) {
        super.addModelInfo(model, request);
        List<Group> groups = userService.getAllAssignmentGroups();
        model.addAttribute("groups", groups);
        model.addAttribute("defaultDocProcId", Workflow.PROCESS_ID_DOC_APPROVAL);
    } 
 
 
    @RequestMapping(value = "/index.htm", method = RequestMethod.GET)
    public String index(ModelMap model,
4
CodeRank
This code example shows how to use the following methods:
     * 
     * @param binder Binder object to be injected 
     */ 
    @InitBinder 
    public void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
        binder.registerCustomEditor(DateTime.class, new DateTimeEditor("dd-MM-yyyy"));
    } 
 
    /** 
     * @param topicModificationService the object which provides actions on 
     *                                 {@link org.jtalks.jcommune.model.entity.Topic} entity 
     * @param postService              the object which provides actions on 
     *                                 {@link org.jtalks.jcommune.model.entity.Post} entity 
     * @param branchService            the object which provides actions on 
     *                                 {@link org.jtalks.jcommune.model.entity.Branch} entity 
     * @param lastReadPostService      to perform post-related actions 
     * @param userService              to determine the current user logged in 
     * @param breadcrumbBuilder        to create Breadcrumbs for pages 
     * @param locationService          to track user location on forum (what page he is viewing now) 
4
CodeRank
This code example shows how to use the following methods:
     * 
     * @param binder Binder object to be injected 
     */ 
    @InitBinder 
    public void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
    } 
     
    /** 
     * Show SAPE configuration page 
     * @return SAPE configuration page  
     */ 
    @RequestMapping(value="/configuration/sape", method=RequestMethod.GET)
    public ModelAndView showSapeConfigurationPage() {
        Component forumComponent = componentService.getComponentOfForum();
        SapeConfiguration configuration = configurationService.getSapeConfiguration(forumComponent.getId());
        return new ModelAndView(VIEW_SAPE_CONFIGURATION)
                .addObject(PARAM_SAPE_CONFIGURATION, configuration);
    } 
     
5
CodeRank
This code example shows how to use the following methods:
    @Autowired 
    protected LocalTaskService taskService;
 
    @InitBinder 
    protected void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
    } 
 
    @RequestMapping(value = "/tasks.htm", method = RequestMethod.GET)
    public String index(ModelMap model, HttpServletRequest request) {
        List<TaskForm> tasks = this.taskService.getTasks(currentUserName());
        model.addAttribute("tasks", tasks);
 
        return "tasks"; 
    } 
 
    @RequestMapping(value = "/tasks", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<Response<List<TaskForm>>> getTasks(
            HttpServletRequest request) {
        String userName = currentUserName();
4
CodeRank
This code example shows how to use the following methods:
@Component 
public class CustomBindingInititalizer implements WebBindingInitializer {
 
    public void initBinder(WebDataBinder binder, WebRequest webRequest) {
        binder.registerCustomEditor(Identity.class, new IdentityPropertyEditor(shouldCreateOnNew(webRequest)));
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
    } 
 
    private boolean shouldCreateOnNew(WebRequest webRequest) {
        HttpServletRequest request = (HttpServletRequest) webRequest.resolveReference(WebRequest.REFERENCE_REQUEST);
        return RequestMethod.POST.equals(RequestMethod.valueOf(request.getMethod()));
    } 
} 
5
CodeRank
This code example shows how to use the following methods:
    @Autowired 
    IdentityService identityService;
 
    @InitBinder 
    protected void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
    } 
 
    @RequestMapping(value = "/userRegistration.htm", method = RequestMethod.GET)
    public String get(ModelMap model, HttpServletRequest request) {
        log.debug("userRegistration"); 
        if (request.getRemoteUser() != null) {
            return "redirect:j_spring_security_logout"; 
        } 
        List<Group> groups = userService.getAllAssignmentGroups();
        model.addAttribute("groups", groups);
        return "userRegistration"; 
    } 
 
    @RequestMapping(value = "/userRegistration.htm", method = RequestMethod.POST)
4
CodeRank
This code example shows how to use the following methods:
     * 
     * @param binder Binder object to be injected 
     */ 
    @InitBinder 
    public void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
    } 
 
    /** 
     * @param simplePageService the object which provides actions on {@link SimplePage} entity 
     */ 
    @Autowired 
    public SimplePageController(SimplePageService simplePageService, UserService userService) {
        this.simplePageService = simplePageService;
        this.userService = userService;
    } 
 
    /** 
     * Show a page information by its path name. 
     * 
4
CodeRank