Announcement Announcement Module
Collapse
No announcement yet.
getBeanName() in Controller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • getBeanName() in Controller

    In view's you can call getBeanName() to get the name of the view. It would be handy if this was possible for Controllers to.

    Is there a reason why this isn't the case, am I overlooking something?

  • #2
    I don't know why BeanNameAware isn't implemented in the AbstractController class, but it's easy to add this to your own controllers. Just implement the BeanNameAware interface and Spring will automatically set the bean name for you.

    regards,
    Alef Arendsen

    Comment


    • #3
      Ok thanks, I could have found that out myself but anyway :-).

      Maybe it's a good idea to do a feature request for adding this to AbstractController?

      Comment

      Working...
      X