Announcement Announcement Module
Collapse
No announcement yet.
Abstract bean parameter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Abstract bean parameter

    I would like to be able to define abstract beans properties based on the bean id (or some other parameter):

    HTML Code:
    <bean id="parent" abstract="true" class="...">
      <propery name="p1" value="${#{bean.id}.p1:1}"/>
      <propery name="p2" value="${#{bean.id}.p2:2}"/>
    </bean>
    
    <bean id="child1" parent="parent" />
    
    <bean id="child2" parent="parent" />
    Where #{bean.id} evaluates to the id of the concrete bean. Therefore, with a property placeholder file like this:

    Code:
    child1.p1=11
    child2.p2=22
    I would have the beans:

    Code:
    child1 : { p1: 11; p2: 2; };
    child2 : { p1: 1; p2: 22; };
    Is there any way to accomplish that?
Working...
X