Results 1 to 4 of 4

Thread: global property editor registration

  1. #1
    Join Date
    Oct 2004
    Posts
    3

    Default global property editor registration

    is there any way to globally register common property editors, for all controllers? other way then creating base controller classes?

  2. #2
    Join Date
    Aug 2004
    Location
    Toulouse, France
    Posts
    148

    Default

    You can also register a customEditor at the applicationContext level by following the description there :
    http://www.springframework.org/docs/...-customeditors
    However, I'm not sure at 100% it gets propagated to the servlet property editors.
    Have a try.

    Olivier

  3. #3
    Join Date
    Oct 2004
    Posts
    3

    Default

    it doesn't

  4. #4
    Join Date
    Aug 2004
    Location
    Toulouse, France
    Posts
    148

    Default

    ok, sorry
    Still, instead of inheriting from a common controller, I suggest to have delegation and actually have an utility class with a static initBinder method which actually add your custom editors. This way, you're free to use inheritance for other purpose than a mere factorisation of property editor registration.
    Actually, the auto registration of propertyEditor from applicationContext to controller could be an interesting feature.

    Olivier

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Unit testing with JOTM and JtaTransactionManager
    By lalle in forum Architecture
    Replies: 1
    Last Post: Oct 15th, 2005, 09:05 AM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Replies: 4
    Last Post: Aug 17th, 2005, 04:42 AM
  5. Replies: 2
    Last Post: May 13th, 2005, 05:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •