Announcement Announcement Module
Collapse
No announcement yet.
How to retrieve all derived concret controller? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to retrieve all derived concret controller?

    I need develop some controllers as below to reflect parent/child relationship. But I don't know if there is any way letting me to have a reference to collection of child controllers from parent controller. After having this reference I can loop through all concrete controllers. Is this a right way to design? What abstract controller should I use? Thanks

    Code:
    <bean id="abstractController" class="mycom.MyAbastractController" abstract="true">
    <!--other property etc-->
      </bean>
    
      <bean id="concreteController1" parent="abstractController">
    <!--other property etc-->
      </bean>
    
      <bean id="concreteController2" parent="abstractController">
    <!--other property etc-->
      </bean>

  • #2
    It might be due to the fact that it is already quite late here, but I don't have a clue in what you are trying to achieve here...

    Comment


    • #3
      I'm not sure, either, I understand what you try to achieve.
      If you want to have access to all children of an abstract bean, you can use getBeansOfType method of ListableBeanFactory: http://www.springframework.org/docs/...va.lang.Class)

      Comment

      Working...
      X