This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

PropertyEditorSupport setter and getter is not called  RSS feed

 
Gourav Bansal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gourav Bansal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!