Announcement Announcement Module
Collapse
No announcement yet.
Spring application context in custom property editor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring application context in custom property editor

    Hi all,

    I am writing a custom property editor that can handle the binding of a form parameter to a specific domain model object. This property editor needs to access the spring application context to retrieve a DAO bean. What is the best way to get access to the spring application context?

    Thanks in advance for any help!

    Arjan Huijzer

  • #2
    Originally posted by huijzer
    I am writing a custom property editor that can handle the binding of a form parameter to a specific domain model object. This property editor needs to access the spring application context to retrieve a DAO bean. What is the best way to get access to the spring application context?
    Assuming your property editor will be registered during initBinder(), you could simply inject your DAO into your CommandController via spring-servlet.xml

    Comment


    • #3
      Thanks, that worked!

      Comment

      Working...
      X