aspose file tools*
The moose likes Spring and the fly likes PropertyEditorSupport setter and getter is not called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "PropertyEditorSupport setter and getter is not called" Watch "PropertyEditorSupport setter and getter is not called" New topic
Author

PropertyEditorSupport setter and getter is not called

Gourav Bansal
Ranch Hand

Joined: Jun 27, 2010
Posts: 36
Hi

I am trying to create a CutomPropertyEditorSupport but the getAsText() and setAsText() are not called. I am using Spring 2.5 not the Spring 3.

Here is my code:


I am adding this Custom Editor in Controller initBinder method.


The Sysout of initBinder is coming but the sysout of propertyEditor is not coming. So I think the setAsText method is not called. Please help me
Gourav Bansal
Ranch Hand

Joined: Jun 27, 2010
Posts: 36
I know I am using older spring. I tried to learn the spring 3. But overthere everything is done via annotation. I am not getting how the things are working. So come back to old for some ttime to learn the Spring properly. Could you please help me in my problem
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

I would recommend against using this old version of Spring to learn with. It will just bite you later. I would suggest using the newest version of Spring then asking about the parts of it here that you are having trouble with.


[How To Ask Questions][Read before you PM me]
Gourav Bansal
Ranch Hand

Joined: Jun 27, 2010
Posts: 36
Thanks Bill for the suggestion. But before this i tried the latest spring and in latest spring everything is happened in the air just use the annotation. I just want to go into the depth to learn how the Spring peoples have created the things so that I can improve my coding practice and and also learn other things not only spring

The solution of it I got is

In initBinder i was using this


Instead of the above it should be


The property on which I am applying Custom Editor is of String type
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PropertyEditorSupport setter and getter is not called
 
Similar Threads
getAsText() not called Spring MVC PropertyEditorSupport AJAX
MVC 2.5 - Help with a custom PropertyEditor
List Binding -- form:checkboxes
on submit, model object returning null
Timestamp Binding